ostree/debian/patches/libtest.sh-only-check-wheth...

32 lines
1.1 KiB
Diff

From: Simon McVittie <smcv@debian.org>
Date: Thu, 31 Mar 2016 17:52:57 +0100
Subject: libtest.sh: only check whether $(pwd) is empty once
test-sysroot.js runs libtestExec() twice, one of which is after
creating non-hidden directories in $(pwd), so this check needs to be
skipped the second time.
Signed-off-by: Simon McVittie <smcv@debian.org>
Applied-upstream: 2016.5, commit:https://github.com/ostreedev/ostree/commit/18e9169d7ae76149833475c14f4c7147f6f91c9e
---
tests/libtest.sh | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/tests/libtest.sh b/tests/libtest.sh
index f588e65..f22ba4b 100755
--- a/tests/libtest.sh
+++ b/tests/libtest.sh
@@ -41,8 +41,12 @@ test_tmpdir=$(pwd)
if ! test -f .testtmp; then
files=$(ls)
if test -n "${files}"; then
+ ls -l
assert_not_reached "test tmpdir=${test_tmpdir} is not empty; run this test via \`make check TESTS=\`, not directly"
fi
+ # Remember that this is an acceptable test $(pwd), for the benefit of
+ # C and JS tests which may source this file again
+ touch .testtmp
fi
export G_DEBUG=fatal-warnings