From 9146caf849d7a6ba728ea78977e53dab00ecf091 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nils=20H=C3=B6lscher?= Date: Tue, 7 Jun 2022 09:08:07 +0200 Subject: [PATCH] Added Unit tests to the helper scripts. --- helper.sh | 8 ++++++++ poolhelper.sh | 8 ++++++++ 2 files changed, 16 insertions(+) diff --git a/helper.sh b/helper.sh index 1bb80ac..f1ce1d5 100755 --- a/helper.sh +++ b/helper.sh @@ -33,6 +33,10 @@ run () { #llvm-dis < out.bc > out.ll } +test () { + ./build/bin/UnitTest --gtest_brief=1 +} + allBenchs=( "adpcm" "bs" "bsort100" @@ -103,6 +107,9 @@ case $1 in echo "==== Please provide name of the test as second argument! ====" fi ;; + t | test) + test + ;; ra | runall) runall ;; @@ -157,6 +164,7 @@ case $1 in 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 " ra | runall Run pass on all tests from the test folder" + echo " t | test Execute Unit tests, only test that Fail are printed." exit ;; esac diff --git a/poolhelper.sh b/poolhelper.sh index d61bbdd..9dd9850 100755 --- a/poolhelper.sh +++ b/poolhelper.sh @@ -36,6 +36,10 @@ run () { #llvm-dis < out.bc > out.ll } +test () { + ./build/bin/UnitTest --gtest_brief=1 +} + buildllvm() { mkdir llvm cd llvm @@ -137,6 +141,9 @@ case $1 in echo "==== Please provide name of the test as second argument! ====" fi ;; + t | test) + test + ;; ra | runall) runall ;; @@ -194,6 +201,7 @@ case $1 in 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 " ra | runall Run pass on all tests from the test folder" + echo " t | test Execute Unit tests, only test that Fail are printed." exit ;; esac