mirror of
https://github.com/vgough/encfs.git
synced 2024-11-21 23:43:26 +01:00
9e394a46c0
We had the situation that "make test" runs the test suite but does not show useful error messages (see https://github.com/vgough/encfs/issues/358 for an example). "make check" did the right thing by using the "--output-on-failure" feature, but depended on "make test" being available as well. This means users will continue to run "make test". This commits drops the cmake test logic and adds a dumb "make test" target that simply runs test.sh.
19 lines
563 B
Bash
Executable File
19 lines
563 B
Bash
Executable File
#!/bin/bash -eu
|
|
|
|
# Make sure we are in the directory this script is in.
|
|
cd "$(dirname "$0")"
|
|
|
|
# Failed tests can leave dangling mounts behind.
|
|
for i in $(mount | grep -e "/tmp/encfs-reverse-tests-\|/tmp/encfs-tests-" | cut -f3 -d" "); do
|
|
echo "Warning: unmounting leftover filesystem: $i"
|
|
fusermount -u $i || true
|
|
done
|
|
|
|
set -x
|
|
|
|
# This is very noisy so run it silently at first. Run it again with
|
|
# output if the first run fails.
|
|
./build/checkops &> /dev/null || ./build/checkops
|
|
|
|
perl -MTest::Harness -e '$$Test::Harness::debug=1; runtests @ARGV;' tests/*.t.pl
|