Rename test_tests.sh to test_tests_cli.sh
Also allow it to be run from its folder (by looking for ../bin/cli)
This commit is contained in:
parent
9025ef5eef
commit
f0cd857305
|
@ -2,6 +2,7 @@
|
||||||
|
|
||||||
# If you give first argument it will be a path to already cloned whck
|
# If you give first argument it will be a path to already cloned whck
|
||||||
|
|
||||||
|
# TODO: save exit codes of various tests so we can know how many failed
|
||||||
function testVariousScenarios() {
|
function testVariousScenarios() {
|
||||||
echo "Running various tests from "$(pwd)""
|
echo "Running various tests from "$(pwd)""
|
||||||
./test.sh || echo "ERROR running from repo"
|
./test.sh || echo "ERROR running from repo"
|
||||||
|
@ -20,12 +21,16 @@ if [ -z "$1" ]; then
|
||||||
# When no explicit dir, try ./ first, otherwise make a temporary dir
|
# When no explicit dir, try ./ first, otherwise make a temporary dir
|
||||||
if [ -x bin/cli ]; then
|
if [ -x bin/cli ]; then
|
||||||
testVariousScenarios
|
testVariousScenarios
|
||||||
|
elif [ -x ../bin/cli ]; then
|
||||||
|
cd ..
|
||||||
|
testVariousScenarios
|
||||||
else
|
else
|
||||||
TMPDIR="$(mktemp -d)"
|
TMPDIR="$(mktemp -d)"
|
||||||
cd "$TMPDIR"
|
cd "$TMPDIR"
|
||||||
git clone --recursive https://tildegit.org/forge/whck
|
git clone --recursive https://tildegit.org/forge/whck
|
||||||
cd whck
|
cd whck
|
||||||
testVariousScenarios
|
testVariousScenarios
|
||||||
|
cd "$ORIGDIR"
|
||||||
rm -rf "$TMPDIR"
|
rm -rf "$TMPDIR"
|
||||||
fi
|
fi
|
||||||
else
|
else
|
Loading…
Reference in New Issue
Block a user