summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJim Meyering <meyering@redhat.com>2008-05-27 13:24:20 +0200
committerJim Meyering <meyering@redhat.com>2008-05-27 13:30:44 +0200
commitc6c9e8730e23af5d96a3b25331b0510112422abb (patch)
tree0f3feaaa13695cc8c96bc4f8d795487d25cf93ac
parent8976a2b27e9f1755a6d9ee3bc85602aea007ec5d (diff)
downloadcoreutils-c6c9e8730e23af5d96a3b25331b0510112422abb.tar.xz
prefer abs_srcdir over abs_top_srcdir, ...
so that e.g., tests/* may refer to absolute names without hard-coding the name of the containing directory (tests/, here). * tests/check.mk (TESTS_ENVIRONMENT): Define abs_srcdir. * tests/pr/pr-tests: Use $abs_srcdir/pr not $abs_top_srcdir/tests/pr. * tests/chmod/c-option: Use $abs_srcdir, not $abs_top_srcdir/tests. * tests/cp/cp-parents: Likewise. * tests/mkdir/parents: Likewise. * tests/mkdir/perm: Likewise. * tests/mv/acl: Likewise. * tests/mv/backup-is-src: Likewise. * tests/mv/hard-link-1: Likewise. * tests/mv/into-self-2: Likewise. * tests/mv/leak-fd: Likewise. * tests/mv/mv-special-1: Likewise. * tests/mv/part-fail: Likewise. * tests/mv/part-hardlink: Likewise. * tests/mv/part-rename: Likewise. * tests/mv/part-symlink: Likewise. * tests/mv/partition-perm: Likewise. * tests/mv/sticky-to-xpart: Likewise. * tests/mv/to-symlink: Likewise. * tests/rm/one-file-system: Likewise. * tests/sample-test: Likewise.
-rw-r--r--tests/check.mk1
-rwxr-xr-xtests/chmod/c-option2
-rwxr-xr-xtests/cp/cp-parents2
-rwxr-xr-xtests/mkdir/parents2
-rwxr-xr-xtests/mkdir/perm2
-rwxr-xr-xtests/mv/acl2
-rwxr-xr-xtests/mv/backup-is-src2
-rwxr-xr-xtests/mv/hard-link-12
-rwxr-xr-xtests/mv/into-self-22
-rwxr-xr-xtests/mv/leak-fd2
-rwxr-xr-xtests/mv/mv-special-12
-rwxr-xr-xtests/mv/part-fail2
-rwxr-xr-xtests/mv/part-hardlink2
-rwxr-xr-xtests/mv/part-rename2
-rwxr-xr-xtests/mv/part-symlink2
-rwxr-xr-xtests/mv/partition-perm2
-rwxr-xr-xtests/mv/sticky-to-xpart2
-rwxr-xr-xtests/mv/to-symlink2
-rwxr-xr-xtests/pr/pr-tests2
-rwxr-xr-xtests/rm/one-file-system2
-rw-r--r--tests/sample-test2
21 files changed, 21 insertions, 20 deletions
diff --git a/tests/check.mk b/tests/check.mk
index feb4fc040..5cb8b781e 100644
--- a/tests/check.mk
+++ b/tests/check.mk
@@ -70,6 +70,7 @@ TESTS_ENVIRONMENT = \
LOCALE_FR='$(LOCALE_FR)' \
abs_top_builddir='$(abs_top_builddir)' \
abs_top_srcdir='$(abs_top_srcdir)' \
+ abs_srcdir='$(abs_srcdir)' \
built_programs="`$(built_programs)`" \
host_os=$(host_os) \
host_triplet='$(host_triplet)' \
diff --git a/tests/chmod/c-option b/tests/chmod/c-option
index e756b5be8..461b6faa2 100755
--- a/tests/chmod/c-option
+++ b/tests/chmod/c-option
@@ -28,7 +28,7 @@ file=f
touch $file || framework_failure
chmod 444 $file || framework_failure
-. "$abs_top_srcdir/tests/setgid-check"
+. "$abs_srcdir/setgid-check"
fail=0
diff --git a/tests/cp/cp-parents b/tests/cp/cp-parents
index 5b3913a7f..3394265bb 100755
--- a/tests/cp/cp-parents
+++ b/tests/cp/cp-parents
@@ -28,7 +28,7 @@ fi
working_umask_or_skip_
# Run the setgid check from the just-created directory.
-. "$abs_top_srcdir/tests/setgid-check"
+. "$abs_srcdir/setgid-check"
mkdir foo bar || framework_failure
mkdir -p a/b/c d e g || framework_failure
diff --git a/tests/mkdir/parents b/tests/mkdir/parents
index 72fb05a4b..2aee87e6f 100755
--- a/tests/mkdir/parents
+++ b/tests/mkdir/parents
@@ -22,7 +22,7 @@ if test "$VERBOSE" = yes; then
fi
. $top_srcdir/tests/test-lib.sh
-. "$abs_top_srcdir/tests/setgid-check"
+. "$abs_srcdir/setgid-check"
mkdir -m 700 e-dir || framework_failure
diff --git a/tests/mkdir/perm b/tests/mkdir/perm
index 5e010139d..6df1d4339 100755
--- a/tests/mkdir/perm
+++ b/tests/mkdir/perm
@@ -23,7 +23,7 @@ if test "$VERBOSE" = yes; then
fi
. $top_srcdir/tests/test-lib.sh
-. "$abs_top_srcdir/tests/setgid-check"
+. "$abs_srcdir/setgid-check"
working_umask_or_skip_
diff --git a/tests/mv/acl b/tests/mv/acl
index 858c2aff9..536391a68 100755
--- a/tests/mv/acl
+++ b/tests/mv/acl
@@ -32,7 +32,7 @@ grep '^#define USE_ACL 0' $CONFIG_HEADER > /dev/null &&
skip_test_ "insufficient ACL support"
cleanup_() { rm -rf "$other_partition_tmpdir"; }
-. "$abs_top_srcdir/tests/other-fs-tmpdir"
+. "$abs_srcdir/other-fs-tmpdir"
touch file || framework_failure
t1=$other_partition_tmpdir/t1
diff --git a/tests/mv/backup-is-src b/tests/mv/backup-is-src
index 3335d0758..3c41ecba8 100755
--- a/tests/mv/backup-is-src
+++ b/tests/mv/backup-is-src
@@ -23,7 +23,7 @@ fi
. $top_srcdir/tests/test-lib.sh
cleanup_() { rm -rf "$other_partition_tmpdir"; }
-. "$abs_top_srcdir/tests/other-fs-tmpdir"
+. "$abs_srcdir/other-fs-tmpdir"
a="$other_partition_tmpdir/a"
a2="$other_partition_tmpdir/a~"
diff --git a/tests/mv/hard-link-1 b/tests/mv/hard-link-1
index 6afaeade6..fd586aeca 100755
--- a/tests/mv/hard-link-1
+++ b/tests/mv/hard-link-1
@@ -24,7 +24,7 @@ fi
. $top_srcdir/tests/test-lib.sh
cleanup_() { rm -rf "$other_partition_tmpdir"; }
-. "$abs_top_srcdir/tests/other-fs-tmpdir"
+. "$abs_srcdir/other-fs-tmpdir"
dir=hlink
diff --git a/tests/mv/into-self-2 b/tests/mv/into-self-2
index 32801a3a4..ffc97c316 100755
--- a/tests/mv/into-self-2
+++ b/tests/mv/into-self-2
@@ -25,7 +25,7 @@ fi
. $top_srcdir/tests/test-lib.sh
cleanup_() { rm -rf "$other_partition_tmpdir"; }
-. "$abs_top_srcdir/tests/other-fs-tmpdir"
+. "$abs_srcdir/other-fs-tmpdir"
file="$other_partition_tmpdir/file"
symlink=symlink
diff --git a/tests/mv/leak-fd b/tests/mv/leak-fd
index 1ecdb20c4..127a826ab 100755
--- a/tests/mv/leak-fd
+++ b/tests/mv/leak-fd
@@ -26,7 +26,7 @@ fi
. $top_srcdir/tests/test-lib.sh
skip_if_root_
cleanup_() { rm -rf "$other_partition_tmpdir"; }
-. "$abs_top_srcdir/tests/other-fs-tmpdir"
+. "$abs_srcdir/other-fs-tmpdir"
# This test is relatively expensive, and might well evoke a
# framework-failure on systems with a smaller command-line length
diff --git a/tests/mv/mv-special-1 b/tests/mv/mv-special-1
index d883f5b12..ff4869fc2 100755
--- a/tests/mv/mv-special-1
+++ b/tests/mv/mv-special-1
@@ -24,7 +24,7 @@ fi
. $top_srcdir/tests/test-lib.sh
cleanup_() { rm -rf "$other_partition_tmpdir"; }
-. "$abs_top_srcdir/tests/other-fs-tmpdir"
+. "$abs_srcdir/other-fs-tmpdir"
null=mv-null
dir=mv-dir
diff --git a/tests/mv/part-fail b/tests/mv/part-fail
index e5396c2c6..fdbab1d7d 100755
--- a/tests/mv/part-fail
+++ b/tests/mv/part-fail
@@ -27,7 +27,7 @@ fi
. $top_srcdir/tests/test-lib.sh
skip_if_root_
cleanup_() { t=$other_partition_tmpdir; chmod -R 700 "$t"; rm -rf "$t"; }
-. "$abs_top_srcdir/tests/other-fs-tmpdir"
+. "$abs_srcdir/other-fs-tmpdir"
touch k $other_partition_tmpdir/k || framework_failure
chmod u-w $other_partition_tmpdir || framework_failure
diff --git a/tests/mv/part-hardlink b/tests/mv/part-hardlink
index fed5bcf34..8f83fcf27 100755
--- a/tests/mv/part-hardlink
+++ b/tests/mv/part-hardlink
@@ -26,7 +26,7 @@ fi
. $top_srcdir/tests/test-lib.sh
cleanup_() { rm -rf "$other_partition_tmpdir"; }
-. "$abs_top_srcdir/tests/other-fs-tmpdir"
+. "$abs_srcdir/other-fs-tmpdir"
touch f || framework_failure
ln f g || framework_failure
diff --git a/tests/mv/part-rename b/tests/mv/part-rename
index 30913ec10..009c6d443 100755
--- a/tests/mv/part-rename
+++ b/tests/mv/part-rename
@@ -25,7 +25,7 @@ fi
. $top_srcdir/tests/test-lib.sh
cleanup_() { rm -rf "$other_partition_tmpdir"; }
-. "$abs_top_srcdir/tests/other-fs-tmpdir"
+. "$abs_srcdir/other-fs-tmpdir"
mkdir foo || framework_failure
diff --git a/tests/mv/part-symlink b/tests/mv/part-symlink
index 0b7e21347..68c46f9ea 100755
--- a/tests/mv/part-symlink
+++ b/tests/mv/part-symlink
@@ -25,7 +25,7 @@ fi
. $top_srcdir/tests/test-lib.sh
cleanup_() { rm -rf "$other_partition_tmpdir"; }
-. "$abs_top_srcdir/tests/other-fs-tmpdir"
+. "$abs_srcdir/other-fs-tmpdir"
pwd_tmp=`pwd`
diff --git a/tests/mv/partition-perm b/tests/mv/partition-perm
index ca32e473f..a8ca44c8e 100755
--- a/tests/mv/partition-perm
+++ b/tests/mv/partition-perm
@@ -23,7 +23,7 @@ fi
. $top_srcdir/tests/test-lib.sh
cleanup_() { rm -rf "$other_partition_tmpdir"; }
-. "$abs_top_srcdir/tests/other-fs-tmpdir"
+. "$abs_srcdir/other-fs-tmpdir"
: > file
chmod a=rwx file
diff --git a/tests/mv/sticky-to-xpart b/tests/mv/sticky-to-xpart
index d0e90c1ac..38f383692 100755
--- a/tests/mv/sticky-to-xpart
+++ b/tests/mv/sticky-to-xpart
@@ -28,7 +28,7 @@ fi
require_root_
cleanup_() { rm -rf "$other_partition_tmpdir"; }
-. "$abs_top_srcdir/tests/other-fs-tmpdir"
+. "$abs_srcdir/other-fs-tmpdir"
# Set up to run a test where non-root user tries to move a root-owned
# file from a sticky tmpdir to a directory owned by that user on
diff --git a/tests/mv/to-symlink b/tests/mv/to-symlink
index b265a3e31..12f1447d1 100755
--- a/tests/mv/to-symlink
+++ b/tests/mv/to-symlink
@@ -24,7 +24,7 @@ fi
. $top_srcdir/tests/test-lib.sh
cleanup_() { rm -rf "$other_partition_tmpdir"; }
-. "$abs_top_srcdir/tests/other-fs-tmpdir"
+. "$abs_srcdir/other-fs-tmpdir"
rem_file="$other_partition_tmpdir/file"
rem_symlink="$other_partition_tmpdir/symlink"
diff --git a/tests/pr/pr-tests b/tests/pr/pr-tests
index b5fe2e09e..f5a32a8f4 100755
--- a/tests/pr/pr-tests
+++ b/tests/pr/pr-tests
@@ -394,7 +394,7 @@ my @tv = (
# Convert the above old-style test vectors to the newer
# format used by Coreutils.pm.
-my $pfx = "$ENV{abs_top_srcdir}/tests/pr";
+my $pfx = "$ENV{abs_srcdir}/pr";
# Normalize otherwise-variable output page headers.
my $common_option_prefix = '--date-format="-- Date/Time --" -h x';
diff --git a/tests/rm/one-file-system b/tests/rm/one-file-system
index eb8482de8..0030f3437 100755
--- a/tests/rm/one-file-system
+++ b/tests/rm/one-file-system
@@ -26,7 +26,7 @@ require_root_
# If used, these must *follow* test-lib.sh.
cleanup_() { rm -rf "$other_partition_tmpdir"; }
-. "$abs_top_srcdir/tests/other-fs-tmpdir"
+. "$abs_srcdir/other-fs-tmpdir"
t=$other_partition_tmpdir
mkdir -p a/b $t/y
diff --git a/tests/sample-test b/tests/sample-test
index e6ef5b6fa..a9ec3a48c 100644
--- a/tests/sample-test
+++ b/tests/sample-test
@@ -28,7 +28,7 @@ fi
# If used, these must *follow* test-lib.sh.
# FIXME: cleanup_() { rm -rf "$other_partition_tmpdir"; }
-# FIXME: . "$abs_top_srcdir/tests/other-fs-tmpdir"
+# FIXME: . "$abs_srcdir/other-fs-tmpdir"
fail=0
FIXME > out || fail=1