Skip to content

Commit

Permalink
Fix failing test for Windows master CI (use-ink#321)
Browse files Browse the repository at this point in the history
* Debug test

* More debugging

* Add debugging info

* More debugging

* More debugging

* More debugging

* More debugging

* Remove debugging code

* Restore workflow

* Restore workflow

* Test more sub-commands
  • Loading branch information
Michael Müller authored Aug 4, 2021
1 parent d11e1b4 commit f86db30
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@ jobs:
cargo run -- contract new foobar
echo "[workspace]" >> foobar/Cargo.toml
cargo run -- contract build --manifest-path=foobar/Cargo.toml
cargo run -- contract check --manifest-path=foobar/Cargo.toml
cargo run -- contract test --manifest-path=foobar/Cargo.toml
- name: Run tests on {{ matrix.platform }}-${{ matrix.toolchain }}
# The tests take a long time in the GitHub Actions runner (~30 mins),
Expand Down
11 changes: 8 additions & 3 deletions src/cmd/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ fn exec_cargo_for_wasm_target(
// Currently will override user defined RUSTFLAGS from .cargo/config. See https://github.com/paritytech/cargo-contract/issues/98.
std::env::set_var(
"RUSTFLAGS",
"-C link-arg=-z -C link-arg=stack-size=65536 -C link-arg=--import-memory",
"-C link-arg=-zstack-size=65536 -C link-arg=--import-memory",
);

let cargo_build = |manifest_path: &ManifestPath| {
Expand Down Expand Up @@ -940,8 +940,13 @@ mod tests_ci_only {

// then
assert!(res.is_err());
assert!(format!("{:?}", res)
.starts_with("Err(Your wasm-opt version is 98, but we require a version >= 99."));
assert!(
format!("{:?}", res).starts_with(
"Err(Your wasm-opt version is 98, but we require a version >= 99."
),
"Expected a different output, found {:?}",
res
);

Ok(())
})
Expand Down

0 comments on commit f86db30

Please sign in to comment.