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 system param tests in miri #484

Merged
merged 4 commits into from
Oct 13, 2024
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
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
Loading