Description
Right now we have the ability to test rust programs that consist of entirely rust source code through the various src/test/XXX
suites. I've been thinking recently that we may want a "fancy suite" which supports lots of custom-building options like mixing C/C++ with rust in various flavorful ways. Some examples of this would be:
- Printing "hello world" from a rust library which is bootstrapped from C
- This would show a basic usage of bootstrapping the runtime externally
- Exporting a symbol to get used from C at various locations in a library
- Calling back and forth between C and Rust to make sure that things work out OK
- Possibly other flavorful things with
#[no_std]
and friends (but perhaps limited support for I/O).
I was thinking something along the lines of src/test/fancy-suite/testname/Makefile
would basically be the "run this test" rules. Each test would be responsible for doing its own validation of output/errors/whatnot.
I'm not sure if this really warrants a whole new style of testing infrastructure, but some of the use cases that'd be nice to test I don't know how to test today. Although perhaps in theory they could all be written in just a rust program in src/test/run-pass
, but the makefiles/such will probably need defines for the rustc and friends to use.