mirror of
https://github.com/servo/servo.git
synced 2025-10-01 09:09:15 +01:00
Make mach test-unit
not recompile components after mach build
Previously, the `tests` feature flag of the `embedder_traits` crate caused it and every crate recursively depending on it to be built twice. This feature flag was used to provide a specific set of "resources" when running tests. Instead, this commits overrides the `main()` function of the test harness to change resources at runtime before running any test. This is done by adding a dependency that has `name = "test"` in its `[lib]` section of `Cargo.toml`. This overrides the crate found by `extern crate test;` in code generated by `rustc --test`.
This commit is contained in:
parent
76ddbe4d7a
commit
1f7ebfc8a2
17 changed files with 50 additions and 42 deletions
11
Cargo.lock
generated
11
Cargo.lock
generated
|
@ -2316,6 +2316,7 @@ dependencies = [
|
|||
"servo_channel 0.0.1",
|
||||
"servo_config 0.0.1",
|
||||
"servo_url 0.0.1",
|
||||
"std_test_override 0.0.1",
|
||||
"threadpool 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"time 0.1.37 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"unicase 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
|
@ -2355,6 +2356,7 @@ dependencies = [
|
|||
"servo_arc 0.1.1",
|
||||
"servo_config 0.0.1",
|
||||
"servo_url 0.0.1",
|
||||
"std_test_override 0.0.1",
|
||||
"url 1.6.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"uuid 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"webrender_api 0.57.2 (git+https://github.com/servo/webrender)",
|
||||
|
@ -3392,6 +3394,7 @@ dependencies = [
|
|||
"serde 1.0.66 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"servo_geometry 0.0.1",
|
||||
"servo_url 0.0.1",
|
||||
"std_test_override 0.0.1",
|
||||
"url 1.6.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
|
@ -3525,6 +3528,13 @@ name = "stable_deref_trait"
|
|||
version = "1.0.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
|
||||
[[package]]
|
||||
name = "std_test_override"
|
||||
version = "0.0.1"
|
||||
dependencies = [
|
||||
"embedder_traits 0.0.1",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "string_cache"
|
||||
version = "0.7.3"
|
||||
|
@ -3647,6 +3657,7 @@ dependencies = [
|
|||
"servo_config 0.0.1",
|
||||
"servo_url 0.0.1",
|
||||
"size_of_test 0.0.1",
|
||||
"std_test_override 0.0.1",
|
||||
"style 0.0.1",
|
||||
"style_traits 0.0.1",
|
||||
]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue