Skip to content

Commit

Permalink
DEBUG LOGS
Browse files Browse the repository at this point in the history
Signed-off-by: Lukasz Mrugala <[email protected]>
  • Loading branch information
LukaszMrugala committed Jun 27, 2024
1 parent c4cc343 commit cc8a8d5
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/twister.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
21 changes: 21 additions & 0 deletions scripts/pylib/twister/twisterlib/runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -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})
Expand All @@ -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})
Expand All @@ -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:
Expand Down Expand Up @@ -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"
Expand All @@ -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}")
Expand All @@ -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)
Expand All @@ -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()
Expand Down Expand Up @@ -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:
Expand Down

0 comments on commit cc8a8d5

Please sign in to comment.