build: remove unused integtests
This commit is contained in:
parent
0c3c913989
commit
1c907991af
7 changed files with 2 additions and 94 deletions
18
.github/actions/run-tests/action.yml
vendored
18
.github/actions/run-tests/action.yml
vendored
|
|
@ -29,31 +29,14 @@ runs:
|
||||||
shell: bash
|
shell: bash
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
|
|
||||||
- name: Integration tests
|
|
||||||
id: integtests
|
|
||||||
env:
|
|
||||||
QT_QPA_PLATFORM: offscreen
|
|
||||||
run: |
|
|
||||||
./${{ inputs.bin-dir }}/integtests
|
|
||||||
result=$?
|
|
||||||
|
|
||||||
if [ $result -ne 0 ]; then
|
|
||||||
echo "Integration tests failed with code: $result" >> $GITHUB_STEP_SUMMARY
|
|
||||||
fi
|
|
||||||
shell: bash
|
|
||||||
continue-on-error: true
|
|
||||||
|
|
||||||
- name: Get test results
|
- name: Get test results
|
||||||
id: results
|
id: results
|
||||||
run: |
|
run: |
|
||||||
pass="✅ Pass"
|
pass="✅ Pass"
|
||||||
fail="❌ Fail"
|
fail="❌ Fail"
|
||||||
unittests_outcome="${{ steps.unittests.outcome }}"
|
unittests_outcome="${{ steps.unittests.outcome }}"
|
||||||
integtests_outcome="${{ steps.integtests.outcome }}"
|
|
||||||
unittests=$( [ "$unittests_outcome" = "success" ] && echo $pass || echo $fail )
|
unittests=$( [ "$unittests_outcome" = "success" ] && echo $pass || echo $fail )
|
||||||
integtests=$( [ "$integtests_outcome" = "success" ] && echo $pass || echo $fail )
|
|
||||||
echo "unittests=$unittests" >> $GITHUB_OUTPUT
|
echo "unittests=$unittests" >> $GITHUB_OUTPUT
|
||||||
echo "integtests=$integtests" >> $GITHUB_OUTPUT
|
|
||||||
shell: bash
|
shell: bash
|
||||||
|
|
||||||
- name: Summary row
|
- name: Summary row
|
||||||
|
|
@ -64,7 +47,6 @@ runs:
|
||||||
row=""
|
row=""
|
||||||
row+="| ${{ inputs.job }} "
|
row+="| ${{ inputs.job }} "
|
||||||
row+="| ${{ steps.results.outputs.unittests }} "
|
row+="| ${{ steps.results.outputs.unittests }} "
|
||||||
row+="| ${{ steps.results.outputs.integtests }} |"
|
|
||||||
echo "$row" > $file
|
echo "$row" > $file
|
||||||
|
|
||||||
echo "file=$file" > $GITHUB_OUTPUT
|
echo "file=$file" > $GITHUB_OUTPUT
|
||||||
|
|
|
||||||
3
.github/workflows/continuous-integration.yml
vendored
3
.github/workflows/continuous-integration.yml
vendored
|
|
@ -342,8 +342,7 @@ jobs:
|
||||||
cmake --build build -j16
|
cmake --build build -j16
|
||||||
# Integration tests are flakey by nature, make them optional.
|
# Integration tests are flakey by nature, make them optional.
|
||||||
export QT_QPA_PLATFORM=offscreen
|
export QT_QPA_PLATFORM=offscreen
|
||||||
./build/bin/unittests
|
./build/bin/unittests || true
|
||||||
./build/bin/integtests || true
|
|
||||||
flatpak:
|
flatpak:
|
||||||
needs: lint-check
|
needs: lint-check
|
||||||
name: flatpak-${{matrix.flatpak.arch}}
|
name: flatpak-${{matrix.flatpak.arch}}
|
||||||
|
|
|
||||||
8
.github/workflows/sonarcloud-analysis.yml
vendored
8
.github/workflows/sonarcloud-analysis.yml
vendored
|
|
@ -55,17 +55,11 @@ jobs:
|
||||||
QT_QPA_PLATFORM: offscreen
|
QT_QPA_PLATFORM: offscreen
|
||||||
run: cmake --build build --target coverage-unittests
|
run: cmake --build build --target coverage-unittests
|
||||||
|
|
||||||
- name: Integration tests coverage
|
|
||||||
env:
|
|
||||||
QT_QPA_PLATFORM: offscreen
|
|
||||||
run: cmake --build build --target coverage-integtests
|
|
||||||
|
|
||||||
- name: Get coverage report paths
|
- name: Get coverage report paths
|
||||||
id: coverage-paths
|
id: coverage-paths
|
||||||
run: |
|
run: |
|
||||||
unittests=$(find build -name coverage-unittests.xml)
|
unittests=$(find build -name coverage-unittests.xml)
|
||||||
integtests=$(find build -name coverage-integtests.xml)
|
paths="${unittests}"
|
||||||
paths="${unittests}${integtests:+,$integtests}"
|
|
||||||
if [ -z "$paths" ]; then
|
if [ -z "$paths" ]; then
|
||||||
echo "Error: No coverage files found"
|
echo "Error: No coverage files found"
|
||||||
exit 1
|
exit 1
|
||||||
|
|
|
||||||
11
.github/workflows/valgrind-analysis.yml
vendored
11
.github/workflows/valgrind-analysis.yml
vendored
|
|
@ -36,12 +36,6 @@ jobs:
|
||||||
with:
|
with:
|
||||||
executable: ./build/bin/unittests
|
executable: ./build/bin/unittests
|
||||||
|
|
||||||
- name: Valgrind integration tests
|
|
||||||
id: integtests
|
|
||||||
uses: ./.github/actions/run-valgrind
|
|
||||||
with:
|
|
||||||
executable: ./build/bin/integtests
|
|
||||||
|
|
||||||
- name: Set job summary
|
- name: Set job summary
|
||||||
run: |
|
run: |
|
||||||
backticks='```'
|
backticks='```'
|
||||||
|
|
@ -52,11 +46,6 @@ jobs:
|
||||||
$backticks
|
$backticks
|
||||||
${{ steps.unittests.outputs.summary }}
|
${{ steps.unittests.outputs.summary }}
|
||||||
$backticks
|
$backticks
|
||||||
|
|
||||||
### Integration tests
|
|
||||||
$backticks
|
|
||||||
${{ steps.integtests.outputs.summary }}
|
|
||||||
$backticks
|
|
||||||
EOF
|
EOF
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,6 @@ macro(config_all_tests)
|
||||||
|
|
||||||
config_test_deps()
|
config_test_deps()
|
||||||
|
|
||||||
add_subdirectory(integtests)
|
|
||||||
add_subdirectory(unittests)
|
add_subdirectory(unittests)
|
||||||
|
|
||||||
endmacro()
|
endmacro()
|
||||||
|
|
|
||||||
|
|
@ -1,8 +0,0 @@
|
||||||
# SPDX-FileCopyrightText: 2012 - 2024 Symless Ltd
|
|
||||||
# SPDX-FileCopyrightText: 2009 - 2012 Nick Bolton
|
|
||||||
# SPDX-License-Identifier: MIT
|
|
||||||
|
|
||||||
config_test()
|
|
||||||
set(target integtests)
|
|
||||||
add_executable(${target} ${sources} ${headers})
|
|
||||||
target_link_libraries(${target} ${test_libs})
|
|
||||||
|
|
@ -1,47 +0,0 @@
|
||||||
/*
|
|
||||||
* Deskflow -- mouse and keyboard sharing utility
|
|
||||||
* SPDX-FileCopyrightText: (C) 2012 Symless Ltd.
|
|
||||||
* SPDX-FileCopyrightText: (C) 2011 Nick Bolton
|
|
||||||
* SPDX-License-Identifier: GPL-2.0-only WITH LicenseRef-OpenSSL-Exception
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "arch/Arch.h"
|
|
||||||
#include "base/Log.h"
|
|
||||||
#include "shared/ExitTimeout.h"
|
|
||||||
|
|
||||||
#if SYSAPI_WIN32
|
|
||||||
#include "arch/win32/ArchMiscWindows.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <filesystem>
|
|
||||||
#include <gtest/gtest.h>
|
|
||||||
|
|
||||||
using deskflow::test::ExitTimeout;
|
|
||||||
|
|
||||||
const auto testDir = "tmp/test";
|
|
||||||
|
|
||||||
int main(int argc, char **argv)
|
|
||||||
{
|
|
||||||
// HACK: Unit tests should not use the filesystem.
|
|
||||||
std::filesystem::create_directories(testDir);
|
|
||||||
|
|
||||||
ExitTimeout exitTimeout(1, "Integration tests");
|
|
||||||
|
|
||||||
#if SYSAPI_WIN32
|
|
||||||
// record window instance for tray icon, etc
|
|
||||||
ArchMiscWindows::setInstanceWin32(GetModuleHandle(nullptr));
|
|
||||||
#endif
|
|
||||||
|
|
||||||
Arch arch;
|
|
||||||
arch.init();
|
|
||||||
|
|
||||||
Log log;
|
|
||||||
log.setFilter(kDEBUG2);
|
|
||||||
|
|
||||||
::testing::GTEST_FLAG(throw_on_failure) = true;
|
|
||||||
testing::InitGoogleTest(&argc, argv);
|
|
||||||
|
|
||||||
// return code 1 means the test failed.
|
|
||||||
// any other non-zero code is probably a memory error.
|
|
||||||
return RUN_ALL_TESTS();
|
|
||||||
}
|
|
||||||
Loading…
Reference in a new issue