Passing existing rustc executable to tests

Hi, I'm trying to run the currently in place testing infrastructure against a pre-built rustc binary, meaning I don't want to build and subsequently test rustc. Is there a way to do this or does it need to implemented?

The current method I've been able to figure out was by manually passing in all the required arguments for compiletest and passing the rustc argument to the one that I want--but unsure if this works. This also feels like it's vulnerable to any changes that might come along to compiletest.

Let me know if I'm on the right track or if I should think about a possible implementation.

You can use a config like rustc_codegen_cranelift/scripts/setup_rust_fork.sh at b7272c236a2d308cd1ee0792d60d95cbf6797f46 · rust-lang/rustc_codegen_cranelift · GitHub together with a test command like rustc_codegen_cranelift/scripts/test_rustc_tests.sh at b7272c236a2d308cd1ee0792d60d95cbf6797f46 · rust-lang/rustc_codegen_cranelift · GitHub

Clever! It also seems to work on remote targets too. Thank you!