]> git.lizzy.rs Git - rust.git/commit
Add tests to rustbuild
authorMark Simulacrum <mark.simulacrum@gmail.com>
Sat, 10 Mar 2018 14:03:06 +0000 (07:03 -0700)
committerMark Simulacrum <mark.simulacrum@gmail.com>
Tue, 3 Apr 2018 17:41:50 +0000 (11:41 -0600)
commit42fde21c27c67ce3c665e344b602cfd1d22842cc
tree360e19e105e1aad9f1f4e4372b0655e3764b83b9
parent8fd42ec130148cb49e83028153f17dab6843966e
Add tests to rustbuild

In order to run tests, previous commits have cfg'd out various parts of
rustbuild. Generally speaking, these are filesystem-related operations
and process-spawning related parts. Then, rustbuild is run "as normal"
and the various steps that where run are retrieved from the cache and
checked against the expected results.

Note that this means that the current implementation primarily tests
"what" we build, but doesn't actually test that what we build *will*
build. In other words, it doesn't do any form of dependency verification
for any crate. This is possible to implement, but is considered future
work.

This implementation strives to cfg out as little code as possible; it
also does not currently test anywhere near all of rustbuild. The current
tests are also not checked for "correctness," rather, they simply
represent what we do as of this commit, which may be wrong.

Test cases are drawn from the old implementation of rustbuild, though
the expected results may vary.
src/Cargo.lock
src/bootstrap/Cargo.toml
src/bootstrap/builder.rs
src/bootstrap/cache.rs
src/bootstrap/lib.rs
src/bootstrap/test.rs