You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
55 lines
1.7 KiB
55 lines
1.7 KiB
From 606062e885f6ad39b50d300b1b0f4ddbbeebdbc0 Mon Sep 17 00:00:00 2001
|
|
From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar@redhat.com>
|
|
Date: Wed, 15 Dec 2021 15:41:08 +0100
|
|
Subject: [PATCH] Allow tests to run from a read-only location
|
|
MIME-Version: 1.0
|
|
Content-Type: text/plain; charset=UTF-8
|
|
Content-Transfer-Encoding: 8bit
|
|
|
|
The tests creatd ./dist directory and later a temporary directetory
|
|
inside. This broken when running from a read-only location:
|
|
|
|
t/02_assert.t ... Error in tempdir() using dist/XXXXXXXXXX: Parent directory (dist) does not exist at t/02_assert.t line 11.
|
|
# Looks like your test exited with 2 before it could output anything.
|
|
t/02_assert.t ... Dubious, test returned 2 (wstat 512, 0x200)
|
|
|
|
This patch fixes it. It also fixes the strayed ./dist directory.
|
|
|
|
Signed-off-by: Petr Písař <ppisar@redhat.com>
|
|
---
|
|
t/01_dist.t | 3 +--
|
|
t/02_assert.t | 3 +--
|
|
2 files changed, 2 insertions(+), 4 deletions(-)
|
|
|
|
diff --git a/t/01_dist.t b/t/01_dist.t
|
|
index f22a91b..3968140 100644
|
|
--- a/t/01_dist.t
|
|
+++ b/t/01_dist.t
|
|
@@ -6,8 +6,7 @@ use File::Path qw[rmtree];
|
|
use Capture::Tiny qw[capture_merged];
|
|
|
|
{
|
|
-mkdir 'dist';
|
|
-my $tmpdir = tempdir( DIR => 'dist', CLEANUP => 1 );
|
|
+my $tmpdir = tempdir( CLEANUP => 1 );
|
|
chdir $tmpdir or die "$!\n";
|
|
open MFPL, '>Makefile.PL' or die "$!\n";
|
|
print MFPL <<'EOF';
|
|
diff --git a/t/02_assert.t b/t/02_assert.t
|
|
index a7fa98d..a652c70 100644
|
|
--- a/t/02_assert.t
|
|
+++ b/t/02_assert.t
|
|
@@ -6,8 +6,7 @@ use File::Path qw[rmtree];
|
|
use Capture::Tiny qw[capture_merged];
|
|
|
|
{
|
|
-mkdir 'dist';
|
|
-my $tmpdir = tempdir( DIR => 'dist', CLEANUP => 1 );
|
|
+my $tmpdir = tempdir( CLEANUP => 1 );
|
|
chdir $tmpdir or die "$!\n";
|
|
open MFPL, '>Makefile.PL' or die "$!\n";
|
|
print MFPL <<'EOF';
|
|
--
|
|
2.31.1
|
|
|