From 40b0614be3296e163654c4e293793d00bcf36a5a Mon Sep 17 00:00:00 2001 From: Fabio Rinaldi Date: Wed, 12 Feb 2020 16:18:50 +0000 Subject: Checker: Add function isaHasFeature Developers are now able to use hasIsaFeature("feature_name") to check if an instruction set feature was used at compile time. Checker will retrieve the list of features from the .cfg file. It expects them to be dumped at the beginning of the file as a fake compilation block in the following form: begin_compilation name "isa_features:feature1,-feature2" method "isa_features:feature1,-feature2" date 1580721972 end_compilation Dumping that is optional. hasIsaFeature() will always return False if that pass is not found. Author: Fabio Rinaldi Committer: Artem Serov Bug: 147876827 Test: ./art/tools/checker/run_unit_tests.py Test: test.py --target --optimizing Change-Id: I4ce15d853025f9863d7981b33b761cfc799fed50 --- tools/checker/common/logger.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'tools/checker/common/logger.py') diff --git a/tools/checker/common/logger.py b/tools/checker/common/logger.py index 15eb55c702..aa3a92f56f 100644 --- a/tools/checker/common/logger.py +++ b/tools/checker/common/logger.py @@ -44,14 +44,14 @@ class Logger(object): Verbosity = Level.Info @staticmethod - def log(text, level=Level.Info, color=Color.Default, newLine=True, out=sys.stdout): + def log(content, level=Level.Info, color=Color.Default, newLine=True, out=sys.stdout): if level <= Logger.Verbosity: - text = Logger.Color.terminalCode(color, out) + text + \ + content = Logger.Color.terminalCode(color, out) + str(content) + \ Logger.Color.terminalCode(Logger.Color.Default, out) if newLine: - print(text, file=out) + print(content, file=out) else: - print(text, end="", file=out) + print(content, end="", file=out) out.flush() @staticmethod -- cgit v1.2.3-59-g8ed1b