mirror of
https://github.com/fish-shell/fish-shell.git
synced 2024-11-22 04:18:17 +08:00
cmake/Tests.cmake: Fix failure in cargo test (#9603)
The FISH_RUST_TARGET_DIR is not set for Tests.cmake, the target_dir will set to $CARGO_MANIFEST_DIR/target. But if build.target-dir or CARGO_TARGET_DIR is set, the real target_dir doesn't at the $CARGO_MANIFEST_DIR/target. It causes failure in cargo test. Then, set --target-dir for cargo test. Closes #9600
This commit is contained in:
parent
ad5b3a5b17
commit
5a5cf267b7
|
@ -179,7 +179,7 @@ endforeach(PEXPECT)
|
|||
# Rust stuff.
|
||||
add_test(
|
||||
NAME "cargo-test"
|
||||
COMMAND cargo test
|
||||
COMMAND cargo test --target-dir target
|
||||
WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}/fish-rust"
|
||||
)
|
||||
set_tests_properties("cargo-test" PROPERTIES SKIP_RETURN_CODE ${SKIP_RETURN_CODE})
|
||||
|
@ -187,7 +187,7 @@ add_test_target("cargo-test")
|
|||
|
||||
add_test(
|
||||
NAME "cargo-test-widestring"
|
||||
COMMAND cargo test
|
||||
COMMAND cargo test --target-dir target
|
||||
WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}/fish-rust/widestring-suffix/"
|
||||
)
|
||||
add_test_target("cargo-test-widestring")
|
||||
|
|
Loading…
Reference in New Issue
Block a user