mirror of
https://github.com/servo/servo.git
synced 2025-08-05 21:50:18 +01:00
mach test-unit -p
should not build all tests
This changes the `mach test-unit -p foo` command to build only the requested crate, not the entire `servo` crate.
This commit is contained in:
parent
910869f63c
commit
32e5679175
1 changed files with 6 additions and 8 deletions
|
@ -119,9 +119,6 @@ class MachCommands(CommandBase):
|
||||||
package = component
|
package = component
|
||||||
|
|
||||||
self.ensure_bootstrapped()
|
self.ensure_bootstrapped()
|
||||||
self.ensure_built_tests()
|
|
||||||
|
|
||||||
ret = self.run_test("servo", test_name) != 0
|
|
||||||
|
|
||||||
def cargo_test(component):
|
def cargo_test(component):
|
||||||
return 0 != subprocess.call(
|
return 0 != subprocess.call(
|
||||||
|
@ -129,12 +126,13 @@ class MachCommands(CommandBase):
|
||||||
+ test_name, env=self.build_env(), cwd=self.servo_crate())
|
+ test_name, env=self.build_env(), cwd=self.servo_crate())
|
||||||
|
|
||||||
if package is not None:
|
if package is not None:
|
||||||
ret = ret or cargo_test(package)
|
return cargo_test(package)
|
||||||
else:
|
|
||||||
|
self.ensure_built_tests()
|
||||||
|
ret = self.run_test("servo", test_name) != 0
|
||||||
for c in os.listdir("components"):
|
for c in os.listdir("components"):
|
||||||
if c != "servo":
|
if c != "servo":
|
||||||
ret = ret or cargo_test(c)
|
ret = ret or cargo_test(c)
|
||||||
|
|
||||||
return ret
|
return ret
|
||||||
|
|
||||||
@Command('test-ref',
|
@Command('test-ref',
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue