Commit 29b51365 by Zachary Snow

test runner supports explicit list of tests

parent 799141af
...@@ -2,15 +2,17 @@ ...@@ -2,15 +2,17 @@
SCRIPT_DIR=`dirname "${BASH_SOURCE[0]}"` SCRIPT_DIR=`dirname "${BASH_SOURCE[0]}"`
tests=`ls *.sv | sed -e "s_\.sv\\\$__"` tests=(`ls *.sv | sed -e "s_\.sv\\\$__"`)
if [ $1 ]; then if [ $1 ]; then
tests=$1 tests=("$@")
shift shift ${#tests[@]}
if [ ! -f $tests.sv ]; then for test in $tests; do
echo "Could not find $tests.sv" if [ ! -f $test.sv ]; then
echo "Could not find $test.sv"
exit 1 exit 1
fi fi
done
fi fi
addTest() { addTest() {
...@@ -20,7 +22,7 @@ addTest() { ...@@ -20,7 +22,7 @@ addTest() {
} }
suite() { suite() {
for test in $tests; do for test in "${tests[@]}"; do
addTest $test addTest $test
done done
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment