run_test.sh can be called with a list of tests to run.

mr3.2.1
Victor Seva 12 years ago
parent c760b36d32
commit aaa7bbb1c8

@ -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<<EOF|lua5.1 - > 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
Loading…
Cancel
Save