wrap variables in runtest

This commit is contained in:
abejgonzalez
2019-07-10 09:29:06 -07:00
parent fdf0edf8e0
commit 6469045989
2 changed files with 86 additions and 18 deletions

50
.circleci/run-tests.sh Executable file
View File

@@ -0,0 +1,50 @@
#!/bin/bash
# run the different tests
# turn echo on and error on earliest command
set -ex
# get remote exec variables
SCRIPT_DIR="$( cd "$( dirname "$0" )" && pwd )"
source $SCRIPT_DIR/defaults.sh
run_bmark () {
export VERILATOR_ROOT=$LOCAL_VERILATOR_DIR/install/share/verilator
make run-bmark-tests-fast -C $LOCAL_SIM_DIR VERILATOR_INSTALL_DIR=$LOCAL_VERILATOR_DIR $@
}
run_asm () {
export VERILATOR_ROOT=$LOCAL_VERILATOR_DIR/install/share/verilator
make run-asm-tests-fast -C $LOCAL_SIM_DIR VERILATOR_INSTALL_DIR=$LOCAL_VERILATOR_DIR $@
}
run_both () {
run_bmark $@
run_asm $@
}
case $1 in
example)
run_bmark SUB_PROJECT=example
;;
boomexample)
run_bmark SUB_PROJECT=example CONFIG=DefaultBoomConfig
;;
boomrocketexample)
run_bmark SUB_PROJECT=example CONFIG=DefaultBoomAndRocketConfig
;;
boom)
run_bmark SUB_PROJECT=boom
;;
rocketchip)
run_bmark SUB_PROJECT=rocketchip
;;
hwacha)
run_bmark SUB_PROJECT=hwacha
;;
*)
echo "No set of tests for $1. Did you spell it right?"
exit 1
;;
esac