Verified Commit 7d94eac3 authored by Camil Staps's avatar Camil Staps 🚀

run_tests.sh: add -M (don't make ../src); remove -R (recompile) options

parent 41e0f2a9
Pipeline #29165 passed with stages
in 12 minutes and 33 seconds
...@@ -71,7 +71,7 @@ interworking-Start: ...@@ -71,7 +71,7 @@ interworking-Start:
stage: test-interworking stage: test-interworking
script: script:
- cd test - cd test
- ./run_tests.sh -Rqo functions - ./run_tests.sh -qo functions
- make -B test-CodeSharing - make -B test-CodeSharing
- CFLAGS='-DCOMPUTED_GOTOS -Ofast -fno-unsafe-math-optimizations' make -B test-CodeSharing - CFLAGS='-DCOMPUTED_GOTOS -Ofast -fno-unsafe-math-optimizations' make -B test-CodeSharing
......
...@@ -18,12 +18,12 @@ WASM=0 ...@@ -18,12 +18,12 @@ WASM=0
INTERPRETERGENWASMFLAGS="" INTERPRETERGENWASMFLAGS=""
SRCMAKETARGETS="all" SRCMAKETARGETS="all"
MAKE=1
BENCHMARK=0 BENCHMARK=0
EXPECTED_PREFIX=".64" EXPECTED_PREFIX=".64"
BC_EXTENSION="bc" BC_EXTENSION="bc"
RUN_ONLY=() RUN_ONLY=()
PROFILE=0 PROFILE=0
RECOMPILE=1
QUIET=0 QUIET=0
OPTIMISE=1 OPTIMISE=1
...@@ -55,22 +55,22 @@ print_help () { ...@@ -55,22 +55,22 @@ print_help () {
echo "Options:" echo "Options:"
echo " -H Print this help" echo " -H Print this help"
echo echo
echo " -M Don't make ../src before running tests"
echo " -o TEST Only run test TEST" echo " -o TEST Only run test TEST"
echo " -q Don't show program results"
echo " -b Run benchmarks"
echo echo
echo " -w Use the WebAssembly interpreter (does not support all options below)" echo " -w Use the WebAssembly interpreter (does not support all options below)"
echo echo " -3 Run tests as if on a 32-bit machine"
echo " -b Run benchmarks"
echo " -f Compile the interpreter with -Ofast -fno-unsafe-math-optimizations" echo " -f Compile the interpreter with -Ofast -fno-unsafe-math-optimizations"
echo " -h SIZE Set heap size to SIZE"
echo " -O Skip the ABC optimisation step" echo " -O Skip the ABC optimisation step"
echo
echo " -h SIZE Set heap size to SIZE"
echo " -s SIZE Set stack size to SIZE" echo " -s SIZE Set stack size to SIZE"
echo " -3 Run tests as if on a 32-bit machine"
echo " -R Don't recompile modules (faster, but halt addresses may be incorrect if optimisations are missed)"
echo echo
echo " -d Print all instructions as they are executed" echo " -d Print all instructions as they are executed"
echo " -l List bytecode before execution" echo " -l List bytecode before execution"
echo " -p Make PDF profiles (e.g. nfib.prof.pdf) using google-pprof" echo " -p Make PDF profiles (e.g. nfib.prof.pdf) using google-pprof"
echo " -q Don't show program results"
exit 0 exit 0
} }
...@@ -86,7 +86,7 @@ contains () { ...@@ -86,7 +86,7 @@ contains () {
return 1 return 1
} }
OPTS=`getopt "Ho:wbfh:Os:3Rdlpq" "$@"` || print_usage OPTS=`getopt "Ho:wbMfh:Os:3dlpq" "$@"` || print_usage
eval set -- "$OPTS" eval set -- "$OPTS"
while true; do while true; do
...@@ -111,6 +111,9 @@ while true; do ...@@ -111,6 +111,9 @@ while true; do
-f) -f)
SRCMAKETARGETS+=" optimized" SRCMAKETARGETS+=" optimized"
shift;; shift;;
-M)
MAKE=0
shift;;
-h) -h)
RUNFLAGS+=" -h $2" RUNFLAGS+=" -h $2"
NATIVE_RUNFLAGS+=" -h $2" NATIVE_RUNFLAGS+=" -h $2"
...@@ -126,9 +129,6 @@ while true; do ...@@ -126,9 +129,6 @@ while true; do
EXPECTED_PREFIX=".32" EXPECTED_PREFIX=".32"
CFLAGS+=" -m32 -DWORD_WIDTH=32" CFLAGS+=" -m32 -DWORD_WIDTH=32"
shift;; shift;;
-R)
RECOMPILE=0
shift;;
-d) -d)
CFLAGS+=" -DDEBUG_ALL_INSTRUCTIONS" CFLAGS+=" -DDEBUG_ALL_INSTRUCTIONS"
...@@ -160,7 +160,7 @@ if [ $BENCHMARK -gt 0 ] && [ $WASM -eq 0 ] && [[ $SRCMAKETARGETS != *"optimized" ...@@ -160,7 +160,7 @@ if [ $BENCHMARK -gt 0 ] && [ $WASM -eq 0 ] && [[ $SRCMAKETARGETS != *"optimized"
sleep 1 sleep 1
fi fi
if [ "$OS" != "Windows_NT" ]; then if [ "$OS" != "Windows_NT" ] && [ $MAKE -gt 0 ] ; then
CFLAGS="$CFLAGS" make -BC ../src $SRCMAKETARGETS || exit 1 CFLAGS="$CFLAGS" make -BC ../src $SRCMAKETARGETS || exit 1
fi fi
...@@ -172,10 +172,6 @@ if [ $WASM -gt 0 ]; then ...@@ -172,10 +172,6 @@ if [ $WASM -gt 0 ]; then
fi fi
fi fi
if [ $RECOMPILE -gt 0 ]; then
rm -fr Clean\ System\ Files
fi
for MODULE in *.icl for MODULE in *.icl
do do
MODULE="${MODULE/.icl/}" MODULE="${MODULE/.icl/}"
...@@ -207,9 +203,6 @@ do ...@@ -207,9 +203,6 @@ do
FAILED+=("$MODULE") FAILED+=("$MODULE")
continue continue
fi fi
if [ $RECOMPILE -gt 0 ]; then
cpmq project "$MODULE.prj" build
fi
if [ ! -f "$MODULE$EXPECTED_PREFIX.expected" ]; then if [ ! -f "$MODULE$EXPECTED_PREFIX.expected" ]; then
echo -e "${YELLOW}Skipping $MODULE (no expected outcome)${RESET}" echo -e "${YELLOW}Skipping $MODULE (no expected outcome)${RESET}"
......
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