Added Unit tests to the helper scripts.
continuous-integration/drone/push Build is passing Details

This commit is contained in:
Nils Hölscher 2022-06-07 09:08:07 +02:00
parent 0079b4f0e0
commit 9146caf849
2 changed files with 16 additions and 0 deletions

View File

@ -33,6 +33,10 @@ run () {
#llvm-dis < out.bc > out.ll #llvm-dis < out.bc > out.ll
} }
test () {
./build/bin/UnitTest --gtest_brief=1
}
allBenchs=( "adpcm" allBenchs=( "adpcm"
"bs" "bs"
"bsort100" "bsort100"
@ -103,6 +107,9 @@ case $1 in
echo "==== Please provide name of the test as second argument! ====" echo "==== Please provide name of the test as second argument! ===="
fi fi
;; ;;
t | test)
test
;;
ra | runall) ra | runall)
runall runall
;; ;;
@ -157,6 +164,7 @@ case $1 in
echo " r | run [name] Run pass on test/[name] from the test folder" echo " r | run [name] Run pass on test/[name] from the test folder"
echo " cr [name] Compile and run pass on test/[name] from the test folder" echo " cr [name] Compile and run pass on test/[name] from the test folder"
echo " ra | runall Run pass on all tests from the test folder" echo " ra | runall Run pass on all tests from the test folder"
echo " t | test Execute Unit tests, only test that Fail are printed."
exit exit
;; ;;
esac esac

View File

@ -36,6 +36,10 @@ run () {
#llvm-dis < out.bc > out.ll #llvm-dis < out.bc > out.ll
} }
test () {
./build/bin/UnitTest --gtest_brief=1
}
buildllvm() { buildllvm() {
mkdir llvm mkdir llvm
cd llvm cd llvm
@ -137,6 +141,9 @@ case $1 in
echo "==== Please provide name of the test as second argument! ====" echo "==== Please provide name of the test as second argument! ===="
fi fi
;; ;;
t | test)
test
;;
ra | runall) ra | runall)
runall runall
;; ;;
@ -194,6 +201,7 @@ case $1 in
echo " r | run [name] Run pass on test/[name] from the test folder" echo " r | run [name] Run pass on test/[name] from the test folder"
echo " cr [name] Compile and run pass on test/[name] from the test folder" echo " cr [name] Compile and run pass on test/[name] from the test folder"
echo " ra | runall Run pass on all tests from the test folder" echo " ra | runall Run pass on all tests from the test folder"
echo " t | test Execute Unit tests, only test that Fail are printed."
exit exit
;; ;;
esac esac