mirror of
https://github.com/fish-shell/fish-shell
synced 2025-01-14 05:53:59 +00: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
1 changed files with 2 additions and 2 deletions
|
@ -179,7 +179,7 @@ endforeach(PEXPECT)
|
||||||
# Rust stuff.
|
# Rust stuff.
|
||||||
add_test(
|
add_test(
|
||||||
NAME "cargo-test"
|
NAME "cargo-test"
|
||||||
COMMAND cargo test
|
COMMAND cargo test --target-dir target
|
||||||
WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}/fish-rust"
|
WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}/fish-rust"
|
||||||
)
|
)
|
||||||
set_tests_properties("cargo-test" PROPERTIES SKIP_RETURN_CODE ${SKIP_RETURN_CODE})
|
set_tests_properties("cargo-test" PROPERTIES SKIP_RETURN_CODE ${SKIP_RETURN_CODE})
|
||||||
|
@ -187,7 +187,7 @@ add_test_target("cargo-test")
|
||||||
|
|
||||||
add_test(
|
add_test(
|
||||||
NAME "cargo-test-widestring"
|
NAME "cargo-test-widestring"
|
||||||
COMMAND cargo test
|
COMMAND cargo test --target-dir target
|
||||||
WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}/fish-rust/widestring-suffix/"
|
WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}/fish-rust/widestring-suffix/"
|
||||||
)
|
)
|
||||||
add_test_target("cargo-test-widestring")
|
add_test_target("cargo-test-widestring")
|
||||||
|
|
Loading…
Reference in a new issue