Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Add/update copyright notices.
[simgrid.git] / buildtools / Cmake / Scripts / generate_memcheck_tests.pl
index 9b5a55f..85dd349 100755 (executable)
@@ -1,4 +1,11 @@
 #!/usr/bin/perl -w
+
+# Copyright (c) 2012-2014. The SimGrid Team.
+# All rights reserved.
+
+# This program is free software; you can redistribute it and/or modify it
+# under the terms of the license (GNU LGPL) which comes with this package.
+
 use strict;
 
 # input file = AddTest.txt
@@ -47,7 +54,7 @@ while ( defined( $line = <MAKETEST> ) ) {
     }
     if ($dump) {
         $line =~ s/^  //;
-        if ( $line =~ /^\s*ADD_TEST\(\S+\s+\S*\/tesh\s/ ) {
+        if ( $line =~ /^\s*ADD_TEST\(\S+\s+\S*TESH\_COMMAND\}\s/ ) {
             undef %environ;
             $config_var = "";
             $path       = "";
@@ -71,7 +78,7 @@ while ( defined( $line = <MAKETEST> ) ) {
                 my ( $env_var, $value_var ) = ( $1, $2 );
                 $environ{$env_var} = $value_var;
             }
-            if ( $line =~ /(\S+)\)$/ ) {
+            if ( $line =~ /(\S+)\s*\)$/ ) {
                 $tesh_file = $1;
                 $tesh_file =~ s/^[^\/\$]/$path\/$&/;
                 $tesh_file =~ s/\${CMAKE_HOME_DIRECTORY}/$proj_dir/g;