summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorEgor Tensin <egor@tensin.name>2026-09-28 14:29:49 +0500
committerEgor Tensin <egor@tensin.name>2026-09-28 14:29:49 +0500
commit67d0301cbdd216e5b4b55fdd20bacbab9cbc85b5 (patch)
tree9466e500dc845d0da47713a8dce3aadd28145676
parentMakefile: do nothing on all: (diff)
downloadconfig-links-67d0301cbdd216e5b4b55fdd20bacbab9cbc85b5.tar.gz
config-links-67d0301cbdd216e5b4b55fdd20bacbab9cbc85b5.zip
tst-linux-home.sh: don't run inside pbuilderv2.1.8
-rw-r--r--test/tst-linux-home.sh17
1 files changed, 13 insertions, 4 deletions
diff --git a/test/tst-linux-home.sh b/test/tst-linux-home.sh
index 4d099ee..83c70f4 100644
--- a/test/tst-linux-home.sh
+++ b/test/tst-linux-home.sh
@@ -1,10 +1,19 @@
-[ -z "${CI+y}" ] && test_should_fail=y
-
-test_run() {
+_test_should_fail() {
if [ -z "${CI+y}" ]; then
fail "Don't run this test locally, it'll mess up your \$HOME"
- return 1
+ return 0
fi
+ if ! command -v git &> /dev/null; then
+ fail "git isn't available, assuming running inside a pbuilder"
+ return 0
+ fi
+ return 1
+}
+
+_test_should_fail 2> /dev/null && test_should_fail=y
+
+test_run() {
+ _test_should_fail && return 1
readonly src_name=linux-home
src_url="https://github.com/egor-tensin/$src_name.git"