X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/50d7c2d5062d8a79dc086205864e0407c53c9c45..7e9997bc1271973ad0a157f168213a2f874fd02f:/tools/sg_unit_extractor.pl diff --git a/tools/sg_unit_extractor.pl b/tools/sg_unit_extractor.pl index 4b96fd8502..6baa7b711b 100755 --- a/tools/sg_unit_extractor.pl +++ b/tools/sg_unit_extractor.pl @@ -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;