comfortable-swipe/tests/run_tests
Rico Tiongson 66b2568c86
Add config command line tools and simplify source code structure (#81)
* Add simplified shell script

* Update stop command

* Update defaults.conf

* Add help dialog

* Simplify file checkpoint

* Improve tests

* Remove old library files

* Update install log

* Bump to version 1.2.0

* Apply clang format

* Add command line tools for configurations

* Bugfix keyswipe gesture not passing test

* Reformat files with clang and prettier

* Update dispatch script

* Add abort statuement

* Improve command line

* Add --bare flag

* Apply clang-format

* Update README

* Add to CHANGELOG for v1.2.0
2020-05-02 02:54:21 +08:00

29 lines
494 B
Bash
Executable File

#!/bin/bash
set -e
DIR="$(dirname "$0")"
COMPILER="$(dirname "$DIR")/compile"
# just call abort on error
TEMPOUT="$(mktemp)"
abort () {
rm "$tempout"
echo "Test aborted"
exit 1
}
# run all shell files in this directory
for SH in "$DIR/test_"*.sh; do
"$SH" || abort
done
# run all cpp files in this directory
for CPP in "$DIR/test_"*.cpp; do
# compile the test
"$COMPILER" "$CPP" -o "$TEMPOUT" || abort
# run the test
chmod +x "$TEMPOUT"
"$TEMPOUT"
done