-
-
Notifications
You must be signed in to change notification settings - Fork 186
/
justfile
32 lines (24 loc) · 1.3 KB
/
justfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
[private]
default:
@cd {{ invocation_directory() }}; just --choose
_mk-dir name:
rm -rf {{ name }}
mkdir {{ name }}
build-valgrind-path := "build-valgrind-" + os() + "-" + arch()
# Create a build directory for a Debug build without ASAN, so that valgrind can work
mk-build-valgrind: (_mk-dir build-valgrind-path)
cd {{ build-valgrind-path }} ; cmake .. -G Ninja -DCMAKE_BUILD_TYPE=Debug -Dimmer_BUILD_TESTS=ON -Dimmer_BUILD_PERSIST_TESTS=ON -Dimmer_BUILD_EXAMPLES=OFF -DCXX_STANDARD=20
[linux]
run-valgrind:
cd {{ build-valgrind-path }} ; ninja tests && ctest -D ExperimentalMemCheck
[linux]
run-valgrind-persist:
cd {{ build-valgrind-path }} ; ninja persist-tests && valgrind --quiet --error-exitcode=99 --leak-check=full --errors-for-leak-kinds=all \
--suppressions=../test/extra/persist/valgrind.supp \
./test/extra/persist/persist-tests
build-asan-path := "build-asan-" + os() + "-" + arch()
# Create a build directory for a Debug build with ASAN enabled
mk-build-asan: (_mk-dir build-asan-path)
cd {{ build-asan-path }} ; cmake .. -G Ninja -DCMAKE_BUILD_TYPE=Debug -DENABLE_ASAN=ON -Dimmer_BUILD_TESTS=ON -Dimmer_BUILD_PERSIST_TESTS=ON -Dimmer_BUILD_EXAMPLES=OFF -DCXX_STANDARD=20
run-tests-asan:
cd {{ build-asan-path }} ; ninja tests && ninja test