Skip to content

Commit 42fde21

Browse files
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.
1 parent 8fd42ec commit 42fde21

File tree

6 files changed

+514
-2
lines changed

6 files changed

+514
-2
lines changed

src/Cargo.lock

Lines changed: 17 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/bootstrap/Cargo.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,3 +42,6 @@ serde_json = "1.0.2"
4242
toml = "0.4"
4343
lazy_static = "0.2"
4444
time = "0.1"
45+
46+
[dev-dependencies]
47+
pretty_assertions = "0.5"

0 commit comments

Comments
 (0)