diff options
author | faineance <faineance@users.noreply.github.com> | 2016-12-23 21:46:14 +0000 |
---|---|---|
committer | Ravi Shankar <wafflespeanut@gmail.com> | 2017-01-03 13:54:31 +0530 |
commit | 46291fd99862673a39b91a26a748094c15c075b5 (patch) | |
tree | 2ae93d778a348a1e06acbb140c216dfccaa84948 /python/servo/testing_commands.py | |
parent | dd2aa4195ab1ac853a5b80c6aa0a0d9c1fae055c (diff) | |
download | servo-46291fd99862673a39b91a26a748094c15c075b5.tar.gz servo-46291fd99862673a39b91a26a748094c15c075b5.zip |
Add nocapture argument to test-unit
Diffstat (limited to 'python/servo/testing_commands.py')
-rw-r--r-- | python/servo/testing_commands.py | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/python/servo/testing_commands.py b/python/servo/testing_commands.py index 3351984290d..1f03addfc6a 100644 --- a/python/servo/testing_commands.py +++ b/python/servo/testing_commands.py @@ -193,12 +193,14 @@ class MachCommands(CommandBase): @Command('test-unit', description='Run unit tests', category='testing') + @CommandArgument('test_name', nargs=argparse.REMAINDER, + help="Only run tests that match this pattern or file path") @CommandArgument('--package', '-p', default=None, help="Specific package to test") @CommandArgument('--bench', default=False, action="store_true", help="Run in bench mode") - @CommandArgument('test_name', nargs=argparse.REMAINDER, - help="Only run tests that match this pattern or file path") - def test_unit(self, test_name=None, package=None, bench=False): + @CommandArgument('--nocapture', default=False, action="store_true", + help="Run tests with nocapture ( show test stdout )") + def test_unit(self, test_name=None, package=None, bench=False, nocapture=False): if test_name is None: test_name = [] @@ -259,6 +261,10 @@ class MachCommands(CommandBase): if features: args += ["--features", "%s" % ' '.join(features)] + + if nocapture: + args += ["--", "--nocapture"] + err = call(args, env=env, cwd=self.servo_crate()) if err is not 0: return err |