Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
There was too much levels of backslash escapes. Remove one of them.
authorArnaud Giersch <arnaud.giersch@iut-bm.univ-fcomte.fr>
Mon, 5 May 2014 12:17:31 +0000 (14:17 +0200)
committerArnaud Giersch <arnaud.giersch@iut-bm.univ-fcomte.fr>
Mon, 5 May 2014 13:32:58 +0000 (15:32 +0200)
It seems that it changed with commit 782233, when the add_test statements
were changed from add_test(testname exe arg...) to
add_test(NAME testname COMMAND exe arg...).

This broke test memcheck-smpi-replay-9.

buildtools/Cmake/Scripts/generate_memcheck_tests.pl

index 1abc07c..421bbe5 100755 (executable)
@@ -139,10 +139,10 @@ while ( defined( $line = <MAKETEST> ) ) {
                     if ( $command =~ /^mkfile\s+(\S+)/) {
                         my $file = $1;
                         # don't ask me to explain why so many backslashes...
-                        $input =~ s/\\/\\\\\\\\\\\\\\\\/g;
-                        $input =~ s/\n/\\\\\\\\n/g;
-                        $input =~ s/"/\\\\\\\\042/g;
-                        $input =~ s/'/\\\\\\\\047/g;
+                        $input =~ s/\\/\\\\\\\\/g;
+                        $input =~ s/\n/\\\\n/g;
+                        $input =~ s/"/\\\\042/g;
+                        $input =~ s/'/\\\\047/g;
                         $input =~ s/%/%%/g;
                         $command = "sh -c \"printf '$input' > $file\"";
                     }