Skip to content

Commit

Permalink
ci: Prefix test names that need renderer with "render::" make them he…
Browse files Browse the repository at this point in the history
…avy for nextest
  • Loading branch information
torokati44 committed Aug 19, 2024
1 parent 9c87be3 commit ab2aa41
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 3 deletions.
7 changes: 4 additions & 3 deletions .config/nextest.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# TODO: Figure out why this specific test is flaky on CI, fix it, then delete this file.
# This is needed so we don't try to run too many visual tests at the same time,
# as they tend to crash on GitHub Actions runners - maybe due to not enough memory.
[[profile.ci.overrides]]
filter = "test(avm2/pixelbender_shaderdata)"
retries = 3
filter = "test(#render::*)"
threads-required = 2
4 changes: 4 additions & 0 deletions tests/framework/src/options.rs
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,10 @@ impl PlayerOptions {
})
}

pub fn needs_renderer(&self) -> bool {
self.with_renderer.is_some()
}

pub fn create_renderer(
&self,
environment: &impl Environment,
Expand Down
6 changes: 6 additions & 0 deletions tests/framework/src/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,12 @@ impl Test {
let socket_path = test_dir.join("socket.json")?;
let output_path = options.output_path(&test_dir)?;

let name = if options.player_options.needs_renderer() {
format!("render::{}", name)
} else {
name
};

Ok(Self {
options,
swf_path,
Expand Down

0 comments on commit ab2aa41

Please sign in to comment.