Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
change the way unit testing is handled by cmake. Put it all in one file only instead...
[simgrid.git] / tools / sg_unit_extractor.pl
index 4b96fd8..6baa7b7 100755 (executable)
@@ -17,10 +17,13 @@ die "USAGE: $progname infile [infile+]\n"
 map {process_one($_)} @ARGV;
 
 sub process_one($) {
-    
     my $infile = shift;
     my $outfile;
     
+    print "$progname: processing $infile...\n";
+
+    $infile =~ s|src/|| unless (-e $infile);
+    
     $outfile =  $infile;
     $outfile =~ s/\.c$/_unit.c/;
     $outfile =~ s|.*/([^/]*)$|$1| if $outfile =~ m|/|;
@@ -32,7 +35,7 @@ sub process_one($) {
     my (@tests); # actual content
     
     open IN, "$infile" || die "$progname: Cannot open input file '$infile': $!\n";
-    
+
     my $takeit=0;
     my $line=0;
     my $beginline=0;