summaryrefslogtreecommitdiff
path: root/tests/test-lib.sh
diff options
context:
space:
mode:
authorJim Meyering <meyering@redhat.com>2007-11-30 23:22:21 +0100
committerJim Meyering <meyering@redhat.com>2008-02-09 10:30:33 +0100
commit52d9bba7126de635eb356e3b379c5e4659ce2462 (patch)
tree2de754ceff1eebc737d58b5b5b5e118cf9ab987d /tests/test-lib.sh
parent0f197c8acd0b74a4496284491b59ceea84f8652b (diff)
downloadcoreutils-52d9bba7126de635eb356e3b379c5e4659ce2462.tar.xz
tests: move the very-expensive file into test-lib.sh
* tests/very-expensive: Remove file. * tests/test-lib.sh (very_expensive_): New function. * tests/Makefile.am (EXTRA_DIST): Remove very-expensive. * tests/cp/perm: Call the new function, rather than sourcing the file. * tests/tail-2/assert: Likewise. * tests/tail-2/assert-2: Likewise. * tests/du/2g: Likewise.
Diffstat (limited to 'tests/test-lib.sh')
-rw-r--r--tests/test-lib.sh13
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/test-lib.sh b/tests/test-lib.sh
index cfc386a1a..3b8d2ce98 100644
--- a/tests/test-lib.sh
+++ b/tests/test-lib.sh
@@ -87,6 +87,19 @@ require_selinux_()
esac
}
+very_expensive_()
+{
+ if test "$RUN_VERY_EXPENSIVE_TESTS" != yes; then
+ skip_test_ '
+This test is very expensive, so it is disabled by default.
+To run it anyway, rerun make check with the RUN_VERY_EXPENSIVE_TESTS
+environment variable set to yes. E.g.,
+
+ env RUN_VERY_EXPENSIVE_TESTS=yes make check
+'
+ fi
+}
+
skip_if_root_() { uid_is_privileged_ && skip_test_ "must be run as non-root"; }
error_() { echo "$0: $@" 1>&2; (exit 1); exit 1; }
framework_failure() { error_ 'failure in testing framework'; }