]> tinc-vpn.org Git - tinc/blobdiff - test/testlib.sh.in
Improve failure detection in the test suite.
[tinc] / test / testlib.sh.in
index 047db870e7fb0c68015467b7de77a8b2547cd32b..c63d27d13858ae659cf6f8fc7bd66138bb8a2717 100644 (file)
@@ -185,21 +185,11 @@ expect_code() {
 # Runs its arguments with timeout(1) or gtimeout(1) if either are installed.
 # Usage: try_limit_time 10 command --with --args
 if type timeout >/dev/null; then
-  if is_busybox; then
-    # busybox does not support --foreground
-    try_limit_time() {
-      time=$1
-      shift
-      timeout "$time" "$@"
-    }
-  else
-    # BSD and GNU timeout do not require special handling
-    try_limit_time() {
-      time=$1
-      shift
-      timeout --foreground "$time" "$@"
-    }
-  fi
+  try_limit_time() {
+    time=$1
+    shift
+    timeout "$time" "$@"
+  }
 else
   try_limit_time() {
     echo >&2 "timeout was not found, running without time limits!"