From aaa7bbb1c89f75696834dcb35bcfa64a3db8c30a Mon Sep 17 00:00:00 2001 From: Victor Seva Date: Mon, 23 Sep 2013 14:54:07 +0200 Subject: [PATCH] run_test.sh can be called with a list of tests to run. --- run_tests.sh | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/run_tests.sh b/run_tests.sh index b1412b4..3961b56 100755 --- a/run_tests.sh +++ b/run_tests.sh @@ -3,10 +3,25 @@ mkdir -p reports rm -rf reports/* -#for f in tests/test_*.lua; do -# NAME=$(basename ${f} .lua) -# lua5.1 ${f} > reports/${NAME}.tap -#done +if [[ ! -z "$@" ]]; then + for i in $@; do + f="tests/$i.lua" + if [ ! -f $f ]; then + echo "No $f found" + else + echo "testing $f -> reports/${i}.tap" + cat< reports/${i}.tap +require "tests/$i" +---- Control test output: +lu = LuaUnit +lu:setOutputType('TAP') +lu:setVerbosity(1) +lu:run() +EOF + fi + done + exit 0 +fi lua5.1 tests/test_all.lua > reports/test_all.tap #EOF \ No newline at end of file