project-chip / certification-tool

A test harness and tooling designed to simplify development, testing, and certification for devices, guided by the Connectivity Standards Alliance.
https://csa-iot.org/
Apache License 2.0
42 stars 24 forks source link

[Bug] CLI not working for Python Tests #492

Open rquidute opened 1 week ago

rquidute commented 1 week ago

Describe the bug

The test run execution for python tests using CLI is not working.

Steps to reproduce the behavior

Run a new test run execution using this example: ./cli.sh run-tests --project-id 1 --selected-tests '{"SDK Python Tests":{"Python Testing Suite":{"TC_ACE_1_3": 1}}}'

Expected behavior

Test should perform a successful execution

Log files

Traceback (most recent call last): File "/home/ubuntu/certification-tool/cli/app/main.py", line 47, in root() File "/home/ubuntu/.cache/pypoetry/virtualenvs/certification-tool-cli-Bd4yKGBQ-py3.12/lib/python3.12/site-packages/click/core.py", line 1157, in call return self.main(args, kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/ubuntu/.cache/pypoetry/virtualenvs/certification-tool-cli-Bd4yKGBQ-py3.12/lib/python3.12/site-packages/click/core.py", line 1078, in main rv = self.invoke(ctx) ^^^^^^^^^^^^^^^^ File "/home/ubuntu/.cache/pypoetry/virtualenvs/certification-tool-cli-Bd4yKGBQ-py3.12/lib/python3.12/site-packages/click/core.py", line 1688, in invoke return _process_result(sub_ctx.command.invoke(sub_ctx)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/ubuntu/.cache/pypoetry/virtualenvs/certification-tool-cli-Bd4yKGBQ-py3.12/lib/python3.12/site-packages/click/core.py", line 1434, in invoke return ctx.invoke(self.callback, ctx.params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/ubuntu/.cache/pypoetry/virtualenvs/certification-tool-cli-Bd4yKGBQ-py3.12/lib/python3.12/site-packages/click/core.py", line 783, in invoke return __callback(args, *kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/ubuntu/certification-tool/cli/app/async_cmd.py", line 28, in wrapper return asyncio.run(f(args, **kwargs)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.12/asyncio/runners.py", line 194, in run return runner.run(main) ^^^^^^^^^^^^^^^^ File "/usr/lib/python3.12/asyncio/runners.py", line 118, in run return self._loop.run_until_complete(task) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.12/asyncio/base_events.py", line 687, in run_until_complete return future.result() ^^^^^^^^^^^^^^^ File "/home/ubuntu/certification-tool/cli/app/commands/run_tests.py", line 65, in run_tests await socket_task File "/home/ubuntu/certification-tool/cli/app/test_run/websocket.py", line 71, in connect_websocket await self.handle_incoming_socket_message(socket=socket, message=message_obj) File "/home/ubuntu/certification-tool/cli/app/test_run/websocket.py", line 82, in __handle_incoming_socket_message self.handle_log_record(message.payload) File "/home/ubuntu/certification-tool/cli/app/test_run/websocket.py", line 128, in handle_log_record logger.log(record.level, record.message) File "/home/ubuntu/.cache/pypoetry/virtualenvs/certification-tool-cli-Bd4yKGBQ-py3.12/lib/python3.12/site-packages/loguru/_logger.py", line 1997, in log self._log(level_id, static_level_no, False, self._options, message, args, kwargs) File "/home/ubuntu/.cache/pypoetry/virtualenvs/certification-tool-cli-Bd4yKGBQ-py3.12/lib/python3.12/site-packages/loguru/_logger.py", line 1886, in _log raise ValueError("Level '%s' does not exist" % level_id) from None ValueError: Level 'PYTHON_TEST' does not exist

PICS file

No response

Screenshots

No response

Environment

No response

Additional Information

No response