1
1
Fork 0
mirror of https://github.com/QB64-Phoenix-Edition/QB64pe.git synced 2024-05-12 12:00:13 +00:00

Only copy compilelog files if they exist

This commit is contained in:
Matthew Kilgore 2022-05-10 20:11:26 -04:00
parent 5c4dcdc8aa
commit 867dddb1b4
4 changed files with 11 additions and 6 deletions

View file

@ -69,6 +69,11 @@ assert_ignored ()
echo "$PREFIX: $TEST_COUNT: $TESTCASE:$YELLOW IGNORED!$RESET"
}
cp_if_exists ()
(
[ -f "$1" ] && cp "$1" "$2"
)
. "$TEST_SCRIPT" "$@"
exit $TOTAL_RESULT

View file

@ -29,8 +29,8 @@ do
"$QB64" -x "./tests/compile_tests/$test/test.bas" -o "$EXE" 1>$RESULTS_DIR/$test-compile_result.txt
ERR=$?
cp ./internal/temp/compilelog.txt $RESULTS_DIR/$test-compilelog.txt
cp ./internal/temp/errorcompilelog.txt $RESULTS_DIR/$test-errorcompilelog.txt
cp_if_exists ./internal/temp/compilelog.txt $RESULTS_DIR/$test-compilelog.txt
cp_if_exists ./internal/temp/errorcompilelog.txt $RESULTS_DIR/$test-errorcompilelog.txt
(exit $ERR)
assert_success_named "Compile" "Compilation Error:" show_failure $test

View file

@ -50,8 +50,8 @@ do
./qb64 -x "$TEST_CASES/$test.bas" -o "$outputExe" 1>$RESULTS_DIR/$test-compile_result.txt
ERR=$?
cp ./internal/temp/compilelog.txt $RESULTS_DIR/$test-compilelog.txt
cp ./internal/temp/errorcompilelog.txt $RESULTS_DIR/$test-errorcompilelog.txt
cp_if_exists ./internal/temp/compilelog.txt $RESULTS_DIR/$test-compilelog.txt
cp_if_exists ./internal/temp/errorcompilelog.txt $RESULTS_DIR/$test-errorcompilelog.txt
(exit $ERR)
assert_success_named "compile" "Compilation Error:" show_failure $test

View file

@ -31,8 +31,8 @@ do
"$QB64" -x "$sourceFile" -o "./$EXES_DIR/$test-output.exe" 1>$RESULTS_DIR/$test-compile_result.txt
ERR=$?
cp ./internal/temp/compilelog.txt $RESULTS_DIR/$test-compilelog.txt
cp ./internal/temp/errorcompilelog.txt $RESULTS_DIR/$test-errorcompilelog.txt
cp_if_exists ./internal/temp/compilelog.txt $RESULTS_DIR/$test-compilelog.txt
cp_if_exists ./internal/temp/errorcompilelog.txt $RESULTS_DIR/$test-errorcompilelog.txt
(exit $ERR)
assert_success_named "Compile" "Compilation Error:" show_failure $test