Skip to content

Commit

Permalink
fix: disable system param tests in miri (#484)
Browse files Browse the repository at this point in the history
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 <max.blackllama.alt3@gmail.com>
  • Loading branch information
nelson137 and MaxCWhitehead authored Oct 13, 2024
1 parent 560c259 commit 965b000
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 11 deletions.
7 changes: 6 additions & 1 deletion .github/miri-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pull-requests.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: ⏮️ Pull Requests

on:
pull_request_target:
pull_request:
types:
- opened
- edited
Expand Down
21 changes: 12 additions & 9 deletions framework_crates/bones_framework/tests/system_param.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#![allow(dead_code)]

use std::path::PathBuf;

use bones_framework::prelude::*;
Expand All @@ -20,15 +22,13 @@ fn create_world() -> World {
let mut asset_server = world.init_resource::<AssetServer>();
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
}
Expand Down Expand Up @@ -61,6 +61,7 @@ fn init() {
}

#[test]
#[cfg(not(miri))]
fn core_root_data() {
init();
let world = create_world();
Expand All @@ -69,6 +70,7 @@ fn core_root_data() {
}

#[test]
#[cfg(not(miri))]
fn supplementary_packs_root_data() {
init();

Expand All @@ -90,6 +92,7 @@ fn supplementary_packs_root_data() {
}

#[test]
#[cfg(not(miri))]
fn all_packs_root_data() {
init();

Expand Down

0 comments on commit 965b000

Please sign in to comment.