Stream: t-compiler/help

Topic: `x.py test` stop after the first test failure?


Edd Barrett (Jul 28 2020 at 09:32, on Zulip):

Is there a way to have x.py test stop after the first test failure?

Thanks

bjorn3 (Jul 28 2020 at 09:57, on Zulip):

I don't think either libtest or compiletest_rs (which is built around libtest) has an option for this.

Edd Barrett (Jul 28 2020 at 10:00, on Zulip):

It'd make development turnaround much quicker in some cases. May raise an issue.

Edd Barrett (Jul 28 2020 at 10:10, on Zulip):

https://github.com/rust-lang/rust/issues/74867

Jonas Schievink (Jul 28 2020 at 10:13, on Zulip):

x.py already stops after a test executable reports an error. This is something that needs to be added to libtest and compiletest first, then x.py can expose a flag for this.

Edd Barrett (Jul 28 2020 at 10:47, on Zulip):

x.py already stops after a test executable reports an error.

Yes, it's just that one executable can contain thousands of tests.

Edd Barrett (Jul 28 2020 at 11:01, on Zulip):

Is there a way to run a single test case, rather than the whole executable?

bjorn3 (Jul 28 2020 at 11:05, on Zulip):

Yes, I don't know the exact command, but it is something like ./x.py test src/test/ui -- ui/abc.rs.

Edd Barrett (Jul 28 2020 at 11:22, on Zulip):

I'd have thought:

./x.py test --stage 1 src/test/ui -- ui/abi/stack-probes-lto.rs

no joy.

Jonas Schievink (Jul 28 2020 at 11:30, on Zulip):

it's ./x.py test --stage=1 src/test/ui/abi/stack-probes-lto.rs

Jonas Schievink (Jul 28 2020 at 11:30, on Zulip):

For doctests and unit tests I think you can pass a second argument after -- to filter out the one you want

Edd Barrett (Jul 28 2020 at 11:36, on Zulip):

Thanks!

Joshua Nelson (Jul 28 2020 at 12:36, on Zulip):

you can also pass --test-args which can filter multiple tests at a time

Last update: Sep 28 2020 at 15:45UTC