2022-04-28 23:28:45 +00:00
|
|
|
#!/bin/bash
|
|
|
|
# Arg 1: qb54 location
|
|
|
|
|
|
|
|
PREFIX="Compilation"
|
|
|
|
|
|
|
|
RESULTS_DIR="./tests/results/$PREFIX"
|
|
|
|
|
|
|
|
mkdir -p $RESULTS_DIR
|
|
|
|
|
|
|
|
QB64=$1
|
|
|
|
|
|
|
|
show_failure()
|
|
|
|
{
|
|
|
|
cat "$RESULTS_DIR/$1-compile_result.txt"
|
|
|
|
cat "$RESULTS_DIR/$1-compilelog.txt"
|
2022-05-01 06:11:55 +00:00
|
|
|
cat "$RESULTS_DIR/$1-errorcompilelog.txt"
|
2022-04-28 23:28:45 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
for test in $(ls ./tests/compile_tests)
|
|
|
|
do
|
|
|
|
TESTCASE=$test
|
|
|
|
|
|
|
|
"$QB64" -x "./tests/compile_tests/$test/test.bas" -o "$RESULTS_DIR/$test-output.exe" 1>$RESULTS_DIR/$test-compile_result.txt
|
|
|
|
ERR=$?
|
|
|
|
cp ./internal/temp/compilelog.txt $RESULTS_DIR/$test-compilelog.txt
|
2022-05-01 06:11:55 +00:00
|
|
|
cp ./internal/temp/errorcompilelog.txt $RESULTS_DIR/$test-errorcompilelog.txt
|
2022-04-28 23:28:45 +00:00
|
|
|
|
|
|
|
(exit $ERR)
|
|
|
|
assert_success_named "Compile" "Compilation Error:" show_failure $test
|
|
|
|
done
|