File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -852,17 +852,27 @@ def run_def(self):
852852
853853 def adjust_iter (self , running_with_tsan = False ):
854854
855- new_iter = self .test_iter + 1
856- if running_with_tsan and new_iter > 2 :
857- new_iter = 2
858-
859855 # Read the cfg file
860856 workdir = os .getcwd ()
861857 os .chdir (self .cfg_dir )
862858 file_in = open (self .cfg_file , 'r' )
863859 lines = file_in .readlines ()
864860 file_in .close ()
865861
862+ new_iter = self .test_iter + 1
863+
864+ if running_with_tsan :
865+
866+ # detect restart
867+ restart_iter = 0
868+ for line in lines :
869+ if line .strip ().split ("=" )[0 ].strip () == "RESTART_ITER" :
870+ restart_iter = int (line .strip ().split ("=" )[1 ].strip ())
871+ break
872+
873+ if new_iter > restart_iter + 2 :
874+ new_iter = restart_iter + 2
875+
866876 # Rewrite the file with a .autotest extension
867877 self .cfg_file = "%s.autotest" % self .cfg_file
868878 file_out = open (self .cfg_file ,'w' )
You can’t perform that action at this time.
0 commit comments