Changeset 2591 for trunk/src/kmk/tests/test_driver.pl
- Timestamp:
- Jun 17, 2012, 10:45:31 PM (13 years ago)
- Location:
- trunk/src/kmk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/kmk
- Property svn:ignore
-
old new 13 13 stamp-* 14 14 makebook* 15 15 16 .*gdbinit 17 .gdb_history 18 16 19 *.dep 17 20 *.dvi … … 31 34 *.pg 32 35 *.pgs 36 33 37 README 34 38 README.DOS 35 39 README.W32 40 README.OS2 36 41 aclocal.m4 37 42 autom4te.cache … … 52 57 config.h.W32 53 58 config.h-vms 59 54 60 loadavg 55 61 loadavg.c 56 62 make 63 57 64 .deps 58 65 .dep_segment 66 ID 67 TAGS 68 59 69 _* 60 70 sun4 … … 72 82 sol2 73 83 i486-linux 84 74 85 customs 86 75 87 install-sh 76 88 mkinstalldirs 89 90 .directive.asc
-
- Property svn:ignore
-
trunk/src/kmk/tests
- Property svn:ignore
--- +++
- Property svn:ignore
-
trunk/src/kmk/tests/test_driver.pl
r1993 r2591 7 7 # 8 8 # Copyright (C) 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 9 # 2001, 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc. 9 # 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software 10 # Foundation, Inc. 10 11 # This file is part of GNU Make. 11 12 # … … 30 31 # variables and then calls &toplevel, which does all the real work. 31 32 32 # $Id: test_driver.pl,v 1. 24 2007/11/04 21:54:02psmith Exp $33 # $Id: test_driver.pl,v 1.30 2010/07/28 05:39:50 psmith Exp $ 33 34 34 35 … … 54 55 $test_timeout = 5; 55 56 57 # Path to Perl 58 $perl_name = $^X; 56 59 57 60 # %makeENV is the cleaned-out environment. … … 239 242 { 240 243 # Set up an initial value. In perl5 we can do it the easy way. 241 #242 244 $osname = defined($^O) ? $^O : ''; 245 246 # Find a path to Perl 243 247 244 248 # See if the filesystem supports long file names with multiple … … 276 280 if ($osname =~ /not found/i) 277 281 { 278 $osname = "(something unixy with no uname)";282 $osname = "(something posixy with no uname)"; 279 283 } 280 284 elsif ($@ ne "" || $?) … … 283 287 if ($@ ne "" || $?) 284 288 { 285 $osname = "(something unixy)";289 $osname = "(something posixy)"; 286 290 } 287 291 } … … 460 464 $diffext = 'd'; 461 465 $baseext = 'b'; 466 $runext = 'r'; 462 467 $extext = ''; 463 468 } else { … … 465 470 $diffext = 'diff'; 466 471 $baseext = 'base'; 472 $runext = 'run'; 467 473 $extext = '.'; 468 474 } … … 470 476 $diff_filename = "$testpath.$diffext"; 471 477 $base_filename = "$testpath.$baseext"; 478 $run_filename = "$testpath.$runext"; 472 479 $tmp_filename = "$testpath.$tmpfilesuffix"; 473 480 … … 483 490 $tests_run = 0; 484 491 $tests_passed = 0; 492 485 493 $code = do $perl_testname; 486 494 … … 716 724 717 725 &create_file (&get_basefile, $answer); 726 &create_file (&get_runfile, $command_string); 718 727 719 728 print "\nCreating Difference File ...\n" if $debug; … … 723 732 local($command) = "diff -c " . &get_basefile . " " . $logfile; 724 733 &run_command_with_output(&get_difffile,$command); 734 } else { 735 &rmfiles (); 725 736 } 726 737 … … 816 827 local $SIG{ALRM} = sub { die "timeout\n"; }; 817 828 alarm $test_timeout; 818 $code = system @_;829 $code = system(@_); 819 830 alarm 0; 820 831 }; … … 853 864 my $filename = shift; 854 865 855 print "\nrun_command_with_output($filename ): @_\n" if $debug;866 print "\nrun_command_with_output($filename,$runname): @_\n" if $debug; 856 867 &attach_default_output ($filename); 857 868 my $code = _run_command(@_); … … 1226 1237 } 1227 1238 1239 # This subroutine returns a command filename with a number appended 1240 # to the end corresponding to how many logfiles (and thus command files) 1241 # have been created in the current running test. 1242 1243 sub get_runfile 1244 { 1245 return ($run_filename . &num_suffix ($num_of_logfiles)); 1246 } 1247 1228 1248 # just like logfile, only a generic tmp filename for use by the test. 1229 1249 # they are automatically cleaned up unless -keep was used, or the test fails.
Note:
See TracChangeset
for help on using the changeset viewer.