@@ -376,37 +376,37 @@ def test_harness_driver(argv=None):
376
376
local_path_to_tests = apps_root ,
377
377
harness_id = unique_id )
378
378
379
- #
380
- # Check for the existence of the file "kill_test".
381
- # If the file exists then the program will exit
382
- # without building and submitting scripts.
383
- #
384
- kill_file = apptest .get_path_to_kill_file ()
385
- if os .path .exists (kill_file ):
386
- message = f'The kill file { kill_file } exists. It must be removed to run this test.'
387
- sys .exit (message )
388
-
389
- # Q: What is the purpose of the testrc file??
390
- testrc_file = apptest .get_path_to_rc_file ()
391
- if os .path .exists (testrc_file ):
392
- file_obj = open (testrc_file ,"r" )
393
- lines = file_obj .readlines ()
394
- file_obj .close ()
395
-
396
- attempts = int (lines [0 ].strip ())
397
- limits = int (lines [1 ].strip ())
398
-
399
- if attempts >= limits :
400
- return
401
- else :
402
- attempts = attempts + 1
403
- file_obj = open (testrc_file ,"w" )
404
- string1 = str (attempts ) + "\n "
405
- string2 = str (limits ) + "\n "
406
- file_obj .write (string1 )
407
- file_obj .write (string2 )
379
+ if do_submit :
380
+ # Check for the existence of the file "kill_test".
381
+ # If the file exists then the program will exit
382
+ # without building and submitting scripts.
383
+ kill_file = apptest .get_path_to_kill_file ()
384
+ if os .path .exists (kill_file ):
385
+ message = f'The kill file { kill_file } exists. It must be removed to run this test.'
386
+ sys .exit (message )
387
+
388
+ # Q: What is the purpose of the testrc file??
389
+ testrc_file = apptest .get_path_to_rc_file ()
390
+ if os .path .exists (testrc_file ):
391
+ file_obj = open (testrc_file ,"r" )
392
+ lines = file_obj .readlines ()
408
393
file_obj .close ()
409
394
395
+ attempts = int (lines [0 ].strip ())
396
+ limits = int (lines [1 ].strip ())
397
+
398
+ if attempts >= limits :
399
+ message = f'Number of tests { attempts } exceeds limit { limits } .'
400
+ sys .exit (message )
401
+ else :
402
+ attempts = attempts + 1
403
+ file_obj = open (testrc_file ,"w" )
404
+ string1 = str (attempts ) + "\n "
405
+ string2 = str (limits ) + "\n "
406
+ file_obj .write (string1 )
407
+ file_obj .write (string2 )
408
+ file_obj .close ()
409
+
410
410
# Create the status and run archive directories for this test instance
411
411
status_dir = apptest .create_test_status ()
412
412
ra_dir = apptest .create_test_runarchive ()
0 commit comments