aboutsummaryrefslogtreecommitdiff
path: root/verif/runner
diff options
context:
space:
mode:
Diffstat (limited to 'verif/runner')
-rw-r--r--verif/runner/tosa_refmodel_sut_run.py8
-rw-r--r--verif/runner/tosa_test_runner.py9
-rw-r--r--verif/runner/tosa_verif_run_tests.py7
3 files changed, 16 insertions, 8 deletions
diff --git a/verif/runner/tosa_refmodel_sut_run.py b/verif/runner/tosa_refmodel_sut_run.py
index b9a9575..2aeb7b1 100644
--- a/verif/runner/tosa_refmodel_sut_run.py
+++ b/verif/runner/tosa_refmodel_sut_run.py
@@ -58,12 +58,8 @@ class TosaSUTRunner(TosaTestRunner):
graphResult = TosaTestRunner.TosaGraphResult.TOSA_UNPREDICTABLE
else:
graphResult = TosaTestRunner.TosaGraphResult.OTHER_ERROR
- if (
- self.args.verbose
- or graphResult == TosaTestRunner.TosaGraphResult.OTHER_ERROR
- ):
- print(e)
-
+ if not self.args.verbose:
+ print(e)
except Exception as e:
print(e)
graphMessage = str(e)
diff --git a/verif/runner/tosa_test_runner.py b/verif/runner/tosa_test_runner.py
index 0fd7f13..d653a94 100644
--- a/verif/runner/tosa_test_runner.py
+++ b/verif/runner/tosa_test_runner.py
@@ -7,6 +7,7 @@ from pathlib import Path
from checker.tosa_result_checker import LogColors
from checker.tosa_result_checker import print_color
+from checker.tosa_result_checker import set_print_in_color
from checker.tosa_result_checker import test_check
from json2fbbin import json2fbbin
@@ -39,6 +40,8 @@ class TosaTestRunner:
self.testDir = testDir
self.testName = Path(self.testDir).name
+ set_print_in_color(not args.no_color)
+
# Check if we want to run binary and if its already converted
descFilePath = Path(testDir, "desc.json")
descBinFilePath = Path(testDir, "desc_binary.json")
@@ -165,9 +168,11 @@ class TosaTestRunner:
result == TosaTestRunner.Result.EXPECTED_FAILURE
or result == TosaTestRunner.Result.EXPECTED_PASS
):
- print_color(LogColors.GREEN, "Results PASS {}".format(self.testName))
+ print_color(
+ LogColors.GREEN, "Result code PASS {}".format(self.testName)
+ )
else:
- print_color(LogColors.RED, "Results FAIL {}".format(self.testName))
+ print_color(LogColors.RED, "Result code FAIL {}".format(self.testName))
return result, resultMessage
diff --git a/verif/runner/tosa_verif_run_tests.py b/verif/runner/tosa_verif_run_tests.py
index dd86950..b400d76 100644
--- a/verif/runner/tosa_verif_run_tests.py
+++ b/verif/runner/tosa_verif_run_tests.py
@@ -119,6 +119,13 @@ def parseArgs(argv):
choices=["positive", "negative", "both"],
help="Filter tests based on expected failure status (positive, negative or both)",
)
+ parser.add_argument(
+ "--no-color",
+ "--no-colour",
+ dest="no_color",
+ action="store_true",
+ help="Disable color output",
+ )
args = parser.parse_args(argv)