-
Notifications
You must be signed in to change notification settings - Fork 48
Displaying result status in summary #204
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Displaying result status in summary #204
Conversation
|
PraveenPenguin
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
46a1f5f to
236a0a2
Compare
avocado-setup.py
Outdated
| result_link += "/job.log\n" | ||
| with open(result_json, encoding = "utf-8") as fp: | ||
| result_state = json.load(fp) | ||
| for state in ['total', 'pass', 'cancel', 'errors', 'failures', 'skip']: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please add warn as well
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@harish-24 WARN is not found in the json file. So I did not add it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@narasimhan-v I see a warn in there,
{
"cancel": 0,
"debuglog": "/home/satheesh/data/gits/github/avocado/job-2020-03-30T12.39-8a51c2c/job.log",
"errors": 0,
"failures": 0,
"interrupt": 0,
"job_id": "8a51c2c2ab2e400fc5089b3e6fd26244e383427e",
"pass": 1,
"skip": 0,
"tests": [
{
"end": 1585552154.4747539,
"fail_reason": null,
"id": "1-/bin/true",
"logdir": "/home/satheesh/data/gits/github/avocado/job-2020-03-30T12.39-8a51c2c/test-results/1-_bin_true",
"logfile": "/home/satheesh/data/gits/github/avocado/job-2020-03-30T12.39-8a51c2c/test-results/1-_bin_true/debug.log",
"start": 1585552154.219356,
"status": "PASS",
"time": 0.2553977966308594,
"whiteboard": ""
}
],
"time": 0.2553977966308594,
"total": 1,
"warn": 0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
okay, let me recheck and add this. Thanks @harish-24 and @sathnaga
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems I had older avocado in the system I tested.
Will add them.
commit c6b0c8180cd38b66d29729eb825bc0d4155a33c8
Author: Wainer dos Santos Moschetta <wainersm@redhat.com>
Date: Fri Jan 10 15:25:48 2020 -0300
plugins: jsonresult: add missing warn and interrupt fields
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@harish-24 please check now. Added warn and interrupt
avocado-setup.py
Outdated
| result_link += "/job.log\n" | ||
| with open(result_json, encoding = "utf-8") as fp: | ||
| result_state = json.load(fp) | ||
| for state in ['total', 'pass', 'cancel', 'errors', 'failures', 'skip']: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@narasimhan-v I see a warn in there,
{
"cancel": 0,
"debuglog": "/home/satheesh/data/gits/github/avocado/job-2020-03-30T12.39-8a51c2c/job.log",
"errors": 0,
"failures": 0,
"interrupt": 0,
"job_id": "8a51c2c2ab2e400fc5089b3e6fd26244e383427e",
"pass": 1,
"skip": 0,
"tests": [
{
"end": 1585552154.4747539,
"fail_reason": null,
"id": "1-/bin/true",
"logdir": "/home/satheesh/data/gits/github/avocado/job-2020-03-30T12.39-8a51c2c/test-results/1-_bin_true",
"logfile": "/home/satheesh/data/gits/github/avocado/job-2020-03-30T12.39-8a51c2c/test-results/1-_bin_true/debug.log",
"start": 1585552154.219356,
"status": "PASS",
"time": 0.2553977966308594,
"whiteboard": ""
}
],
"time": 0.2553977966308594,
"total": 1,
"warn": 0
avocado-setup.py
Outdated
| with open(result_json, encoding = "utf-8") as fp: | ||
| result_state = json.load(fp) | ||
| for state in ['total', 'pass', 'cancel', 'errors', 'failures', 'skip']: | ||
| result_link += "| %s %s |" % (state, str(result_state[state])) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
and better to add a try: except here inorder to handle a missing key in different avocado version if any...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure
When multiple tests are run, along with kernel messages output, it becomes difficult to read the status of the tests. This commits tries to solve that by displaying the status in the summary. Signed-off-by: Narasimhan V <sim@linux.vnet.ibm.com>
236a0a2 to
4711ef2
Compare
Previously we were having set length of spaces needed in the result summary. Now, we compute the length of items displayed in first column of summary, and use it to compute space needed. Signed-off-by: Narasimhan V <sim@linux.vnet.ibm.com>
|
When multiple tests are run, along with kernel messages output,
it becomes difficult to read the status of the tests. This commits
tries to solve that by displaying the status in the summary.
Signed-off-by: Narasimhan V sim@linux.vnet.ibm.com