From: Arnaud Giersch Date: Mon, 5 May 2014 11:43:46 +0000 (+0200) Subject: Specify dependencies between memcheck tests. X-Git-Tag: v3_11~98^2~2 X-Git-Url: http://bilbo.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/fa66e7fdf0897317a6d43e00e6f1b0883227bc35 Specify dependencies between memcheck tests. Allows to run memcheck tests in parallel with e.g. ctest -D ExperimentalMemCheck -j 8 --- diff --git a/buildtools/Cmake/Scripts/generate_memcheck_tests.pl b/buildtools/Cmake/Scripts/generate_memcheck_tests.pl index d6b1a32a14..1abc07c8ca 100755 --- a/buildtools/Cmake/Scripts/generate_memcheck_tests.pl +++ b/buildtools/Cmake/Scripts/generate_memcheck_tests.pl @@ -107,8 +107,6 @@ while ( defined( $line = ) ) { } my ($count) = 0; - my ($count_first) = 0; - my ($count_second) = 0; open TESH_FILE, $tesh_file or die "Unable to open tesh file: \"$tesh_file\". $!\n"; my ($input) = ""; my ($l); @@ -153,11 +151,19 @@ while ( defined( $line = ) ) { print "${indent}ADD_TEST(NAME memcheck-$name_test-$factory-$count\n"; print "${indent} WORKING_DIRECTORY $path\/\n"; print "${indent} COMMAND $command --cfg=contexts/factory:$factory)\n"; + if ($count > 0) { + print "${indent}set_tests_properties(memcheck-$name_test-$factory-$count\n"; + print "${indent} PROPERTIES DEPENDS memcheck-$name_test-$factory-" . ($count - 1) . ")\n"; + } } } else { print "${indent}ADD_TEST(NAME memcheck-$name_test-$count\n"; print "${indent} WORKING_DIRECTORY $path\/\n"; print "${indent} COMMAND $command)\n"; + if ($count > 0) { + print "${indent}set_tests_properties(memcheck-$name_test-$count\n"; + print "${indent} PROPERTIES DEPENDS memcheck-$name_test-" . ($count - 1) . ")\n"; + } } $input = ""; #push @test_list, "memcheck-$name_test-$count";