Skip to content

Commit c00f698

Browse files
committed
ci: fix Windows tests
Signed-off-by: Patrizio Bekerle <[email protected]>
1 parent f926727 commit c00f698

File tree

2 files changed

+42
-28
lines changed

2 files changed

+42
-28
lines changed

.github/workflows/build-test.yml

Lines changed: 28 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -214,39 +214,42 @@ jobs:
214214
run: |
215215
cd ../tests && qmake CONFIG+=debug CONFIG+=DEV_MODE DEFINES+=INTEGRATION_TESTS -early QMAKE_DEFAULT_LIBDIRS=$(xcrun -show-sdk-path)/usr/lib && make -s -j 8
216216
../bin/tests/tests.app/Contents/MacOS/tests -platform minimal -txt
217-
# - if: contains( matrix.os, 'windows') && (startsWith( matrix.qt-version, '5.' ) || matrix.qt-version == '6.2.4')
218-
- if: contains( matrix.os, 'windows') && startsWith( matrix.qt-version, '5.' )
219-
name: Do Qt5 / Qt 6.2.4 Windows tests
217+
# Disable Qt5 Windows tests, because build tools are missing and we build Qt6 only now
218+
# - if: contains( matrix.os, 'windows') && startsWith( matrix.qt-version, '5.' )
219+
# name: Do Qt5 Windows tests
220+
# run: |
221+
# $ErrorActionPreference = 'Stop'
222+
# cd ..\tests
223+
# qmake DEFINES+=INTEGRATION_TESTS
224+
# make
225+
# copy ..\build-systems\github\windows\libcrypto-1_1-x64.dll .
226+
# copy ..\build-systems\github\windows\libssl-1_1-x64.dll .
227+
# Get-ChildItem -Recurse -Force ..
228+
# copy ..\bin\tests\tests.exe .
229+
# # echo set
230+
# # gci env:* | sort-object name
231+
# # echo path
232+
# # echo echo $env:PATH
233+
# # cd ..\bin\tests
234+
# # echo test1
235+
# # .\tests.exe -txt
236+
# # echo windeployqt
237+
# windeployqt --debug tests.exe
238+
# # echo test2
239+
# .\tests.exe -txt
240+
- if: contains( matrix.os, 'windows') && startsWith( matrix.qt-version, '6.' )
241+
name: Do Qt 6.3+ Windows tests
220242
run: |
243+
$ErrorActionPreference = 'Stop'
221244
cd ..\tests
222-
qmake DEFINES+=INTEGRATION_TESTS
223-
make
245+
qmake6 DEFINES+=INTEGRATION_TESTS
246+
nmake
224247
copy ..\build-systems\github\windows\libcrypto-1_1-x64.dll .
225248
copy ..\build-systems\github\windows\libssl-1_1-x64.dll .
226249
Get-ChildItem -Recurse -Force ..
227250
copy ..\bin\tests\tests.exe .
228-
# echo set
229-
# gci env:* | sort-object name
230-
# echo path
231-
# echo echo $env:PATH
232-
# cd ..\bin\tests
233-
# echo test1
234-
# .\tests.exe -txt
235-
# echo windeployqt
236251
windeployqt --debug tests.exe
237-
# echo test2
238252
.\tests.exe -txt
239-
# - if: contains( matrix.os, 'windows') && startsWith( matrix.qt-version, '6.' )
240-
# name: Do Qt 6.3+ Windows tests
241-
# run: |
242-
# cd ..\tests
243-
# qmake6 DEFINES+=INTEGRATION_TESTS
244-
# nmake
245-
# copy ..\build-systems\github\windows\libcrypto-1_1-x64.dll .
246-
# copy ..\build-systems\github\windows\libssl-1_1-x64.dll .
247-
# copy ..\bin\tests\tests.exe .
248-
# windeployqt --debug tests.exe
249-
# .\tests.exe -txt
250253
251254
#
252255
# Build QOwnNotes

tests/unit_tests/testcases/app/app-tests.pri

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,15 @@
1-
21
APP_SRC_DIR = $$PWD/../../../../src/
32

43
INCLUDEPATH += $$APP_SRC_DIR
54

5+
# Don't use wildcards here, because nmake under Windows cant't handle them
66
HEADERS += \
7-
$$PWD/test_*.h \
7+
$$PWD/test_htmlentities.h \
8+
$$PWD/test_metricsservice.h \
9+
$$PWD/test_network.h \
10+
$$PWD/test_notes.h \
11+
$$PWD/test_settingsservice.h \
12+
$$PWD/test_utilsmisc.h \
813
$$APP_SRC_DIR/version.h \
914
$$APP_SRC_DIR/release.h \
1015
$$APP_SRC_DIR/services/databaseservice.h \
@@ -48,8 +53,14 @@ HEADERS += \
4853
$$APP_SRC_DIR/libraries/qmarkdowntextedit/qownlanguagedata.h \
4954
$$APP_SRC_DIR/threads/scriptthread.h \
5055

56+
# Don't use wildcards here, because nmake under Windows cant't handle them
5157
SOURCES += \
52-
$$PWD/test_*.cpp \
58+
$$PWD/test_htmlentities.cpp \
59+
$$PWD/test_metricsservice.cpp \
60+
$$PWD/test_network.cpp \
61+
$$PWD/test_notes.cpp \
62+
$$PWD/test_settingsservice.cpp \
63+
$$PWD/test_utilsmisc.cpp \
5364
$$APP_SRC_DIR/services/databaseservice.cpp \
5465
$$APP_SRC_DIR/api/noteapi.cpp \
5566
$$APP_SRC_DIR/api/notesubfolderapi.cpp \

0 commit comments

Comments
 (0)