Skip to content

Commit fc8cea3

Browse files
committed
Add cross testing env var
1 parent 913ce3e commit fc8cea3

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

tests/integration.rs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,11 @@ fn main() -> Result<()> {
1313
let args = Args::test()?;
1414
config.with_args(&args);
1515

16+
if let Ok(target) = std::env::var("UITEST_TEST_TARGET") {
17+
config.target = Some(target);
18+
config.output_conflict_handling = OutputConflictHandling::Ignore;
19+
}
20+
1621
config.program.args = vec![
1722
"test".into(),
1823
"--color".into(),
@@ -82,6 +87,11 @@ fn main() -> Result<()> {
8287
config.filter("program not found", "No such file or directory");
8388
config.filter(" \\(os error [0-9]+\\)", "");
8489
config.filter("note: rustc 1\\..*", "");
90+
// Cross compilation paths contain an additional target directory name
91+
config.stderr_filter(
92+
"(/target/ui/tests/integrations/[^/]+).*debug/deps",
93+
"$1/debug/deps",
94+
);
8595

8696
let text = ui_test::status_emitter::Text::from(args.format);
8797

0 commit comments

Comments
 (0)