Skip to content

Comments

kirk: Add results JSON to logs convertor script#53

Merged
acerv merged 1 commit intolinux-test-project:masterfrom
wangli5665:json2logs
Jul 28, 2025
Merged

kirk: Add results JSON to logs convertor script#53
acerv merged 1 commit intolinux-test-project:masterfrom
wangli5665:json2logs

Conversation

@wangli5665
Copy link
Member

@wangli5665 wangli5665 commented May 27, 2025

This patch introduces a new utility script, json2logs.py, which converts kirk-style JSON test result files into traditional LTP log formats. This is particularly useful for legacy log parsers and test frameworks (e.g. Beaker) that rely on structured .log outputs for automated analysis.

The script generates the output files:
*.log: A concise summary of test statuses
*.run.log: Detailed per-test logs with command, output, and duration
*.fails.log: Aggregated logs of failed tests only

python3 json2logs.py --resfile RUNTEST.json
--sumfile RUNTEST.log --runfile RUNTEST.run.log --failfile RUNTEST.fail.log

This utility helps streamline integration with existing test result processing systems and supports environments that still depend on traditional LTP log structures.

Reviewed-by: Andrea Cervesato andrea.cervesato@suse.com

@wangli5665
Copy link
Member Author

wangli5665 commented May 28, 2025

@acerv not sure if the checks failure is related to the json2logs.py, any suggestions will be welcome.

@acerv
Copy link
Collaborator

acerv commented May 28, 2025

@acerv not sure if the checks failure is related to the json2logs.py, any suggestions will be welcome.

The failures is unrelated to check library. It recently started to fail in the github CI and I didn't explore that yet. Locally all tests pass, so it's mostly a CI setup issue.

@acerv
Copy link
Collaborator

acerv commented May 28, 2025

@acerv not sure if the checks failure is related to the json2logs.py, any suggestions will be welcome.

The failures is unrelated to check library. It recently started to fail in the github CI and I didn't explore that yet. Locally all tests pass, so it's mostly a CI setup issue.

@acerv not sure if the checks failure is related to the json2logs.py, any suggestions will be welcome.

Fixed by 28d9cfa

@acerv acerv force-pushed the master branch 3 times, most recently from eb9f87f to 55e4882 Compare June 10, 2025 07:41
@acerv
Copy link
Collaborator

acerv commented Jul 15, 2025

@wangli5665 any update about removing click dependency and simplifying strings handling?

This patch introduces a new utility script, json2logs.py, which
converts kirk-style JSON test result files into traditional LTP
log formats. This is particularly useful for legacy log parsers
and test frameworks (e.g. Beaker) that rely on structured .log
outputs for automated analysis.

The script generates the output files:
  *.log: A concise summary of test statuses
  *.run.log: Detailed per-test logs with command, output, and duration
  *.fails.log: Aggregated logs of failed tests only

python3 json2logs.py --resfile RUNTEST.json \
    --sumfile RUNTEST.log --runfile RUNTEST.run.log --failfile RUNTEST.fail.log

This utility helps streamline integration with existing test result
processing systems and supports environments that still depend on
traditional LTP log structures.

Signed-off-by: Li Wang <liwang@redhat.com>
@wangli5665
Copy link
Member Author

@wangli5665 any update about removing click dependency and simplifying strings handling?

Yes, refreshed the PR.

@acerv acerv added the enhancement New feature or request label Jul 28, 2025
@acerv acerv self-assigned this Jul 28, 2025
@acerv acerv self-requested a review July 28, 2025 13:17
@acerv acerv merged commit 8cf113a into linux-test-project:master Jul 28, 2025
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants