From 9cbebaef06aeae6a5c76dd0e832ad714405ec329 Mon Sep 17 00:00:00 2001 From: light7734 Date: Wed, 8 Oct 2025 09:02:15 +0330 Subject: [PATCH] ci: fix paths --- tools/ci/amd64/clang/coverage.sh | 16 ++++++++-------- tools/ci/amd64/clang/lsan.sh | 4 ++-- tools/ci/amd64/clang/msan.sh | 4 ++-- tools/ci/amd64/gcc/unit_tests.sh | 4 ++-- tools/ci/amd64/gcc/valgrind.sh | 4 ++-- 5 files changed, 16 insertions(+), 16 deletions(-) diff --git a/tools/ci/amd64/clang/coverage.sh b/tools/ci/amd64/clang/coverage.sh index d82e4a1..d99672b 100755 --- a/tools/ci/amd64/clang/coverage.sh +++ b/tools/ci/amd64/clang/coverage.sh @@ -17,12 +17,12 @@ cmake . \ -DENABLE_LLVM_COVERAGE=ON \ -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_CXX_FLAGS="-std=c++23 -stdlib=libc++ -g -fno-omit-frame-pointer" \ -&& cmake --build . -j `nproc` +&& cmake --build ./build -j `nproc` -mkdir -p ./coverage/ -for test in $(find ./ -type f -name '*_tests' -executable); do - export LLVM_PROFILE_FILE="./coverage/$(basename "$(dirname "$test")").profraw"; - echo ${LLVM_PROFILE_FILE} >> ./coverage/list; +mkdir -p ./build/coverage/ +for test in $(find ./build -type f -name '*_tests' -executable); do + export LLVM_PROFILE_FILE="./build/coverage/$(basename "$(dirname "$test")").profraw"; + echo ${LLVM_PROFILE_FILE} >> ./build/coverage/list; gdb \ --return-child-result \ @@ -36,12 +36,12 @@ for test in $(find ./ -type f -name '*_tests' -executable); do done llvm-profdata merge --input-files './coverage/list' -o "./coverage/merged.profdata" -find ./modules -type f -name "*.profraw" -exec rm -fv {} + +find ./build/modules -type f -name "*.profraw" -exec rm -fv {} + LLVM_COV_SHOW=$(llvm-cov show \ -instr-profile='./coverage/merged.profdata' \ - $(find ./ -type f -name '*_tests' -executable -exec printf -- '-object %s ' {} \;) \ - $(find ./ -type f -name '*\.a' -exec printf -- '-object %s ' {} \;) \ + $(find ./build -type f -name '*_tests' -executable -exec printf -- '-object %s ' {} \;) \ + $(find ./build -type f -name '*\.a' -exec printf -- '-object %s ' {} \;) \ -ignore-filename-regex='\.test\.cpp$' \ -ignore-filename-regex='\.fuzz\.cpp$' ) diff --git a/tools/ci/amd64/clang/lsan.sh b/tools/ci/amd64/clang/lsan.sh index 537aa63..6298d9e 100755 --- a/tools/ci/amd64/clang/lsan.sh +++ b/tools/ci/amd64/clang/lsan.sh @@ -28,9 +28,9 @@ cmake . \ -lc++ \ -lc++abi \ -Wl,-rpath,/libcxx_lsan/lib" \ -&& cmake --build . -j`nproc` +&& cmake --build ./build -j`nproc` -for test in $(find ./ -type f -name '*_tests' -executable); do +for test in $(find ./build -type f -name '*_tests' -executable); do echo "Running $test" "$test" done diff --git a/tools/ci/amd64/clang/msan.sh b/tools/ci/amd64/clang/msan.sh index 247ce48..5cc6321 100755 --- a/tools/ci/amd64/clang/msan.sh +++ b/tools/ci/amd64/clang/msan.sh @@ -30,9 +30,9 @@ cmake . \ -lc++ \ -lc++abi \ -Wl,-rpath,/libcxx_msan/lib" \ -&& cmake --build . -j`nproc` +&& cmake --build ./build -j`nproc` -for test in $(find ./ -type f -name '*_tests' -executable); do +for test in $(find ./build -type f -name '*_tests' -executable); do echo "Running $test" "$test" done diff --git a/tools/ci/amd64/gcc/unit_tests.sh b/tools/ci/amd64/gcc/unit_tests.sh index e113257..daee55d 100755 --- a/tools/ci/amd64/gcc/unit_tests.sh +++ b/tools/ci/amd64/gcc/unit_tests.sh @@ -17,9 +17,9 @@ cmake . \ -DENABLE_UNIT_TESTS=ON \ -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_CXX_FLAGS="-std=c++23 -g -fno-omit-frame-pointer" \ -&& cmake --build . -j `nproc` +&& cmake --build ./build -j `nproc` -for test in $(find ./ -type f -name '*_tests' -executable); do +for test in $(find ./build -type f -name '*_tests' -executable); do echo "Running $test" gdb \ --return-child-result \ diff --git a/tools/ci/amd64/gcc/valgrind.sh b/tools/ci/amd64/gcc/valgrind.sh index 8c6ae23..22cd435 100755 --- a/tools/ci/amd64/gcc/valgrind.sh +++ b/tools/ci/amd64/gcc/valgrind.sh @@ -19,9 +19,9 @@ cmake . \ -DENABLE_UNIT_TESTS=ON \ -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_CXX_FLAGS="-std=c++23 -g -fno-omit-frame-pointer" \ -&& cmake --build . -j `nproc` +&& cmake --build ./build -j `nproc` -for test in $(find ./ -type f -name '*_tests' -executable); do +for test in $(find ./build -type f -name '*_tests' -executable); do echo "Running $test" valgrind \ --leak-check=full \