From 67d0301cbdd216e5b4b55fdd20bacbab9cbc85b5 Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Mon, 28 Sep 2026 14:29:49 +0500 Subject: tst-linux-home.sh: don't run inside pbuilder --- test/tst-linux-home.sh | 17 +++++++++++++---- 1 file 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" -- cgit v1.3