Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions xtask/tests/command_orchestration.rs
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,11 @@ fn release_critical_orchestrators_run_from_the_workspace_without_real_cargo() {
assert!(log.contains("package -p j2k-core --list|"));
assert!(log.contains("publish -p j2k-core --dry-run|"));
assert!(log.contains("package -p j2k-cli --no-verify"));
#[cfg(target_os = "macos")]
{
assert!(log.contains("git rev-parse v0.7.5^{commit}"));
assert!(log.contains("git show v0.7.5:docs/stable-api-1.0.public-api.txt"));
}
}

fn assert_stable_api_fails_at_expected_boundary(output: &Output, context: &str) {
Expand Down
5 changes: 3 additions & 2 deletions xtask/tests/command_orchestration/support.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,14 +53,14 @@ impl Harness {
.expect("write fake cargo-machete");
make_executable(&cargo_machete, "fake cargo-machete");
let git = root.join("git");
let baseline_snapshot = root.join("stable-api-0.7.3.public-api.txt");
let baseline_snapshot = root.join("stable-api-0.7.5.public-api.txt");
fs::write(&baseline_snapshot, synthetic_baseline_snapshot())
.expect("write synthetic baseline API snapshot");
let real_git = find_program("git");
fs::write(
&git,
format!(
"#!/bin/sh\nprintf 'git %s\\n' \"$*\" >> '{}'\nif [ \"$1\" = status ]; then exit 0; fi\nif [ \"$1\" = config ] && [ \"$2\" = --get ] && [ \"$3\" = remote.origin.url ]; then printf '%s\\n' 'git@example.invalid:frames-sg/j2k.git'; exit 0; fi\nif [ \"$1\" = rev-parse ] && [ \"$2\" = 'v0.7.3^{{commit}}' ]; then printf '%s\\n' '494eebc3ef20895d331da86221b1d8c4bd4cabf8'; exit 0; fi\nif [ \"$1\" = show ] && [ \"$2\" = 'v0.7.3:docs/stable-api-1.0.public-api.txt' ]; then exec cat '{}'; fi\nexec \"{}\" \"$@\"\n",
"#!/bin/sh\nprintf 'git %s\\n' \"$*\" >> '{}'\nif [ \"$1\" = status ]; then exit 0; fi\nif [ \"$1\" = config ] && [ \"$2\" = --get ] && [ \"$3\" = remote.origin.url ]; then printf '%s\\n' 'git@example.invalid:frames-sg/j2k.git'; exit 0; fi\nif [ \"$1\" = rev-parse ] && [ \"$2\" = 'v0.7.5^{{commit}}' ]; then printf '%s\\n' 'a89abb6e7eba469c44b3735740712c2a85be0499'; exit 0; fi\nif [ \"$1\" = show ] && [ \"$2\" = 'v0.7.5:docs/stable-api-1.0.public-api.txt' ]; then exec cat '{}'; fi\nif [ \"$1\" = rev-parse ] && [ \"${{2#v}}\" != \"$2\" ]; then printf 'unexpected release revision: %s\\n' \"$2\" >&2; exit 97; fi\nif [ \"$1\" = show ] && [ \"${{2#v}}\" != \"$2\" ]; then printf 'unexpected release object: %s\\n' \"$2\" >&2; exit 97; fi\nexec \"{}\" \"$@\"\n",
log.display(),
baseline_snapshot.display(),
real_git.display()
Expand Down Expand Up @@ -279,6 +279,7 @@ fn synthetic_baseline_snapshot() -> String {
"j2k-types",
"j2k-cuda-runtime",
"j2k-profile",
"j2k-ml",
] {
writeln!(
snapshot,
Expand Down
Loading