From 77eca4e8196a1afb12656aabb41569df70ab23e8 Mon Sep 17 00:00:00 2001 From: Mark Jansen Date: Fri, 6 Sep 2024 21:51:46 +0200 Subject: [PATCH] Simplify instructions by not changing directories for the ctest command --- docs/contributing.md | 3 +-- tools/scripts/buildAndTest.cmd | 3 +-- tools/scripts/buildAndTest.sh | 3 +-- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/docs/contributing.md b/docs/contributing.md index d9f87fc1..d21323d9 100644 --- a/docs/contributing.md +++ b/docs/contributing.md @@ -107,8 +107,7 @@ cmake -B debug-build -S . -DCMAKE_BUILD_TYPE=Debug --preset all-tests cmake --build debug-build # 4. Run the tests using CTest -cd debug-build -ctest -j 4 --output-on-failure -C Debug +ctest -j 4 --output-on-failure -C Debug --test-dir debug-build ``` snippet source | anchor diff --git a/tools/scripts/buildAndTest.cmd b/tools/scripts/buildAndTest.cmd index 7c10e564..fa359124 100644 --- a/tools/scripts/buildAndTest.cmd +++ b/tools/scripts/buildAndTest.cmd @@ -12,6 +12,5 @@ rem 3. Run the actual build cmake --build debug-build rem 4. Run the tests using CTest -cd debug-build -ctest -j 4 --output-on-failure -C Debug +ctest -j 4 --output-on-failure -C Debug --test-dir debug-build rem end-snippet diff --git a/tools/scripts/buildAndTest.sh b/tools/scripts/buildAndTest.sh index 01a82837..0383c97e 100755 --- a/tools/scripts/buildAndTest.sh +++ b/tools/scripts/buildAndTest.sh @@ -14,6 +14,5 @@ cmake -B debug-build -S . -DCMAKE_BUILD_TYPE=Debug --preset all-tests cmake --build debug-build # 4. Run the tests using CTest -cd debug-build -ctest -j 4 --output-on-failure -C Debug +ctest -j 4 --output-on-failure -C Debug --test-dir debug-build # end-snippet