OSDN Git Service

tests: remove t-lib.sh
authorJim Meyering <meyering@redhat.com>
Sat, 20 Nov 2010 11:35:59 +0000 (12:35 +0100)
committerJim Meyering <meyering@redhat.com>
Sat, 20 Nov 2010 16:04:35 +0000 (17:04 +0100)
* tests/t-lib.sh: Remove file.  No longer used.
* tests/Makefile.am (EXTRA_DIST): Remove t-lib.sh.
* tests/t-lib-helpers.sh: Don't mention this file name.
* tests/t-local.sh: Likewise.

tests/Makefile.am
tests/t-lib-helpers.sh
tests/t-lib.sh [deleted file]
tests/t-local.sh

index c35d404..ffea90c 100644 (file)
@@ -48,7 +48,7 @@ TESTS = \
   t9040-many-partitions.sh
 
 EXTRA_DIST = \
-  $(TESTS) t-lib.sh lvm-utils.sh t-local.sh t-lvm.sh \
+  $(TESTS) lvm-utils.sh t-local.sh t-lvm.sh \
   init.cfg init.sh t-lib-helpers.sh
 
 check_PROGRAMS = print-align print-max dup-clobber
index f35f9cc..9411870 100644 (file)
@@ -1,4 +1,4 @@
-# Functions sourced by t-lib.sh and init.cfg
+# Functions sourced via testing framework.
 
 getlimits_()
 {
diff --git a/tests/t-lib.sh b/tests/t-lib.sh
deleted file mode 100644 (file)
index 440b2c9..0000000
+++ /dev/null
@@ -1,94 +0,0 @@
-# source this file; set up for tests
-
-# Copyright (C) 2009-2010 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
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-
-# You should have received a copy of the GNU General Public License
-# along with this program.  If not, see <http://www.gnu.org/licenses/>.
-
-# Skip this test if the shell lacks support for functions.
-unset function_test
-eval 'function_test() { return 11; }; function_test'
-if test $? != 11; then
-  echo "$0: /bin/sh lacks support for functions; skipping this test." 1>&2
-  Exit 77
-fi
-
-skip_()
-{
-  echo "$0: skipping test: $@" | head -1 1>&9
-  echo "$0: skipping test: $@" 1>&2
-  Exit 77
-}
-
-fail_()
-{
-  echo "$0: failed test: $@" | head -1 1>&9
-  echo "$0: failed test: $@" 1>&2
-  Exit 1
-}
-
-# We use a trap below for cleanup.  This requires us to go through
-# hoops to get the right exit status transported through the signal.
-# So use `Exit STATUS' instead of `exit STATUS' inside of the tests.
-# Turn off errexit here so that we don't trip the bug with OSF1/Tru64
-# sh inside this function.
-Exit ()
-{
-  set +e
-  (exit $1)
-  exit $1
-}
-
-test_dir_=$(pwd)
-
-this_test_() { echo "./$0" | sed 's,.*/,,'; }
-this_test=$(this_test_)
-
-# This is a stub function that is run upon trap (upon regular exit and
-# interrupt).  Override it with a per-test function, e.g., to unmount
-# a partition, or to undo any other global state changes.
-cleanup_() { :; }
-
-t_=$(mktemp -d --tmp="$test_dir_" pe-$this_test.XXXXXXXXXX)\
-    || error_ "failed to create temporary directory in $test_dir_"
-
-# Eval the following upon cleanup.
-# This is useful if you have more than than one cleanup function,
-# and for encapsulated cleanup functions; append any addition.
-cleanup_eval_=':'
-
-remove_tmp_()
-{
-  __st=$?
-  cleanup_
-  test -n "$cleanup_eval_" && eval "$cleanup_eval_"
-  cd "$test_dir_" && chmod -R u+rwx "$t_" && rm -rf "$t_" && exit $__st
-}
-
-. $srcdir/t-local.sh
-. $srcdir/t-lib-helpers.sh
-
-# Run each test from within a temporary sub-directory named after the
-# test itself, and arrange to remove it upon exception or normal exit.
-trap remove_tmp_ 0
-trap 'Exit $?' 1 2 13 15
-
-cd "$t_" || error_ "failed to cd to $t_"
-
-if ( diff --version < /dev/null 2>&1 | grep GNU ) 2>&1 > /dev/null; then
-  compare() { diff -u "$@"; }
-elif ( cmp --version < /dev/null 2>&1 | grep GNU ) 2>&1 > /dev/null; then
-  compare() { cmp -s "$@"; }
-else
-  compare() { cmp "$@"; }
-fi
index 5f63138..67f1051 100644 (file)
@@ -1,5 +1,5 @@
 # Put test-related bits that are parted-specific here.
-# This file is sourced from near the end of t-lib.sh.
+# This file is sourced from the testing framework.
 sector_size_=${PARTED_SECTOR_SIZE:-512}
 
 scsi_debug_lock_file_="$abs_srcdir/scsi_debug.lock"