New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
t/op/dump.t fails on OpenBSD #14664
Comments
From @tonycozCreated by @tonycozt/op/dump.t fails on OpenBSD apparently unable to map ./perl to an $ make test TEST_FILES=op/dump.t Note that perl has no mechanism on OpenBSD (such as /proc/self/exe) to Originally reported by stsc via IRC in #p5p. Perl Info
|
From @tonycozOn Mon Apr 20 19:18:55 2015, tonyc wrote:
The attached appears to fix it for me. Tony |
From @tonycoz0001-perl-124357-make-sure-which_perl-can-find-.-perl-on-.patchFrom ef7bd33cee5527164ebf5fe517b02b5b3aa0403b Mon Sep 17 00:00:00 2001
From: Tony Cook <tony@develop-help.com>
Date: Tue, 21 Apr 2015 13:50:58 +1000
Subject: [PATCH] [perl #124357] make sure which_perl() can find ./perl on in
op/dump.t
OpenBSD doesn't set $^X to an absolute path. and since op/dump.t
chdir()s to a temp directory, which_perl() produced "./perl" which
is useless in the new directory.
Instead manually set $^X to an absolute path so which_perl() can find
it after the chdir. This should be safe on the platforms we allow
op/dump.t to run on.
---
t/op/dump.t | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/t/op/dump.t b/t/op/dump.t
index 1db1637..7c5c3af 100644
--- a/t/op/dump.t
+++ b/t/op/dump.t
@@ -13,6 +13,7 @@ BEGIN {
use Config;
use File::Temp qw(tempdir);
use Cwd qw(getcwd);
+use File::Spec;
skip_all("only tested on devel builds")
unless $Config{usedevel};
@@ -33,6 +34,11 @@ my $tmp = tempdir(CLEANUP => 1);
my $start = getcwd;
+# on systems which don't make $^X absolute which_perl() in test.pl won't
+# return an absolute path, so once we change directories it can't
+# find ./perl, resulting in test failures
+$^X = File::Spec->rel2abs($^X);
+
chdir $tmp
or skip_all("Cannot chdir to work directory");
--
1.7.10.4
|
@tonycoz - Status changed from 'new' to 'resolved' |
Migrated from rt.perl.org#124357 (status was 'resolved')
Searchable as RT124357$
The text was updated successfully, but these errors were encountered: