Skip to content

Commit 12b4727

Browse files
authored
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.
1 parent 4232a2a commit 12b4727

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

ci/test.sh

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,13 @@ function retry {
2525
return ${exit_code}
2626
}
2727

28+
workspace_test() {
29+
cross build --target "${TARGET}" --workspace "${@}"
30+
cross run --target "${TARGET}" -p binary "${@}"
31+
cross run --target "${TARGET}" --bin dependencies \
32+
--features=dependencies "${@}"
33+
}
34+
2835
main() {
2936
local td=
3037

@@ -142,9 +149,9 @@ EOF
142149
https://github.com/cross-rs/test-workspace "${td}"
143150

144151
pushd "${td}"
145-
cross run --target "${TARGET}" -p binary --manifest-path="./workspace/Cargo.toml"
152+
TARGET="${TARGET}" workspace_test --manifest-path="./workspace/Cargo.toml"
146153
pushd "workspace"
147-
cross run --target "${TARGET}" -p binary
154+
TARGET="${TARGET}" workspace_test
148155
pushd "binary"
149156
cross run --target "${TARGET}"
150157
popd

0 commit comments

Comments
 (0)