From: Eric Wong <e@80x24.org>
To: meta@public-inbox.org
Cc: Eric Wong <e@80x24.org>
Subject: [PATCH 3/3] t/*: use identifiable tempdir names
Date: Mon, 29 Feb 2016 08:25:55 +0000 [thread overview]
Message-ID: <20160229082555.28323-4-e@80x24.org> (raw)
In-Reply-To: <20160229082555.28323-1-e@80x24.org>
This helps the admin nuke stuff in case our tests
are SIGKILL-ed or killed during teardown.
---
t/all.t | 6 +++---
| 4 ++--
t/git.t | 2 +-
| 2 +-
t/mda-conflict.t | 2 +-
t/mda-missing-mid.t | 2 +-
t/remover.t | 2 +-
7 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/t/all.t b/t/all.t
index 8bed302..d5680de 100644
--- a/t/all.t
+++ b/t/all.t
@@ -4,13 +4,13 @@
use strict;
use warnings;
use Test::More;
+use File::Temp qw/tempdir/;
+use Email::Simple;
# test all command-line interfaces at once
my $mda = "blib/script/ssoma-mda";
my $cli = "blib/script/ssoma";
my $rm = "blib/script/ssoma-rm";
-my $tmp = tempdir(CLEANUP => 1);
-use File::Temp qw/tempdir/;
-use Email::Simple;
+my $tmp = tempdir('ssoma-all-XXXXXX', CLEANUP => 1);
my $have_ipc_run = eval {
require IPC::Run;
import IPC::Run qw/run/;
--git a/t/extractor.t b/t/extractor.t
index 154e666..d2c0119 100644
--- a/t/extractor.t
+++ b/t/extractor.t
@@ -9,8 +9,8 @@ use Ssoma::Git;
use Ssoma::MDA;
use File::Temp qw/tempdir/;
-my $mdadir = tempdir(CLEANUP => 1);
-my $outdir = tempdir(CLEANUP => 1);
+my $mdadir = tempdir('ssoma-extractor-mda-XXXXXX', CLEANUP => 1);
+my $outdir = tempdir('ssoma-extractor-out-XXXXXX', CLEANUP => 1);
my $outgit = Ssoma::Git->new("$outdir/git");
my $ex = Ssoma::Extractor->new($outgit);
diff --git a/t/git.t b/t/git.t
index 3af517b..1588112 100644
--- a/t/git.t
+++ b/t/git.t
@@ -7,7 +7,7 @@ use Test::More;
use Ssoma::Git;
use Ssoma::GitIndexInfo;
use File::Temp qw/tempdir/;
-my $tmpdir = tempdir(CLEANUP => 1);
+my $tmpdir = tempdir('ssoma-git-XXXXXX', CLEANUP => 1);
my $git = Ssoma::Git->new("$tmpdir/gittest");
$git->init_db('-q');
--git a/t/mda-badheaders.t b/t/mda-badheaders.t
index d25c1e1..00d1495 100644
--- a/t/mda-badheaders.t
+++ b/t/mda-badheaders.t
@@ -10,7 +10,7 @@ use Email::Simple;
use Digest::SHA qw/sha1_hex/;
use File::Temp qw/tempdir/;
-my $tmpdir = tempdir(CLEANUP => 1);
+my $tmpdir = tempdir('ssoma-mda-badheaders-XXXXXX', CLEANUP => 1);
my $git = Ssoma::Git->new("$tmpdir/gittest");
$git->init_db('-q');
my $mda = Ssoma::MDA->new($git);
diff --git a/t/mda-conflict.t b/t/mda-conflict.t
index 5d3cd6a..2f77be3 100644
--- a/t/mda-conflict.t
+++ b/t/mda-conflict.t
@@ -10,7 +10,7 @@ use Email::Simple;
use Digest::SHA qw/sha1_hex/;
use File::Temp qw/tempdir/;
-my $tmpdir = tempdir(CLEANUP => 1);
+my $tmpdir = tempdir('ssoma-mda-conflict-XXXXXX', CLEANUP => 1);
my $git = Ssoma::Git->new("$tmpdir/gittest");
$git->init_db('-q');
my $mda = Ssoma::MDA->new($git);
diff --git a/t/mda-missing-mid.t b/t/mda-missing-mid.t
index b87a603..21a3540 100644
--- a/t/mda-missing-mid.t
+++ b/t/mda-missing-mid.t
@@ -8,7 +8,7 @@ use Ssoma::MDA;
use Ssoma::Git;
use Email::Simple;
use File::Temp qw/tempdir/;
-my $tmpdir = tempdir(CLEANUP => 1);
+my $tmpdir = tempdir('ssoma-mda-missing-mid-XXXXXX', CLEANUP => 1);
my $git = Ssoma::Git->new("$tmpdir/gittest");
$git->init_db('-q');
my $mda = Ssoma::MDA->new($git);
diff --git a/t/remover.t b/t/remover.t
index 9ddb7ff..d30f91d 100644
--- a/t/remover.t
+++ b/t/remover.t
@@ -11,7 +11,7 @@ use Email::Simple;
use Digest::SHA qw/sha1_hex/;
use File::Temp qw/tempdir/;
-my $tmpdir = tempdir(CLEANUP => 1);
+my $tmpdir = tempdir('ssoma-remover-XXXXXX', CLEANUP => 1);
my $git_dir = "$tmpdir/gittest";
my $git = Ssoma::Git->new($git_dir);
$git->init_db('-q');
--
EW
next prev parent reply other threads:[~2016-02-29 8:25 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-29 8:25 [ssoma PATCH 0/3] test output cleanups Eric Wong
2016-02-29 8:25 ` [PATCH 1/3] t/*.t: quiet down "git init" Eric Wong
2016-02-29 8:25 ` [PATCH 2/3] t/: try to ensure test output is stable Eric Wong
2016-02-29 8:25 ` Eric Wong [this message]
2016-03-01 5:21 ` [PATCH] copyright updates for 2016 Eric Wong
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://public-inbox.org/README
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20160229082555.28323-4-e@80x24.org \
--to=e@80x24.org \
--cc=meta@public-inbox.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).