Can run tests from another folder
This commit is contained in:
parent
5fc4ff5601
commit
c0e3bc6497
7
test.sh
7
test.sh
|
@ -15,6 +15,9 @@
|
|||
# Please don't do weird things
|
||||
shopt -s nullglob
|
||||
|
||||
# Find where test.sh is so that we can find the tests/ folder relative to it
|
||||
SPECDIR="$(dirname "$0")"
|
||||
|
||||
# Run the test suite against a binary
|
||||
# $1 is executable
|
||||
# $2, if any, is test results folder
|
||||
|
@ -50,7 +53,7 @@ runTests() {
|
|||
# and ti's served as table for test results in results.toml
|
||||
echo "[$TIMESTAMP-$commit]" >> $TESTDIR/results.toml
|
||||
echo "$TIMESTAMP-$commit" > "$TESTDIR"/latest
|
||||
for test in tests/*.bats; do
|
||||
for test in "$SPECDIR"/tests/*.bats; do
|
||||
testname="$(basename $test .bats)"
|
||||
echo " Testfile "$testname""
|
||||
|
||||
|
@ -67,7 +70,7 @@ runTests() {
|
|||
done
|
||||
else
|
||||
# No output folder
|
||||
for test in tests/*.bats; do
|
||||
for test in "$SPECDIR"/tests/*.bats; do
|
||||
testname="$(basename $test .bats)"
|
||||
echo " Testfile "$testname""
|
||||
# No output folder, don't save to disk
|
||||
|
|
Loading…
Reference in New Issue