From 12b47276428c5f07000ac2bf40162df6b4934216 Mon Sep 17 00:00:00 2001 From: Alexander Huszagh Date: Tue, 7 Jun 2022 11:15:44 -0500 Subject: [PATCH] Update workspace tests Ensure we build the entire workspace using the `--workspace` flag both with and without the manifest path, and also ensure we build the binary with all our workspace dependencies. --- ci/test.sh | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/ci/test.sh b/ci/test.sh index 137830a60..623d5fe15 100755 --- a/ci/test.sh +++ b/ci/test.sh @@ -25,6 +25,13 @@ function retry { return ${exit_code} } +workspace_test() { + cross build --target "${TARGET}" --workspace "${@}" + cross run --target "${TARGET}" -p binary "${@}" + cross run --target "${TARGET}" --bin dependencies \ + --features=dependencies "${@}" +} + main() { local td= @@ -142,9 +149,9 @@ EOF https://github.com/cross-rs/test-workspace "${td}" pushd "${td}" - cross run --target "${TARGET}" -p binary --manifest-path="./workspace/Cargo.toml" + TARGET="${TARGET}" workspace_test --manifest-path="./workspace/Cargo.toml" pushd "workspace" - cross run --target "${TARGET}" -p binary + TARGET="${TARGET}" workspace_test pushd "binary" cross run --target "${TARGET}" popd