Subject: | t/lib/Test.pm: run_makefile_pl return value |
run_makefile_pl in t/lib/Test.pm should NOT return true if the chdir
fails. See the attached patch. The patch also contains a comment about
the relationship between build_dist and run_makefile_pl (maybe this
could be refactored into one single function).
Regards,
Slaven
Subject: | 0001-run_makefile_pl-should-not-return-a-true-value-if-ch.patch |
From 7a6065aee02461b4b8dc208ce5c38a1f2ba737f6 Mon Sep 17 00:00:00 2001
From: Slaven Rezic <slaven@rezic.de>
Date: Thu, 21 Oct 2010 18:11:14 +0200
Subject: [PATCH] run_makefile_pl should not return a true value if chdir fails. Also
added a comment about the relationship of build_dist and
run_makefile_pl.
---
t/lib/Test.pm | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/t/lib/Test.pm b/t/lib/Test.pm
index f330fe6..a346a29 100644
--- a/t/lib/Test.pm
+++ b/t/lib/Test.pm
@@ -170,12 +170,14 @@ sub build_dist {
return $ret ? 0 : 1;
}
+# Same as build_dist, but also allows shell meta characters in
+# run_params
sub run_makefile_pl {
my %params = @_;
my $dist_path = dir();
return 0 unless -d $dist_path;
my $home = cwd;
- chdir $dist_path or return 1;
+ chdir $dist_path or return 0;
my $X_MYMETA = $params{MYMETA} || '';
local $ENV{X_MYMETA} = $X_MYMETA;
--
1.7.0.3