Simplify layout of lua test script locations.
This commit is contained in:
@@ -1,18 +1,39 @@
|
||||
#!/bin/bash
|
||||
#unzip -o luaj3.0-tests.zip
|
||||
#
|
||||
# unpack the luaj test archive, compile and run it locally, and repack the results
|
||||
|
||||
# unzip existing archive
|
||||
unzip -n luaj3.0-tests.zip
|
||||
rm *.lc *.out */*.lc */*.out
|
||||
|
||||
# compile tests for compiler and save binary files
|
||||
for DIR in "lua5.2.1-tests" "regressions"; do
|
||||
cd ${DIR}
|
||||
FILES=`ls -1 *.lua | awk 'BEGIN { FS="." } ; { print $1 }'`
|
||||
for FILE in $FILES ; do
|
||||
echo 'compiling' `pwd` $FILE
|
||||
luac ${FILE}.lua
|
||||
mv luac.out ${FILE}.lc
|
||||
done
|
||||
cd ..
|
||||
done
|
||||
|
||||
# run test lua scripts and save output
|
||||
for DIR in "errors" "perf" "."; do
|
||||
cd ${DIR}
|
||||
FILES=`ls -1 *.lua | awk 'BEGIN { FS="." } ; { print $1 }'`
|
||||
echo "FILES" $FILES
|
||||
for FILE in $FILES ; do
|
||||
echo "executing ${FILE}.lua"
|
||||
luac ${FILE}.lua
|
||||
mv luac.out ${FILE}.lc
|
||||
echo 'executing' `pwd` $FILE
|
||||
lua ${FILE}.lua > ${FILE}.out
|
||||
done
|
||||
rm abc.txt
|
||||
cd ..
|
||||
done
|
||||
cd lua
|
||||
rm -f luaj3.0-tests.zip
|
||||
|
||||
# create new zipfile
|
||||
rm -f luaj3.0-tests.zip regressions
|
||||
zip -9 luaj3.0-tests.zip *.lua *.lc *.out */*.lua */*.lc */*.out
|
||||
|
||||
# cleanup
|
||||
rm *.out */*.lc */*.out
|
||||
rm -r lua5.2.1-tests
|
||||
|
||||
Reference in New Issue
Block a user