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

Redirect stderr to compilelog rather than errorcompilelog

Having two separate files for the compile output is just too confusing,
and it adds an extra file users need to look at and give us when there
are issues. This change simply makes qb64.bas send both the stdout and
stderr output to compilelog.txt.

Fixes: #61
This commit is contained in:
Matthew Kilgore 2022-05-18 02:12:27 -04:00 committed by Matt Kilgore
parent 0c19b70a1b
commit 4a8a7ce594
4 changed files with 3 additions and 11 deletions

View file

@ -12284,10 +12284,8 @@ IF Debug THEN PRINT #9, "Finished generation of code for saving/sharing common a
FOR closeall = 1 TO 255: CLOSE closeall: NEXT
OPEN tmpdir$ + "temp.bin" FOR OUTPUT LOCK WRITE AS #26 'relock
errorcompilelog$ = tmpdir$ + "errorcompilelog.txt"
compilelog$ = tmpdir$ + "compilelog.txt"
OPEN errorcompilelog$ FOR OUTPUT AS #1: CLOSE #1 'Clear log
OPEN compilelog$ FOR OUTPUT AS #1: CLOSE #1 'Clear log
IF idemode = 0 AND NOT QuietMode THEN
@ -12645,7 +12643,7 @@ IF os$ = "WIN" THEN
NEXT
If No_C_Compile_Mode = 0 THEN
SHELL _HIDE "cmd /c " + makeline$ + " 1>> " + compilelog$ + " 2>> " + errorcompilelog$
SHELL _HIDE "cmd /c " + makeline$ + " 1>> " + compilelog$ + " 2>&1"
IF idemode THEN
'Restore fg/bg colors
@ -12878,7 +12876,7 @@ IF os$ = "LNX" THEN
END IF
IF No_C_Compile_Mode = 0 THEN
SHELL _HIDE makeline$ + " 1>> " + compilelog$ + " 2>> " + errorcompilelog$
SHELL _HIDE makeline$ + " 1>> " + compilelog$ + " 2>&1"
IF idemode THEN
'Restore fg/bg colors
dummy = DarkenFGBG(0)
@ -12916,7 +12914,7 @@ END IF
IF compfailed THEN
IF idemode THEN
idemessage$ = "C++ Compilation failed " + CHR$(0) + "(Check " + _TRIM$(compilelog$) + " And " + _TRIM$(errorcompilelog$) + ")"
idemessage$ = "C++ Compilation failed " + CHR$(0) + "(Check " + _TRIM$(compilelog$) + ")"
GOTO ideerror
END IF
IF compfailed THEN

View file

@ -13,7 +13,6 @@ show_failure()
{
cat "$RESULTS_DIR/$1-compile_result.txt"
cat "$RESULTS_DIR/$1-compilelog.txt"
cat "$RESULTS_DIR/$1-errorcompilelog.txt"
}
show_incorrect_result()
@ -33,7 +32,6 @@ do
"$QB64" -x "./tests/compile_tests/$test/test.bas" -o "$EXE" 1>$RESULTS_DIR/$test-compile_result.txt
ERR=$?
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

@ -44,7 +44,6 @@ show_failure()
{
cat "$RESULTS_DIR/$1-compile_result.txt"
cat "$RESULTS_DIR/$1-compilelog.txt"
cat "$RESULTS_DIR/$1-errorcompilelog.txt"
}
for basFile in $TEST_CASES/*.bas
@ -57,7 +56,6 @@ do
./qb64 -x "$TEST_CASES/$test.bas" -o "$outputExe" 1>$RESULTS_DIR/$test-compile_result.txt
ERR=$?
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

@ -15,7 +15,6 @@ show_failure()
{
cat "$RESULTS_DIR/$1-compile_result.txt"
cat "$RESULTS_DIR/$1-compilelog.txt"
cat "$RESULTS_DIR/$1-errorcompilelog.txt"
}
for sourceFile in $(find ./tests/qbasic_testcases/n54/ -name '*.bas') \
@ -35,7 +34,6 @@ do
"$QB64" -x "$sourceFile" -o "./$EXES_DIR/$test-output.exe" 1>$RESULTS_DIR/$test-compile_result.txt
ERR=$?
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