Changeset 2232 for trunk/tsuite
- Timestamp:
- 07/19/08 09:37:32 (6 months ago)
- Files:
-
- 1 modified
-
trunk/tsuite/programs/run_programs.pl (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/tsuite/programs/run_programs.pl
r2228 r2232 1 1 #!usr/bin/perl -w 2 # This progarm reads in the names of all the program files3 # in run_programs.dat and compiles and links them2 # This progarm reads in the names of all the program files 3 # in the file run_programs.da, compiles and links them, then runs the tests 4 4 5 5 # 1 for gcc, 0 for icc 6 $UseGcc = 0; # ic c6 $UseGcc = 0; # icl - a special case 7 7 $UseGcc = 1; # g++ 8 8 9 # location of source and objectfiles9 # location of source files 10 10 $DirSource = "../../../source/"; 11 11 … … 26 26 open(RSOM,"$rsome") or die "could not open $rsome \n"; 27 27 28 # Reading in the input file names that are to be executed28 # read the program names that are to be executed, each is in a directory of the same name 29 29 while($r=<RSOM>) 30 30 { … … 34 34 $r=~s/\n//; #removing any newline characters 35 35 chdir( $r ) or die "could not change to $r \n"; 36 $out=$r; #giving name of output file same as the input file.37 $out=~s/\.in/.out/gi;38 36 # compile the program 39 print "Compiling $ out\n";37 print "Compiling $r\n"; 40 38 if( $UseGcc ) 41 39 { 42 system( "g++ $ out.cpp -I \"$DirSource\" \"$DirObject\"/*.o -lm ");40 system( "g++ $r.cpp -I \"$DirSource\" \"$DirObject\"/*.o -lm "); 43 41 $exec = "a.exe" ; 44 42 } 45 43 else 46 44 { 47 system( "icl $ out.cpp /I\"$DirSource\" \"$DirObject\"*.obj ");48 $exec = "$ out.exe" ;45 system( "icl $r.cpp /I\"$DirSource\" \"$DirObject\"*.obj "); 46 $exec = "$r.exe" ; 49 47 } 50 print "done.\n now execute it.\n";48 print "done.\n now execute $exec \n"; 51 49 system( "$exec"); 52 50 chdir( ".." ) or die "could not return home \n";
