Changeset 503 in kBuild for trunk/src/gmake/tests/run_make_tests.pl
- Timestamp:
- Sep 15, 2006 5:09:38 AM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/gmake/tests/run_make_tests.pl
-
Property svn:executable
set to
*
r281 r503 12 12 # (and others) 13 13 14 # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 15 # 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. 16 # This file is part of GNU Make. 17 # 18 # GNU Make is free software; you can redistribute it and/or modify it under the 19 # terms of the GNU General Public License as published by the Free Software 20 # Foundation; either version 2, or (at your option) any later version. 21 # 22 # GNU Make is distributed in the hope that it will be useful, but WITHOUT ANY 23 # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR 24 # A PARTICULAR PURPOSE. See the GNU General Public License for more details. 25 # 26 # You should have received a copy of the GNU General Public License along with 27 # GNU Make; see the file COPYING. If not, write to the Free Software 28 # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 29 14 30 $valgrind = 0; # invoke make with valgrind 31 $valgrind_args = '--num-callers=15 --tool=memcheck --leak-check=full'; 15 32 $pure_log = undef; 16 33 17 34 require "test_driver.pl"; 35 36 # Some target systems might not have the POSIX module... 37 $has_POSIX = eval { require "POSIX.pm" }; 18 38 19 39 #$SIG{INT} = sub { print STDERR "Caught a signal!\n"; die @_; }; … … 181 201 182 202 sub get_this_pwd { 183 if ($vos) { 184 $delete_command = "delete_file"; 203 $delete_command = 'rm -f'; 204 if ($has_POSIX) { 205 $__pwd = POSIX::getcwd(); 206 } elsif ($vos) { 207 $delete_command = "delete_file -no_ask"; 185 208 $__pwd = `++(current_dir)`; 186 } 187 else { 188 $delete_command = "rm"; 209 } else { 210 # No idea... just try using pwd as a last resort. 189 211 chop ($__pwd = `pwd`); 190 212 } … … 217 239 # This is probably not specific enough. 218 240 # 219 if ($osname =~ /Windows/i || $osname =~ /MINGW32/i ) {241 if ($osname =~ /Windows/i || $osname =~ /MINGW32/i || $osname =~ /CYGWIN_NT/i) { 220 242 $port_type = 'W32'; 221 243 } … … 249 271 # Find the full pathname of Make. For DOS systems this is more 250 272 # complicated, so we ask make itself. 251 $make_path = `sh -c 'echo "all:;\@echo \\\$(MAKE)" | $make_path -f-'`; 252 chop $make_path; 273 my $mk = `sh -c 'echo "all:;\@echo \\\$(MAKE)" | $make_path -f-'`; 274 chop $mk; 275 $mk or die "FATAL ERROR: Cannot determine the value of \$(MAKE):\n 276 'echo \"all:;\@echo \\\$(MAKE)\" | $make_path -f-' failed!\n"; 277 $make_path = $mk; 253 278 print "Make\t= `$make_path'\n" if $debug; 254 279 … … 304 329 305 330 if ($valgrind) { 306 # use POSIX qw(:fcntl_h);307 # require Fcntl;308 331 open(VALGRIND, "> valgrind.out") 309 332 || die "Cannot open valgrind.out: $!\n"; 310 333 # -q --leak-check=yes 311 $make_path = "valgrind --num-callers=15 --logfile-fd=".fileno(VALGRIND)." $make_path"; 334 exists $ENV{VALGRIND_ARGS} and $valgrind_args = $ENV{VALGRIND_ARGS}; 335 $make_path = "valgrind --log-fd=".fileno(VALGRIND)." $valgrind_args $make_path"; 312 336 # F_SETFD is 2 313 337 fcntl(VALGRIND, 2, 0) or die "fcntl(setfd) failed: $!\n"; -
Property svn:executable
set to
Note:
See TracChangeset
for help on using the changeset viewer.