@@ -53,27 +53,27 @@ def __run_exec(command):
5353 raise Exception (f"Subprocess return { result .returncode } ." )
5454
5555 @staticmethod
56- def __get_gtest_settings (repeats_count ):
56+ def __get_gtest_settings (repeats_count , type_task ):
5757 command = f"--gtest_repeat={ repeats_count } "
5858 command += "--gtest_recreate_environments_when_repeating "
5959 command += "--gtest_color=0 "
60+ command += "--gtest_shuffle "
61+ command += f"--gtest_filter=\" *{ type_task } *\" "
6062 return command
6163
6264 def run_threads (self ):
6365 if platform .system () == "Linux" and not os .environ .get ("ASAN_RUN" ):
64- self . __run_exec ( f" { self . valgrind_cmd } { self . work_dir / 'seq_func_tests' } { self . __get_gtest_settings ( 1 ) } " )
65- self .__run_exec (f"{ self .valgrind_cmd } { self .work_dir / 'stl_func_tests ' } { self .__get_gtest_settings (1 )} " )
66+ for task_type in [ "seq" , "stl" ]:
67+ self .__run_exec (f"{ self .valgrind_cmd } { self .work_dir / 'ppc_func_tests ' } { self .__get_gtest_settings (1 , '_' + task_type + '_' )} " )
6668
67- self .__run_exec (f"{ self .work_dir / 'seq_func_tests' } { self .__get_gtest_settings (3 )} " )
68- self .__run_exec (f"{ self .work_dir / 'stl_func_tests' } { self .__get_gtest_settings (3 )} " )
69- self .__run_exec (f"{ self .work_dir / 'tbb_func_tests' } { self .__get_gtest_settings (3 )} " )
70- self .__run_exec (f"{ self .work_dir / 'omp_func_tests' } { self .__get_gtest_settings (3 )} " )
69+ for task_type in ["omp" , "seq" , "stl" , "tbb" ]:
70+ self .__run_exec (f"{ self .work_dir / 'ppc_func_tests' } { self .__get_gtest_settings (3 , '_' + task_type + '_' )} " )
7171
7272 def run_core (self ):
7373 if platform .system () == "Linux" and not os .environ .get ("ASAN_RUN" ):
74- self .__run_exec (f"{ self .valgrind_cmd } { self .work_dir / 'core_func_tests' } { self .__get_gtest_settings (1 )} " )
74+ self .__run_exec (f"{ self .valgrind_cmd } { self .work_dir / 'core_func_tests' } { self .__get_gtest_settings (1 , '*' )} " )
7575
76- self .__run_exec (f"{ self .work_dir / 'core_func_tests' } { self .__get_gtest_settings (1 )} " )
76+ self .__run_exec (f"{ self .work_dir / 'core_func_tests' } { self .__get_gtest_settings (1 , '*' )} " )
7777
7878 def run_processes (self , additional_mpi_args ):
7979 proc_count = os .environ .get ("PROC_COUNT" )
@@ -82,26 +82,23 @@ def run_processes(self, additional_mpi_args):
8282
8383 mpi_running = f"{ self .mpi_exec } { additional_mpi_args } -np { proc_count } "
8484 if not os .environ .get ("ASAN_RUN" ):
85- self . __run_exec ( f" { mpi_running } { self . work_dir / 'all_func_tests' } { self . __get_gtest_settings ( 10 ) } " )
86- self .__run_exec (f"{ mpi_running } { self .work_dir / 'mpi_func_tests ' } { self .__get_gtest_settings (10 )} " )
85+ for task_type in [ "all" , "mpi" ]:
86+ self .__run_exec (f"{ mpi_running } { self .work_dir / 'ppc_func_tests ' } { self .__get_gtest_settings (10 , '_' + task_type )} " )
8787
8888 def run_performance (self ):
8989 if not os .environ .get ("ASAN_RUN" ):
9090 proc_count = os .environ .get ("PROC_COUNT" )
9191 if proc_count is None :
9292 raise EnvironmentError ("Required environment variable 'PROC_COUNT' is not set." )
9393 mpi_running = f"{ self .mpi_exec } -np { proc_count } "
94- self . __run_exec ( f" { mpi_running } { self . work_dir / 'all_perf_tests' } { self . __get_gtest_settings ( 1 ) } " )
95- self .__run_exec (f"{ mpi_running } { self .work_dir / 'mpi_perf_tests ' } { self .__get_gtest_settings (1 )} " )
94+ for task_type in [ "all" , "mpi" ]:
95+ self .__run_exec (f"{ mpi_running } { self .work_dir / 'ppc_perf_tests ' } { self .__get_gtest_settings (1 , '_' + task_type )} " )
9696
97- self .__run_exec (f"{ self .work_dir / 'omp_perf_tests' } { self .__get_gtest_settings (1 )} " )
98- self .__run_exec (f"{ self .work_dir / 'seq_perf_tests' } { self .__get_gtest_settings (1 )} " )
99- self .__run_exec (f"{ self .work_dir / 'stl_perf_tests' } { self .__get_gtest_settings (1 )} " )
100- self .__run_exec (f"{ self .work_dir / 'tbb_perf_tests' } { self .__get_gtest_settings (1 )} " )
97+ for task_type in ["omp" , "seq" , "stl" , "tbb" ]:
98+ self .__run_exec (f"{ self .work_dir / 'ppc_perf_tests' } { self .__get_gtest_settings (1 , '_' + task_type )} " )
10199
102100 def run_performance_list (self ):
103- for task_type in ["all" , "mpi" , "omp" , "seq" , "stl" , "tbb" ]:
104- self .__run_exec (f"{ self .work_dir / f'{ task_type } _perf_tests' } --gtest_list_tests" )
101+ self .__run_exec (f"{ self .work_dir / 'ppc_perf_tests' } --gtest_list_tests" )
105102
106103
107104if __name__ == "__main__" :
0 commit comments