Subject: | Module fails to install because of a chdir error in t/02-usage.t |
I attempted to install this module after seeing it recommended on the
Catalyst mailing list.
The t/02-usage.t test fails near the end with the message:
cannot chdir to /tmp/txT54Xz1ZC/Test-App from /tmp/txT54Xz1ZC: No such
file or directory, aborting. at
/home/gwadej/opt/lib/perl5/5.10.0/File/Temp.pm line 893
A little investigation shows that the test finishes by deleting the
directory tree that includes the PWD.
I have had problems with this in the past in other testing.
The repair is simple, change directory back to a safe spot before
deleting the scratch directory.
The attached patch covers that case.
Subject: | 0001-Restore-current-directory-before-deleting-scratch.patch |
From 8718c23b3175a8aecf00a3933ede07ccf7289598 Mon Sep 17 00:00:00 2001
From: G. Wade Johnson <gwadej@anomaly.org>
Date: Thu, 28 May 2009 08:34:21 -0500
Subject: [PATCH] Restore current directory before deleting scratch.
---
t/02-usage.t | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/t/02-usage.t b/t/02-usage.t
index a621941..721e591 100644
--- a/t/02-usage.t
+++ b/t/02-usage.t
@@ -52,4 +52,5 @@ print $FH $controller;
close $FH;
# stdout_like('$wdir/script/test_app_test.pl /secret', qr/Authorization required/ism, 'auth required');
$DB::single=1;
+chdir "$Bin/.."; # restore dir before pulling rug from under ourselves.
undef $scratch;
--
1.5.4.3