Add quiet unit test reporter

This commit is contained in:
Brad Chase
2017-02-14 15:57:16 -05:00
committed by seelabs
parent 4b0a0b0b85
commit 60416b18a5
8 changed files with 257 additions and 11 deletions

View File

@@ -123,6 +123,12 @@ parser.add_argument(
help='delete all build artifacts after testing',
)
parser.add_argument(
'--quiet', '-q',
action='store_true',
help='Reduce output where possible (unit tests)',
)
parser.add_argument(
'scons_args',
default=(),
@@ -186,9 +192,12 @@ def run_tests(args):
print('Unit tests for', target)
testflag = '--unittest'
quiet = ''
if ARGS.test:
testflag += ('=' + ARGS.test)
resultcode, lines = shell(executable, (testflag,))
if ARGS.quiet:
quiet = '-q'
resultcode, lines = shell(executable, (testflag, quiet,))
if resultcode:
if not ARGS.verbose: