sanitycheck: show handler in verbose mode When running in verbose mode, show what handler is being used. Signed-off-by: Anas Nashif <anas.nashif@intel.com>
diff --git a/scripts/sanitycheck b/scripts/sanitycheck index 654dd8f..ff3afb3 100755 --- a/scripts/sanitycheck +++ b/scripts/sanitycheck
@@ -463,7 +463,7 @@ self.instance = my_class() class Handler: - def __init__(self, instance): + def __init__(self, instance, type_str="build"): """Constructor @param name Arbitrary name of the created thread @@ -480,6 +480,7 @@ self.metrics["handler_time"] = 0 self.metrics["ram_size"] = 0 self.metrics["rom_size"] = 0 + self.type_str = type_str self.binary = None self.pid_fn = None @@ -507,12 +508,12 @@ return ret class BinaryHandler(Handler): - def __init__(self, instance): + def __init__(self, instance, type_str): """Constructor @param instance Test Instance """ - super().__init__(instance) + super().__init__(instance, type_str) self.valgrind = False self.terminated = False @@ -603,12 +604,12 @@ class DeviceHandler(Handler): - def __init__(self, instance): + def __init__(self, instance, type_str): """Constructor @param instance Test Instance """ - super().__init__(instance) + super().__init__(instance, type_str) def monitor_serial(self, ser, halt_fileno, harness): log_out_fp = open(self.log, "wt") @@ -822,13 +823,13 @@ os.unlink(fifo_in) os.unlink(fifo_out) - def __init__(self, instance): + def __init__(self, instance, type_str): """Constructor @param instance Test instance """ - super().__init__(instance) + super().__init__(instance, type_str) self.results = {} self.run = True @@ -1223,24 +1224,24 @@ handler = None if type == "qemu": - handler = QEMUHandler(instance) + handler = QEMUHandler(instance, "qemu") elif type == "native": - handler = BinaryHandler(instance) + handler = BinaryHandler(instance, "native") handler.binary = os.path.join(outdir, "zephyr", "zephyr.exe") if options.enable_coverage: args += ["EXTRA_LDFLAGS=--coverage"] elif type == "nsim": - handler = BinaryHandler(instance) + handler = BinaryHandler(instance, "nsim") handler.call_make_run = True elif type == "unit": - handler = BinaryHandler(instance) + handler = BinaryHandler(instance, "unit") handler.binary = os.path.join(outdir, "testbinary") if options.enable_coverage: args += ["EXTRA_LDFLAGS=--coverage"] elif type == "device": - handler = DeviceHandler(instance) + handler = DeviceHandler(instance, "device") elif type == "renode": - handler = BinaryHandler(instance) + handler = BinaryHandler(instance, "renode") handler.pid_fn = os.path.join(instance.outdir, "renode.pid") handler.call_make_run = True @@ -3020,9 +3021,14 @@ else: status = goal.make_state - info("{:>{}}/{} {:<25} {:<50} {}".format( + if goal.handler: + handler_type = goal.handler.type_str + else: + handler_type = "build" + + info("{:>{}}/{} {:<25} {:<50} {} ({})".format( total_done, total_tests_width, total_tests, i.platform.name, - i.test.name, status)) + i.test.name, status, handler_type)) if goal.failed: log_info(goal.get_error_log())