From b78c6b68f77d55b6aeb57853a2f5e2bf312584c1 Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Sat, 18 Aug 2007 08:50:00 +0200 Subject: Run each Coreutils.pm-based test in its own subdirectory. * tests/CuTmpdir.pm: New file. * tests/Makefile.am (EXTRA_DIST): Add CuTmpdir.pm. * tests/misc/od, tests/misc/base64, tests/misc/basename: * tests/misc/cut, tests/misc/date, tests/misc/dirname: * tests/misc/expand, tests/misc/fold, tests/misc/head-elide-tail: * tests/misc/paste-no-nl, tests/misc/pr, tests/misc/sha224sum: * tests/misc/sha256sum, tests/misc/sha384sum, tests/misc/sha512sum: * tests/misc/sort-merge, tests/misc/stat-printf, tests/misc/test-diag: * tests/misc/wc-files0-from, tests/misc/xstrtol: * tests/dd/skip-seek, tests/dircolors/simple, tests/du/files0-from: * tests/expr/basic, tests/factor/basic, tests/fmt/basic: * tests/ls-2/tests, tests/md5sum/basic-1, tests/md5sum/newline-1: * tests/seq/basic, tests/sha1sum/basic-1, tests/sha1sum/sample-vec: * tests/sum/basic-1, tests/tsort/basic-1, tests/unexpand/basic-1: * tests/mv/i-1, tests/rm/empty-name, tests/rm/unreadable: Use it. * tests/misc/test-diag: Use "$ENV{abs_top_builddir}/src/test", not "../../src/test", so it works when run from a subdirectory. * tests/ls-2/tests: Create temp files and dirs from within the perl script, so that they're removed, when run from a subdirectory. --- tests/rm/empty-name | 3 ++- tests/rm/unreadable | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'tests/rm') diff --git a/tests/rm/empty-name b/tests/rm/empty-name index 43ec11ce7..b709dff1d 100755 --- a/tests/rm/empty-name +++ b/tests/rm/empty-name @@ -30,7 +30,8 @@ $PERL -e 1 > /dev/null 2>&1 || { exit 77 } -exec $PERL -w -I$srcdir/.. -MCoreutils -- - << \EOF +me=`echo $0|sed 's,.*/,,'` +exec $PERL -w -I$srcdir/.. -MCoreutils -M"CuTmpdir qw($me)" -- - << \EOF require 5.003; use strict; diff --git a/tests/rm/unreadable b/tests/rm/unreadable index 75b1210e1..c5b9c9877 100755 --- a/tests/rm/unreadable +++ b/tests/rm/unreadable @@ -25,7 +25,8 @@ $PERL -e 1 > /dev/null 2>&1 || { exit 77 } -exec $PERL -w -I$srcdir/.. -MCoreutils -- - << \EOF +me=`echo $0|sed 's,.*/,,'` +exec $PERL -w -I$srcdir/.. -MCoreutils -M"CuTmpdir qw($me)" -- - << \EOF require 5.003; use strict; -- cgit v1.2.3-70-g09d2