1# RUN: %{python} %s quick 2# RUN: %{python} %s slow 3from __future__ import print_function 4 5import time 6import sys 7 8if len(sys.argv) != 2: 9 print("Wrong number of args") 10 sys.exit(1) 11 12mode = sys.argv[1] 13 14if mode == 'slow': 15 print("Running in slow mode") 16 sys.stdout.flush() # Make sure the print gets flushed so it appears in lit output. 17 time.sleep(6) 18 sys.exit(0) 19elif mode == 'quick': 20 print("Running in quick mode") 21 sys.exit(0) 22else: 23 print("Unrecognised mode {}".format(mode)) 24 sys.exit(1) 25