How do I run
#[test] tests in various
librustc_x crates? I've tried
./x.py --stage 1 test src/librustc_lexer, but that unfortunately compiles the whole compiler before actually running the tests.
I don't think you can pick the crates to test, nor avoid compiling the compiler
Yeah, there's an open issue about that
Did you see https://github.com/rust-lang/rust/pull/62996 ?
that helps with the reason we need to do it but I think rustbuild might still be "dumb" and not do the right thing quite yet
Heh, the discussion in #61097 seems interesting. Presumably, if we move forward with librarification of compiler, plain old unit tests and cargo integration tests would become more important.
With #61097 unit tests require building the whole compiler once, after that they can be modified and run immediately with
./x.py test --stage 0 src/librustc_lexer.