summaryrefslogtreecommitdiff
path: root/tests/run_make_tests.pl
diff options
context:
space:
mode:
authorPaul Smith <psmith@gnu.org>2005-08-31 13:38:17 +0000
committerPaul Smith <psmith@gnu.org>2005-08-31 13:38:17 +0000
commit5ee856d96d02275ccb19b19afd60c1e241bc62eb (patch)
tree695f5987160191a594d1c5349c9ac4f6bea4c00a /tests/run_make_tests.pl
parent0ffd22cb448ad10d5d212dd4760c9464ad5f1a92 (diff)
downloadgunmake-5ee856d96d02275ccb19b19afd60c1e241bc62eb.tar.gz
Try using POSIX::getcwd to find the working directory wherever it exists.
This should help the tests run more accurately on Windows (hopefully...)
Diffstat (limited to 'tests/run_make_tests.pl')
-rwxr-xr-xtests/run_make_tests.pl15
1 files changed, 9 insertions, 6 deletions
diff --git a/tests/run_make_tests.pl b/tests/run_make_tests.pl
index ca711b2..66be520 100755
--- a/tests/run_make_tests.pl
+++ b/tests/run_make_tests.pl
@@ -16,6 +16,9 @@ $pure_log = undef;
require "test_driver.pl";
+# Some target systems might not have the POSIX module...
+$has_POSIX = eval { require "POSIX.pm" };
+
#$SIG{INT} = sub { print STDERR "Caught a signal!\n"; die @_; };
sub valid_option
@@ -180,12 +183,14 @@ sub print_help
}
sub get_this_pwd {
- if ($vos) {
+ $delete_command = "rm";
+ if ($has_POSIX) {
+ $__pwd = POSIX::getcwd();
+ } elsif ($vos) {
$delete_command = "delete_file";
$__pwd = `++(current_dir)`;
- }
- else {
- $delete_command = "rm";
+ } else {
+ # No idea... just try using pwd as a last resort.
chop ($__pwd = `pwd`);
}
@@ -303,8 +308,6 @@ sub set_more_defaults
# Set up for valgrind, if requested.
if ($valgrind) {
-# use POSIX qw(:fcntl_h);
-# require Fcntl;
open(VALGRIND, "> valgrind.out")
|| die "Cannot open valgrind.out: $!\n";
# -q --leak-check=yes