Skip to content

Commit

Permalink
Merge pull request #164 from eseiler/infra/test_target
Browse files Browse the repository at this point in the history
[FIX] test target
  • Loading branch information
eseiler authored Nov 7, 2024
2 parents 653eb92 + 278b149 commit 9099418
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci_coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ jobs:
- name: Run tests
working-directory: build
run: ctest . -j --output-on-failure --test-dir test
run: ctest -j

- name: Generate coverage report
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci_install.yml
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ jobs:
if: contains(matrix.compiler, 'gcc')
working-directory: build
run: |
unshare -r -n ctest -j --output-on-failure --test-dir test
unshare -r -n ctest -j
test -z $(find . -type f -executable -name "needle") # needle binary should not exist
- name: Upload source package
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci_linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,5 +63,5 @@ jobs:
- name: Run tests
working-directory: build
run: ctest -j --output-on-failure --test-dir test
run: ctest -j

2 changes: 1 addition & 1 deletion .github/workflows/ci_macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,4 +58,4 @@ jobs:
- name: Run tests
working-directory: build
run: ctest -j --output-on-failure --test-dir test
run: ctest -j
2 changes: 1 addition & 1 deletion .github/workflows/ci_sanitizer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -96,5 +96,5 @@ jobs:

- name: Run tests
working-directory: build
run: ctest -j1 --output-on-failure --test-dir test
run: ctest -j1

3 changes: 2 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@ CPMGetPackage (robin-hood)
add_subdirectory (src)

if (NEEDLE_TEST)
# Add the tests. This will include `test/CMakeLists.txt`.
list (APPEND CMAKE_CTEST_ARGUMENTS "--output-on-failure;--no-tests=error") # Must be before `enable_testing ()`.
enable_testing ()
add_subdirectory (test EXCLUDE_FROM_ALL)
endif ()

Expand Down
3 changes: 0 additions & 3 deletions cmake/test/config.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@ include (test/coverage)

CPMGetPackage (googletest)

list (APPEND CMAKE_CTEST_ARGUMENTS "--output-on-failure") # Must be before `enable_testing ()`.
enable_testing ()

# Set directories for test output files, input data and binaries.
file (MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/output)
add_definitions (-DOUTPUTDIR=\"${CMAKE_CURRENT_BINARY_DIR}/output/\")
Expand Down

0 comments on commit 9099418

Please sign in to comment.