mirror of
https://github.com/servo/servo.git
synced 2025-08-02 20:20:14 +01:00
Return the error codes instead of implicitly returning None
This commit is contained in:
parent
ce6d7a735f
commit
b3a0ff5f31
1 changed files with 4 additions and 13 deletions
|
@ -246,9 +246,7 @@ class MachCommands(CommandBase):
|
||||||
|
|
||||||
if features:
|
if features:
|
||||||
args += ["--features", "%s" % ' '.join(features)]
|
args += ["--features", "%s" % ' '.join(features)]
|
||||||
result = call(args, env=env, cwd=self.servo_crate())
|
return call(args, env=env, cwd=self.servo_crate())
|
||||||
if result != 0:
|
|
||||||
return result
|
|
||||||
|
|
||||||
# Run style tests with the testing feature
|
# Run style tests with the testing feature
|
||||||
if has_style:
|
if has_style:
|
||||||
|
@ -257,9 +255,7 @@ class MachCommands(CommandBase):
|
||||||
args += ["%s" % ' '.join(features + ["testing"])]
|
args += ["%s" % ' '.join(features + ["testing"])]
|
||||||
else:
|
else:
|
||||||
args += ["testing"]
|
args += ["testing"]
|
||||||
result = call(args, env=env, cwd=self.servo_crate())
|
return call(args, env=env, cwd=self.servo_crate())
|
||||||
if result != 0:
|
|
||||||
return result
|
|
||||||
|
|
||||||
@Command('test-stylo',
|
@Command('test-stylo',
|
||||||
description='Run stylo unit tests',
|
description='Run stylo unit tests',
|
||||||
|
@ -273,10 +269,7 @@ class MachCommands(CommandBase):
|
||||||
env["CARGO_TARGET_DIR"] = path.join(self.context.topdir, "target", "geckolib").encode("UTF-8")
|
env["CARGO_TARGET_DIR"] = path.join(self.context.topdir, "target", "geckolib").encode("UTF-8")
|
||||||
|
|
||||||
with cd(path.join("ports", "geckolib")):
|
with cd(path.join("ports", "geckolib")):
|
||||||
result = call(["cargo", "test", "-p", "stylo_tests"], env=env)
|
return call(["cargo", "test", "-p", "stylo_tests"], env=env)
|
||||||
|
|
||||||
if result != 0:
|
|
||||||
return result
|
|
||||||
|
|
||||||
@Command('test-compiletest',
|
@Command('test-compiletest',
|
||||||
description='Run compiletests',
|
description='Run compiletests',
|
||||||
|
@ -333,9 +326,7 @@ class MachCommands(CommandBase):
|
||||||
else:
|
else:
|
||||||
env["BUILD_MODE"] = "debug"
|
env["BUILD_MODE"] = "debug"
|
||||||
|
|
||||||
result = call(args, env=env, cwd=self.servo_crate())
|
return call(args, env=env, cwd=self.servo_crate())
|
||||||
if result != 0:
|
|
||||||
return result
|
|
||||||
|
|
||||||
@Command('test-content',
|
@Command('test-content',
|
||||||
description='Run the content tests',
|
description='Run the content tests',
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue