From cc8a8d5089fe8819a4d90c48c794608324ed5b47 Mon Sep 17 00:00:00 2001 From: Lukasz Mrugala Date: Thu, 27 Jun 2024 13:35:43 +0000 Subject: [PATCH] DEBUG LOGS Signed-off-by: Lukasz Mrugala --- .github/workflows/twister.yaml | 2 +- scripts/pylib/twister/twisterlib/runner.py | 21 +++++++++++++++++++++ 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/.github/workflows/twister.yaml b/.github/workflows/twister.yaml index c2e44c830d05d52..a20025a767b2d34 100644 --- a/.github/workflows/twister.yaml +++ b/.github/workflows/twister.yaml @@ -228,7 +228,7 @@ jobs: run: | export ZEPHYR_BASE=${PWD} export ZEPHYR_TOOLCHAIN_VARIANT=zephyr - ./scripts/twister --subset ${{matrix.subset}}/${{ strategy.job-total }} ${TWISTER_COMMON} ${PUSH_OPTIONS} + ./scripts/twister --subset ${{matrix.subset}}/${{ strategy.job-total }} ${TWISTER_COMMON} ${PUSH_OPTIONS} -vvv if [ "${{matrix.subset}}" = "1" ]; then ./scripts/zephyr_module.py --twister-out module_tests.args if [ -s module_tests.args ]; then diff --git a/scripts/pylib/twister/twisterlib/runner.py b/scripts/pylib/twister/twisterlib/runner.py index 567f125cd8caf0b..5216a90d83a1516 100644 --- a/scripts/pylib/twister/twisterlib/runner.py +++ b/scripts/pylib/twister/twisterlib/runner.py @@ -606,6 +606,7 @@ def process(self, pipeline, done, message, lock, results): self.instance.setup_handler(self.env) if op == "filter": + print("filter") ret = self.cmake(filter_stages=self.instance.filter_stages) if self.instance.status in ["failed", "error"]: pipeline.put({"op": "report", "test": self.instance}) @@ -623,6 +624,7 @@ def process(self, pipeline, done, message, lock, results): # The build process, call cmake and build with configured generator elif op == "cmake": + print("cmake") ret = self.cmake() if self.instance.status in ["failed", "error"]: pipeline.put({"op": "report", "test": self.instance}) @@ -643,6 +645,7 @@ def process(self, pipeline, done, message, lock, results): pipeline.put({"op": "build", "test": self.instance}) elif op == "build": + print("build") logger.debug("build test: %s" % self.instance.name) ret = self.build() if not ret: @@ -671,6 +674,7 @@ def process(self, pipeline, done, message, lock, results): pipeline.put({"op": "report", "test": self.instance}) elif op == "gather_metrics": + print("gather_metrics") ret = self.gather_metrics(self.instance) if not ret or ret.get('returncode', 1) > 0: self.instance.status = "error" @@ -683,6 +687,7 @@ def process(self, pipeline, done, message, lock, results): # Run the generated binary using one of the supported handlers elif op == "run": + print("run") logger.debug("run test: %s" % self.instance.name) self.run() logger.debug(f"run status: {self.instance.name} {self.instance.status}") @@ -703,6 +708,7 @@ def process(self, pipeline, done, message, lock, results): # Report results and output progress to screen elif op == "report": + print("report") with lock: done.put(self.instance) self.report_out(results) @@ -716,6 +722,7 @@ def process(self, pipeline, done, message, lock, results): pipeline.put({"op": "cleanup", "mode": "all", "test": self.instance}) elif op == "cleanup": + print("cleanup") mode = message.get("mode") if mode == "device": self.cleanup_device_testing_artifacts() @@ -1329,14 +1336,28 @@ def pipeline_mgr(self, pipeline, done_queue, lock, results): with self.jobserver.get_job(): while True: try: + print("Trying to get from pipeline") + logger.debug("Trying to get from pipeline") task = pipeline.get_nowait() + print(f"Got {task} from pipeline") + logger.debug(f"Got {task} from pipeline") except queue.Empty: break else: + print(f"Starting else with {task['test']}") + logger.debug(f"Starting else with {task['test']}") instance = task['test'] + print(f"Instance {instance} created") + logger.debug(f"Instance {instance} created") pb = ProjectBuilder(instance, self.env, self.jobserver) + print(f"ProjectBuilder {pb} instantiated") + logger.debug(f"ProjectBuilder {pb} instantiated") pb.duts = self.duts + print(f"duts {pb.duts} assigned") + logger.debug(f"duts {pb.duts} assigned") pb.process(pipeline, done_queue, task, lock, results) + print("Ending else, processed") + logger.debug("Ending else, processed") return True else: