Skip to content

Commit

Permalink
Fix connection test for GAMMARAY_CLIENT_ONLY_BUILD=ON
Browse files Browse the repository at this point in the history
  • Loading branch information
dantti committed Dec 19, 2023
1 parent 0413880 commit 94f6aed
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 32 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ jobs:
if: ${{ runner.os == 'Linux' && matrix.config.qt_major == 5 }}
run: >
ctest --test-dir ./build -C ${{ matrix.build_type }} --output-on-failure
--exclude-regex "quickmaterialtest|quicktexturetest|connectiontest-*|problemreportertest|timertoptest"
--exclude-regex "quickmaterialtest|quicktexturetest|problemreportertest|timertoptest"
env:
QT_QPA_PLATFORM: offscreen
QT_QUICK_BACKEND: software
Expand All @@ -99,7 +99,7 @@ jobs:
if: ${{ runner.os == 'Linux' && matrix.config.qt_major == 6 }}
run: >
ctest --test-dir ./build -C ${{ matrix.build_type }} --output-on-failure
--exclude-regex "quickmaterialtest|quicktexturetest|connectiontest-*|bindinginspectortest|quickinspectortest|quickinspectortest2|modelinspectortest|problemreportertest|timertoptest"
--exclude-regex "quickmaterialtest|quicktexturetest|bindinginspectortest|quickinspectortest|quickinspectortest2|modelinspectortest|problemreportertest|timertoptest"
env:
QT_QPA_PLATFORM: offscreen
QT_QUICK_BACKEND: software
Expand All @@ -118,7 +118,7 @@ jobs:
if: ${{ runner.os == 'macOS' && matrix.config.qt_major == 5 }}
run: >
ctest --test-dir ./build -C ${{ matrix.build_type }} --output-on-failure
--exclude-regex "connectiontest-*|probeabidetectortest|launchertest|quickinspectortest2|problemreportertest|timertoptest"
--exclude-regex "probeabidetectortest|launchertest|quickinspectortest2|problemreportertest|timertoptest"
# Exclude
#1 - connectiontest-preload (Failed)
Expand All @@ -138,7 +138,7 @@ jobs:
run: >
ctest --test-dir ./build -C ${{ matrix.build_type }} --output-on-failure
--exclude-regex
"connectiontest-*|probeabidetectortest|launchertest|clientconnectiontest|modelinspectortest|quickinspectortest2|bindinginspectortest|quicktexturetest|problemreportertest|timertoptest"
"probeabidetectortest|launchertest|clientconnectiontest|modelinspectortest|quickinspectortest2|bindinginspectortest|quicktexturetest|problemreportertest|timertoptest"
# Exclude
# quicktexturetest
Expand All @@ -147,7 +147,7 @@ jobs:
if: ${{ runner.os == 'Windows' && matrix.config.qt_major == 5 }}
run: >
ctest --test-dir ./build -C ${{ matrix.build_type }} --output-on-failure
--exclude-regex "quicktexturetest|bindinginspectortest|connectiontest-*|problemreportertest|timertoptest|problemreportertest|timertoptest"
--exclude-regex "quicktexturetest|bindinginspectortest|problemreportertest|timertoptest|problemreportertest|timertoptest"
# Exclude
# quicktexturetest
Expand All @@ -157,7 +157,7 @@ jobs:
if: ${{ runner.os == 'Windows' && matrix.config.qt_major == 6 }}
run: >
ctest --test-dir ./build -C ${{ matrix.build_type }} --output-on-failure
--exclude-regex "quicktexturetest|launchertest|bindinginspectortest|modelinspectortest|connectiontest-*|problemreportertest|timertoptest|probesettingstest"
--exclude-regex "quicktexturetest|launchertest|bindinginspectortest|modelinspectortest|problemreportertest|timertoptest|probesettingstest"
- name: Read tests log when it fails
uses: andstor/file-reader-action@v1
Expand Down
55 changes: 29 additions & 26 deletions tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -172,32 +172,35 @@ elseif(WIN32)
list(APPEND INJECTOR_TYPES windll style)
endif()

foreach(injectorType ${INJECTOR_TYPES})
add_test(
connectiontest-${injectorType}
${PROJECT_BINARY_DIR}/${BIN_INSTALL_DIR}/gammaray
--inprocess
--listen
tcp://127.0.0.1
-unittest
-i
${injectorType}
${PROJECT_BINARY_DIR}/${BIN_INSTALL_DIR}/connectiontest
)
add_test(
connectiontest-${injectorType}-filter
${PROJECT_BINARY_DIR}/${BIN_INSTALL_DIR}/gammaray
--inprocess
-unittest
--listen
tcp://127.0.0.1
-filtertest
-i
${injectorType}
${PROJECT_BINARY_DIR}/${BIN_INSTALL_DIR}/connectiontest
)
set_tests_properties(connectiontest-${injectorType}-filter PROPERTIES ENVIRONMENT GAMMARAY_TEST_FILTER=1)
endforeach()
if(NOT GAMMARAY_CLIENT_ONLY_BUILD)
# No probes are available in client only build
foreach(injectorType ${INJECTOR_TYPES})
add_test(
connectiontest-${injectorType}
${PROJECT_BINARY_DIR}/${BIN_INSTALL_DIR}/gammaray
--inprocess
--listen
tcp://127.0.0.1
-unittest
-i
${injectorType}
${PROJECT_BINARY_DIR}/${BIN_INSTALL_DIR}/connectiontest
)
add_test(
connectiontest-${injectorType}-filter
${PROJECT_BINARY_DIR}/${BIN_INSTALL_DIR}/gammaray
--inprocess
-unittest
--listen
tcp://127.0.0.1
-filtertest
-i
${injectorType}
${PROJECT_BINARY_DIR}/${BIN_INSTALL_DIR}/connectiontest
)
set_tests_properties(connectiontest-${injectorType}-filter PROPERTIES ENVIRONMENT GAMMARAY_TEST_FILTER=1)
endforeach()
endif()

#
# common and core unit tests
Expand Down

0 comments on commit 94f6aed

Please sign in to comment.