Skip to content

Commit

Permalink
test: Re-enable some tests on windows.
Browse files Browse the repository at this point in the history
Some of these aren't working still, mainly because they can't find Qt
plugin DLLs.
  • Loading branch information
iphydf committed Nov 26, 2024
1 parent 3721ad0 commit d542834
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 6 deletions.
5 changes: 4 additions & 1 deletion .github/workflows/build-test-deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -235,12 +235,15 @@ jobs:
matrix:
arch: [i686, x86_64]
build_type: [Debug, Release]
include:
- arch: x86_64
run_tests: --run-tests
steps:
- uses: actions/checkout@v4
- name: Install docker-compose
run: sudo apt-get install -y docker-compose
- name: Run build
run: docker-compose run --rm windows_builder.${{ matrix.arch }} ./windows/cross-compile/build.sh --arch ${{ matrix.arch }} --build-type ${{ matrix.build_type }} --run-tests --src-dir /qtox
run: docker-compose run --rm windows_builder.${{ matrix.arch }} ./windows/cross-compile/build.sh --arch ${{ matrix.arch }} --build-type ${{ matrix.build_type }} ${{ matrix.run_tests }} --src-dir /qtox
- name: Upload installer
if: matrix.build_type == 'release'
uses: actions/upload-artifact@v4
Expand Down
10 changes: 8 additions & 2 deletions cmake/Testing.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -28,18 +28,24 @@ add_subdirectory(test/dbutility)

set(TEST_RESOURCES test/resources/test_data.qrc ${${PROJECT_NAME}_RESOURCES})

auto_test(core core "${${PROJECT_NAME}_RESOURCES}" "mock_library")
# TODO(iphydf): Fix the platform DLL loading so these tests can be re-enabled.
#if(NOT WIN32)
auto_test(core core "${${PROJECT_NAME}_RESOURCES}" "mock_library")
#endif()
auto_test(core chatid "" "")
auto_test(core toxid "" "")
auto_test(core toxstring "" "")
auto_test(core fileprogress "" "")
auto_test(chatlog textformatter "" "")
auto_test(net bsu "${${PROJECT_NAME}_RESOURCES}" "") # needs nodes list
#if(NOT WIN32)
auto_test(net bsu "${${PROJECT_NAME}_RESOURCES}" "") # needs nodes list
#endif()
auto_test(chatlog chatlinestorage "" "")
auto_test(persistence paths "" "")
auto_test(persistence dbschema "" "dbutility_library")
auto_test(persistence/dbupgrade dbTo11 "" "dbutility_library")
auto_test(persistence offlinemsgengine "" "")
#if(NOT WIN32 AND NOT "${SMILEYS}" STREQUAL "DISABLED")
if(NOT "${SMILEYS}" STREQUAL "DISABLED")
auto_test(persistence smileypack "${SMILEY_RESOURCES}" "") # needs emojione
endif()
Expand Down
7 changes: 4 additions & 3 deletions windows/cross-compile/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -106,11 +106,12 @@ cp -r /export/* "$QTOX_PREFIX_DIR"
# Run tests
set +u
if [[ $RUN_TESTS -ne 0 ]]; then
export WINEPATH='/export;/windows/bin'
export WINEQT_QPA_PLATFORM='offscreen'
export WINEQT_PLUGIN_PATH='z:\export'
export WINEPATH='z:\export;z:\windows\bin'
export CTEST_OUTPUT_ON_FAILURE=1
export PATH="$PATH:/opt/wine-stable/bin"
# TODO(iphydf): Fix tests on windows.
# ctest -j$(nproc)
ctest -j"$(nproc)"
fi
set -u

Expand Down

0 comments on commit d542834

Please sign in to comment.