Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Take into account the case where some variable do not consume anything.
[simgrid.git] / tools / sg_unit_extractor.pl
index 0dbb06c..f3f08cd 100755 (executable)
@@ -74,6 +74,7 @@ my ($GENERATED)=("/*******************************/\n".
 $beginline+=2;
 open OUT,">$outfile" || die "$progname: Cannot open output file '$outfile': $!\n";
 print OUT $GENERATED;
+print OUT "#include <stdio.h>\n";
 print OUT "#include \"xbt.h\"\n";
 print OUT $GENERATED;
 print OUT "# $beginline \"$infile\" \n";
@@ -85,6 +86,7 @@ close OUT || die "$progname: Cannot close output file '$outfile': $!\n";
 if (! -e "simgrid_units_main.c") {
   open OUT,">simgrid_units_main.c" || die "$progname: Cannot open main file 'simgrid_units_main.c': $!\n";
   print OUT $GENERATED;
+  print OUT "#include <stdio.h>\n\n";
   print OUT "#include \"xbt.h\"\n\n";
   print OUT "extern xbt_test_unit_t _xbt_current_unit;\n\n";
   print OUT "/* SGU: BEGIN PROTOTYPES */\n";
@@ -99,6 +101,8 @@ int main(int argc, char *argv[]) {
   /* SGU: BEGIN SUITES DECLARATION */
   /* SGU: END SUITES DECLARATION */
       
+  xbt_init(&argc,argv);
+    
   /* Search for the tests to do */
     selection[0]='\\0';
     for (i=1;i<argc;i++) {