Skip to content

Commit

Permalink
Merge pull request #360 from cottsay/cottsay/top-level-tests
Browse files Browse the repository at this point in the history
Call enable_testing() in top-level project
  • Loading branch information
christian-rauch authored Oct 14, 2024
2 parents 1121fea + aa503c5 commit 4dfd338
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/cmake-multi-platform.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ jobs:
- name: Test
working-directory: ${{ steps.strings.outputs.build-output-dir }}
run: |
ctest --build-config ${{ matrix.build_type }} --no-tests=error --output-on-failure --verbose --test-dir test/
ctest --build-config ${{ matrix.build_type }} --no-tests=error --output-on-failure --verbose
- name: Test Python Module Import
working-directory: ${{ steps.strings.outputs.build-output-dir }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/cmake-ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,6 @@ jobs:
run: cmake --build ${{ steps.strings.outputs.build-output-dir }} --target install

- name: Test
working-directory: ${{ steps.strings.outputs.build-output-dir }}/test
working-directory: ${{ steps.strings.outputs.build-output-dir }}
run: |
ctest --no-tests=error --output-on-failure --verbose
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -215,5 +215,6 @@ if (BUILD_EXAMPLES)
endif()

if(BUILD_TESTING)
enable_testing()
add_subdirectory(test)
endif()
2 changes: 0 additions & 2 deletions test/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
enable_testing()

add_library(getline OBJECT getline.c)

add_executable(test_detection test_detection.c)
Expand Down

0 comments on commit 4dfd338

Please sign in to comment.