summaryrefslogtreecommitdiff
path: root/tests/test-lib.sh
diff options
context:
space:
mode:
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 8872b27b1..a3afba0bf 100644
--- a/tests/test-lib.sh
+++ b/tests/test-lib.sh
@@ -29,6 +29,19 @@ require_ulimit_()
&& skip_test_ "this shell lacks ulimit support"
}
+require_built_()
+{
+ skip_=no
+ for i in "$@"; do
+ case " $built_programs " in
+ *" $i "*) ;;
+ *) echo "$i: not built" 1>&2; skip_=yes ;;
+ esac
+ done
+
+ test $skip_ = yes && skip_test_ "required program(s) not built"
+}
+
uid_is_privileged_()
{
# Make sure id -u succeeds.