From: degomme Date: Tue, 26 Jan 2016 12:53:49 +0000 (+0100) Subject: Don't execute unsupported factories tests for memcheck X-Git-Tag: v3_13~1053^2~1 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/117ebc7716bc59003c726bd41ce876cd19923c4b Don't execute unsupported factories tests for memcheck They would be executed with another factory instead, because not built --- diff --git a/tools/cmake/scripts/generate_memcheck_tests.pl b/tools/cmake/scripts/generate_memcheck_tests.pl index 62ec9f6ab3..f57f8a274e 100755 --- a/tools/cmake/scripts/generate_memcheck_tests.pl +++ b/tools/cmake/scripts/generate_memcheck_tests.pl @@ -108,6 +108,7 @@ while ( defined( $line = ) ) { } my ($count) = 0; + my ($close) = 0; open TESH_FILE, $tesh_file or die "Unable to open tesh file: \"$tesh_file\". $!\n"; my ($input) = ""; my ($l); @@ -149,6 +150,17 @@ while ( defined( $line = ) ) { } if ($factories) { foreach my $factory (split(';', $factories)) { + $close=0; + if( $factory =~ /^raw/) { + print "${indent}if(HAVE_RAWCTX)\n"; + $close=1; + }elsif( $factory =~ /^boost/) { + print "${indent}if(HAVE_BOOST_CONTEXT)\n"; + $close=1; + }elsif( $factory =~ /^ucontext/) { + print "${indent}if(CONTEXT_UCONTEXT)\n"; + $close=1; + } 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"; @@ -156,6 +168,9 @@ while ( defined( $line = ) ) { print "${indent}set_tests_properties(memcheck-$name_test-$factory-$count\n"; print "${indent} PROPERTIES DEPENDS memcheck-$name_test-$factory-" . ($count - 1) . ")\n"; } + if ($close > 0){ + print "${indent}endif()\n"; + } } } else { print "${indent}ADD_TEST(NAME memcheck-$name_test-$count\n";