From df0beae1eb1318869d51a064aec8fdd401877cbf Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Thu, 6 Sep 2007 17:34:49 +0200 Subject: Adjust chgrp, chmod, chown, cp tests to use test-lib.sh. * tests/check.mk: Also define abs_top_builddir. --- tests/cp/cp-parents | 37 ++++++++----------------------------- 1 file changed, 8 insertions(+), 29 deletions(-) (limited to 'tests/cp/cp-parents') diff --git a/tests/cp/cp-parents b/tests/cp/cp-parents index 76c63be52..4500e5f48 100755 --- a/tests/cp/cp-parents +++ b/tests/cp/cp-parents @@ -2,7 +2,7 @@ # cp -R --parents dir-specified-with-trailing-slash/ other-dir # would get a failed assertion. -# Copyright (C) 2000, 2002, 2004, 2005, 2006, 2007 Free Software +# Copyright (C) 2000, 2002, 2004, 2005, 2006-2007 Free Software # Foundation, Inc. # This program is free software: you can redistribute it and/or modify @@ -23,37 +23,16 @@ if test "$VERBOSE" = yes; then mv --version fi -umask 022 - -pwd=`pwd` -t0=`echo "$0"|sed 's,.*/,,'`.tmp;tmp=$t0/$$ -trap 'status=$?; cd "$pwd" && exec 1>&2; rm -rf $t0 && exit $status' 0 -trap '(exit $?); exit' 1 2 13 15 - -framework_failure=0 - -# Record absolute path of srcdir and cd back to current dir. -cd $srcdir || framework_failure=1 -abs_srcdir=`pwd` -cd "$pwd" || framework_failure=1 - -. $srcdir/../envvar-check . $srcdir/../umask-check +. $srcdir/../test-lib.sh -mkdir -p $tmp || framework_failure=1 -cd $tmp || framework_failure=1 +# Run the setgid check from the just-created directory. +. "$abs_top_srcdir/tests/setgid-check" -. "$abs_srcdir/../setgid-check" - -mkdir foo bar || framework_failure=1 -mkdir -p a/b/c d e g || framework_failure=1 -ln -s d/a sym || framework_failure=1 -touch f || framework_failure=1 - -if test $framework_failure = 1; then - echo 'failure in testing framework' - exit 1 -fi +mkdir foo bar || framework_failure +mkdir -p a/b/c d e g || framework_failure +ln -s d/a sym || framework_failure +touch f || framework_failure fail=0 -- cgit v1.2.3-54-g00ecf