summaryrefslogtreecommitdiff
path: root/tests/install/trap
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2007-09-08 09:22:49 +0200
committerJim Meyering <jim@meyering.net>2007-09-15 08:40:38 +0200
commit74ffe86ed05cd6bab4b9d31d63cf94637f867c04 (patch)
tree96e8be7c1101c94d4f51969011cd761de9265d63 /tests/install/trap
parenta0cbaa4fc80a6b75b4f3b09f46a05702449fd7e4 (diff)
downloadcoreutils-74ffe86ed05cd6bab4b9d31d63cf94637f867c04.tar.xz
Convert tests/install/, too.
Diffstat (limited to 'tests/install/trap')
-rwxr-xr-xtests/install/trap20
1 files changed, 4 insertions, 16 deletions
diff --git a/tests/install/trap b/tests/install/trap
index 12e3b5f86..a4f9fa868 100755
--- a/tests/install/trap
+++ b/tests/install/trap
@@ -2,7 +2,7 @@
# Ensure that `install -s' doesn't infloop when its parent
# process traps CHLD signal.
-# Copyright (C) 2004, 2005, 2006 Free Software Foundation, Inc.
+# Copyright (C) 2004-2007 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -22,29 +22,17 @@ if test "$VERBOSE" = yes; then
ginstall --version
fi
-pwd=`pwd`
-t0=`echo "$0"|sed 's,.*/,,'`.tmp; tmp=$t0/$$
-trap 'status=$?; cd "$pwd" && chmod -R u+rwx $t0 && rm -rf $t0 && exit $status' 0
-trap '(exit $?); exit $?' 1 2 13 15
-
-framework_failure=0
-mkdir -p $tmp || framework_failure=1
-cd $tmp || framework_failure=1
-
-if test $framework_failure = 1; then
- echo "$0: failure in testing framework" 1>&2
- (exit 1); exit 1
-fi
+. $srcdir/../test-lib.sh
fail=0
# Use a subshell and an exec to work around a bug in FreeBSD 5.0 /bin/sh.
(
# ash doesn't support "trap '' CHLD"; it knows only signal numbers.
- sig=`"$pwd/../../src/kill" -l CHLD 2>/dev/null` && trap '' $sig
+ sig=`"$abs_top_builddir/src/kill" -l CHLD 2>/dev/null` && trap '' $sig
# Before 2004-04-21, install would infloop, in the `while (wait...' loop:
- exec ginstall -s "$pwd/../../src/ginstall$EXEEXT" .
+ exec ginstall -s "$abs_top_builddir/src/ginstall$EXEEXT" .
)
(exit $fail); exit $fail