From 965b000bfe2d2b6cad0e6c32281c47d9c6aed3e6 Mon Sep 17 00:00:00 2001 From: Nelson Earle Date: Sun, 13 Oct 2024 14:26:43 -0500 Subject: [PATCH] fix: disable system param tests in miri (#484) The new system param integration tests added in #482 [fail in miri](https://github.com/fishfolk/bones/actions/runs/11285906933/job/31389426144) due to features unavailable in isolation mode. Disable those tests since there isn't a good way to fix this. --------- Co-authored-by: Max Whitehead --- .github/miri-test.sh | 7 ++++++- .github/workflows/pull-requests.yml | 2 +- .../bones_framework/tests/system_param.rs | 21 +++++++++++-------- 3 files changed, 19 insertions(+), 11 deletions(-) diff --git a/.github/miri-test.sh b/.github/miri-test.sh index 41aa48ada0..9622a65064 100755 --- a/.github/miri-test.sh +++ b/.github/miri-test.sh @@ -37,10 +37,15 @@ get_default_workspace_members() { # The crates to test declare -a CRATES +if (( $# > 0 )); then +CRATES=( "$@" ) +else +CRATES=( $(get_default_workspace_members) ) +fi + # Extra flags to pass to `cargo test` for crates declare -A FLAGS -CRATES=( $(get_default_workspace_members) ) FLAGS[bones_ecs]='--no-default-features -F miri' # Try multiple seeds to catch possible alignment issues diff --git a/.github/workflows/pull-requests.yml b/.github/workflows/pull-requests.yml index 4c328b8ec6..a51fd2f782 100644 --- a/.github/workflows/pull-requests.yml +++ b/.github/workflows/pull-requests.yml @@ -1,7 +1,7 @@ name: ⏮️ Pull Requests on: - pull_request_target: + pull_request: types: - opened - edited diff --git a/framework_crates/bones_framework/tests/system_param.rs b/framework_crates/bones_framework/tests/system_param.rs index 250047ff5f..f61ce6784b 100644 --- a/framework_crates/bones_framework/tests/system_param.rs +++ b/framework_crates/bones_framework/tests/system_param.rs @@ -1,3 +1,5 @@ +#![allow(dead_code)] + use std::path::PathBuf; use bones_framework::prelude::*; @@ -20,15 +22,13 @@ fn create_world() -> World { let mut asset_server = world.init_resource::(); asset_server.set_io(io); - { - let scope = async move { - asset_server.load_assets().await.expect("load test assets"); - while !asset_server.load_progress.is_finished() { - yield_now().await; - } - }; - block_on(scope.boxed()); - } + let scope = async move { + asset_server.load_assets().await.expect("load test assets"); + while !asset_server.load_progress.is_finished() { + yield_now().await; + } + }; + block_on(scope.boxed()); world } @@ -61,6 +61,7 @@ fn init() { } #[test] +#[cfg(not(miri))] fn core_root_data() { init(); let world = create_world(); @@ -69,6 +70,7 @@ fn core_root_data() { } #[test] +#[cfg(not(miri))] fn supplementary_packs_root_data() { init(); @@ -90,6 +92,7 @@ fn supplementary_packs_root_data() { } #[test] +#[cfg(not(miri))] fn all_packs_root_data() { init();