Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: disable integration tests that are broken on mac #8412

Merged
merged 4 commits into from
Jan 22, 2023

Conversation

wacban
Copy link
Contributor

@wacban wacban commented Jan 20, 2023

I made two types of tests conditionally compiled to exclude them from running on macbooks - because they don't work on macs anyway.

  • test_two_deployments
    The test relies on the contract cache to be populated but the precompile method of the wasmtime runner doesn’t populate the cache
  • test_wasmer2_upgrade
    The test checks transition from wasmer0 to wasmer2 but wasmer0 and wasmer2 are not available on macs

@wacban wacban force-pushed the waclaw-disable-broken-on-mac branch 2 times, most recently from 357e372 to 4366941 Compare January 20, 2023 14:34
@wacban wacban requested a review from nagisa January 20, 2023 14:35
use nearcore::config::GenesisExt;
#[cfg(all(feature = "wasmer0_vm", feature = "wasmer2_vm"))]
mod test_wasmer2_upgrade {
use crate::tests::client::process_blocks::{create_nightshade_runtimes, deploy_test_contract};
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

best to review this with "hide whitespace" enabled...

@wacban wacban marked this pull request as ready for review January 20, 2023 14:36
@wacban wacban requested a review from a team as a code owner January 20, 2023 14:36
@wacban
Copy link
Contributor Author

wacban commented Jan 20, 2023

TODO: after buildkite is done check logs and make sure that the tests were ran there

@wacban
Copy link
Contributor Author

wacban commented Jan 20, 2023

TODO: after buildkite is done check logs and make sure that the tests were ran there

Done, buildkite picked up all tests.

@@ -3473,6 +3473,8 @@ fn test_catchup_no_sharding_change() {
}
}

/// These tests fail on aarch because the WasmtimeVM::precompile method doesn't populate the cache.
#[cfg(not(all(target_arch = "aarch64", target_vendor = "apple")))]
Copy link
Collaborator

@nagisa nagisa Jan 20, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thinking on this further, this is probably be better off as

#[cfg_attr(not(all(...)), ignore)]

on top of each failing test. A regular cfg as used here (admittedly suggested by myself at first) has a major downside – the code inside is not compiled. So if anybody on a Mac were to go on and change API of something that these tests touch, they would only learn of the fact that these tests do not compile at the CI. That's a pretty poor experience. A conditional #[ignore] helps with that issue a lot.

@wacban wacban force-pushed the waclaw-disable-broken-on-mac branch from b059135 to 44741f3 Compare January 22, 2023 17:42
@wacban wacban requested a review from nagisa January 22, 2023 17:46
@near-bulldozer near-bulldozer bot merged commit 9d2a900 into master Jan 22, 2023
@near-bulldozer near-bulldozer bot deleted the waclaw-disable-broken-on-mac branch January 22, 2023 19:53
near-bulldozer bot pushed a commit that referenced this pull request Apr 18, 2023
As it fails with:
```
thread 'tests::test_contract_precompilation' panicked at 'Compilation result should be non-empty', runtime/runtime/src/lib.rs:2550:14
```
presumably, because the compilation cache is not populated on aarch64-apple.

A prior art: #8412
nikurt pushed a commit that referenced this pull request Apr 18, 2023
As it fails with:
```
thread 'tests::test_contract_precompilation' panicked at 'Compilation result should be non-empty', runtime/runtime/src/lib.rs:2550:14
```
presumably, because the compilation cache is not populated on aarch64-apple.

A prior art: #8412
nikurt pushed a commit that referenced this pull request Apr 25, 2023
As it fails with:
```
thread 'tests::test_contract_precompilation' panicked at 'Compilation result should be non-empty', runtime/runtime/src/lib.rs:2550:14
```
presumably, because the compilation cache is not populated on aarch64-apple.

A prior art: #8412
nikurt pushed a commit that referenced this pull request Apr 28, 2023
As it fails with:
```
thread 'tests::test_contract_precompilation' panicked at 'Compilation result should be non-empty', runtime/runtime/src/lib.rs:2550:14
```
presumably, because the compilation cache is not populated on aarch64-apple.

A prior art: #8412
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants