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 25, 2024
1 parent d45e0e8 commit 74c4e02
Show file tree
Hide file tree
Showing 3 changed files with 13 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
11 changes: 8 additions & 3 deletions cmake/Testing.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -28,19 +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 "${SMILEYS}" STREQUAL "DISABLED")
if(NOT WIN32 AND NOT "${SMILEYS}" STREQUAL "DISABLED")
auto_test(persistence smileypack "${SMILEY_RESOURCES}" "") # needs emojione
endif()
auto_test(model friendlistmanager "" "")
Expand Down
3 changes: 1 addition & 2 deletions windows/cross-compile/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,7 @@ if [[ $RUN_TESTS -ne 0 ]]; then
export WINEPATH='/export;/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 74c4e02

Please sign in to comment.