Skip to content

Commit

Permalink
Use CTest's --test-dir argument
Browse files Browse the repository at this point in the history
  • Loading branch information
calcmogul committed May 7, 2024
1 parent 109619a commit ec8f9f7
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:

- run: cmake -B build -S . -DBUILD_EXAMPLES=ON ${{ matrix.cmake-args }}
- run: cmake --build build --config RelWithDebInfo --parallel $(nproc)
- run: ctest -C RelWithDebInfo --output-on-failure
- run: ctest --test-dir build -C RelWithDebInfo --output-on-failure
working-directory: build
- run: cmake --install build --config RelWithDebInfo --prefix pkg

Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/sanitizers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,5 +41,4 @@ jobs:
- run: cmake -B build -S . ${{ matrix.cmake-flags }} -DBUILD_EXAMPLES=ON
- run: cmake --build build --target all --config RelWithDebInfo --parallel $(nproc)
- run: ${{ matrix.ctest-env }} ctest -C RelWithDebInfo --output-on-failure
working-directory: build
- run: ${{ matrix.ctest-env }} ctest --test-dir build -C RelWithDebInfo --output-on-failure
4 changes: 1 addition & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -168,9 +168,7 @@ cmake -B build -S .
cmake --build build

# Test
cd build
ctest
cd ..
ctest --test-dir build --output-on-failure

# Install
cmake --install build --prefix pkgdir
Expand Down

0 comments on commit ec8f9f7

Please sign in to comment.