16 |
|
|
17 |
require "test_driver.pl"; |
require "test_driver.pl"; |
18 |
|
|
19 |
|
# Some target systems might not have the POSIX module... |
20 |
|
$has_POSIX = eval { require "POSIX.pm" }; |
21 |
|
|
22 |
#$SIG{INT} = sub { print STDERR "Caught a signal!\n"; die @_; }; |
#$SIG{INT} = sub { print STDERR "Caught a signal!\n"; die @_; }; |
23 |
|
|
24 |
sub valid_option |
sub valid_option |
183 |
} |
} |
184 |
|
|
185 |
sub get_this_pwd { |
sub get_this_pwd { |
186 |
if ($vos) { |
$delete_command = "rm"; |
187 |
|
if ($has_POSIX) { |
188 |
|
$__pwd = POSIX::getcwd(); |
189 |
|
} elsif ($vos) { |
190 |
$delete_command = "delete_file"; |
$delete_command = "delete_file"; |
191 |
$__pwd = `++(current_dir)`; |
$__pwd = `++(current_dir)`; |
192 |
} |
} else { |
193 |
else { |
# No idea... just try using pwd as a last resort. |
|
$delete_command = "rm"; |
|
194 |
chop ($__pwd = `pwd`); |
chop ($__pwd = `pwd`); |
195 |
} |
} |
196 |
|
|
308 |
# Set up for valgrind, if requested. |
# Set up for valgrind, if requested. |
309 |
|
|
310 |
if ($valgrind) { |
if ($valgrind) { |
|
# use POSIX qw(:fcntl_h); |
|
|
# require Fcntl; |
|
311 |
open(VALGRIND, "> valgrind.out") |
open(VALGRIND, "> valgrind.out") |
312 |
|| die "Cannot open valgrind.out: $!\n"; |
|| die "Cannot open valgrind.out: $!\n"; |
313 |
# -q --leak-check=yes |
# -q --leak-check=yes |