Skip to content

Commit fdfc618

Browse files
author
bram
committed
Fixed issue with windows logging ci/cd
1 parent fae5c6f commit fdfc618

2 files changed

Lines changed: 21 additions & 6 deletions

File tree

.github/workflows/build-and-release.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -386,13 +386,15 @@ jobs:
386386
cd build
387387
mkdir -p Testing/Temporary
388388
echo "Running tests with filtered output..."
389-
export QT_QPA_PLATFORM=minimal
390389
391390
if [ -f "./OpenCryptUITest.exe" ]; then
392391
chmod +x ./OpenCryptUITest.exe
393-
chmod +x ./run_tests.bat
394-
# Run tests using the pre-built batch script
395-
./run_tests.bat -v2 | tee Testing/Temporary/LastTest.log
392+
393+
# Capture the CMD script output to a file
394+
cmd.exe /c "run_tests.bat -v2" > Testing/Temporary/LastTest.log 2>&1
395+
396+
# Show the test results
397+
cat Testing/Temporary/LastTest.log
396398
else
397399
echo "ERROR: OpenCryptUITest.exe not found!" | tee Testing/Temporary/LastTest.log
398400
echo "Directory contents: $(ls -la)" | tee -a Testing/Temporary/LastTest.log

scripts/run_tests.bat

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,21 @@
66
:: Suppress all Qt internal categories
77
set QT_LOGGING_RULES=qt.*=false
88

9+
:: Set minimal QPA platform to avoid display issues
10+
set QT_QPA_PLATFORM=minimal
11+
912
:: Simplify output pattern
1013
set QT_MESSAGE_PATTERN=[%%{type}] %%{message}
1114

12-
:: Run the test with filtering
13-
.\OpenCryptUITest.exe %*
15+
:: Create a temporary file for raw output
16+
set TEMP_OUTPUT=%TEMP%\test_output.txt
17+
if exist %TEMP_OUTPUT% del %TEMP_OUTPUT%
18+
19+
:: Run the test with output to temporary file
20+
.\OpenCryptUITest.exe %* > %TEMP_OUTPUT% 2>&1
21+
22+
:: Read the temporary file and filter out Qt debug messages
23+
type %TEMP_OUTPUT% | findstr /v "qt\." | findstr /v "QFont::"
24+
25+
:: Clean up
26+
del %TEMP_OUTPUT%

0 commit comments

Comments
 (0)