File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -149,6 +149,15 @@ if((OPTION_BUILD_ADDRESS_SANITIZER OR OPTION_BUILD_THREAD_SANITIZER) AND NOT RS_
149
149
endif ()
150
150
151
151
# If we have cargo-valgrind, run the tests with it
152
+ # For installing it, first install valgrind on your system, then run:
153
+ # cargo install cargo-valgrind
154
+ # It will install the tooling necesary for running with valgrind.
155
+ # For debugging the project run:
156
+ #
157
+ # cmake -DCMAKE_BUILD_TYPE=Debug -DOPTION_BUILD_PORTS=ON \
158
+ # -DOPTION_BUILD_PORTS_RS=ON -DOPTION_TEST_MEMORYCHECK ..
159
+ #
160
+ # You can also add loaders for this command so you can test with them.
152
161
if (OPTION_TEST_MEMORYCHECK AND NOT (OPTION_BUILD_ADDRESS_SANITIZER OR OPTION_BUILD_THREAD_SANITIZER ))
153
162
# Check if cargo-valgrind is installed
154
163
execute_process (
@@ -162,6 +171,9 @@ if(OPTION_TEST_MEMORYCHECK AND NOT (OPTION_BUILD_ADDRESS_SANITIZER OR OPTION_BUI
162
171
endif ()
163
172
endif ()
164
173
174
+ # For running one test only, you can add:
175
+ # --test=metacall_test --package=metacall
176
+ # To the command, and it will run metacall_test only
165
177
add_test (NAME ${target}
166
178
COMMAND ${Rust_CARGO_EXECUTABLE} ${CARGO_VALGRIND} ${NIGHTLY_FLAGS} test ${BUILD_STD_FLAGS}
167
179
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
You can’t perform that action at this time.
0 commit comments