Add quiet mode for test runner(s) (#2228)

In one of the previous PR we have encountered a problem,
where the Travis cuts off the test execution
as the generated log file is too big.

By adding a quiet mode for the test runners, we will
only report the failing tests.

JerryScript-DCO-1.0-Signed-off-by: Peter Gal pgal.u-szeged@partner.samsung.com
This commit is contained in:
Péter Gál
2018-03-02 02:18:17 +01:00
committed by yichoi
parent 575ec7e10a
commit 55058cf151
4 changed files with 34 additions and 11 deletions
+10 -1
View File
@@ -135,6 +135,8 @@ def get_arguments():
parser = argparse.ArgumentParser()
parser.add_argument('--toolchain', metavar='FILE',
help='Add toolchain file')
parser.add_argument('-q', '--quiet', action='store_true',
help='Only print out failing tests')
parser.add_argument('--buildoptions', metavar='LIST',
help='Add a comma separated list of extra build options to each test')
parser.add_argument('--skip-list', metavar='LIST',
@@ -266,6 +268,9 @@ def run_jerry_tests(options):
if options.skip_list:
skip_list.append(options.skip_list)
if options.quiet:
test_cmd.append("-q")
if skip_list:
test_cmd.append("--skip-list=" + ",".join(skip_list))
@@ -292,6 +297,9 @@ def run_jerry_test_suite(options):
else:
test_cmd.append(settings.JERRY_TEST_SUITE_ES51_LIST)
if options.quiet:
test_cmd.append("-q")
if options.skip_list:
test_cmd.append("--skip-list=" + options.skip_list)
@@ -331,7 +339,8 @@ def run_unittests(options):
ret_test |= run_check([
settings.UNITTEST_RUNNER_SCRIPT,
bin_dir_path
bin_dir_path,
"-q" if options.quiet else "",
])
return ret_build | ret_test