Skip to content
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

Show test run metadata in test summary. #751

Merged
merged 4 commits into from
May 27, 2021
Merged

Show test run metadata in test summary. #751

merged 4 commits into from
May 27, 2021

Conversation

xpconanfan
Copy link
Collaborator

@xpconanfan xpconanfan commented May 26, 2021

  • Encapsulate test run metadata with a proper container.
  • Record test run elapsed time and print it in console.
  • Print out the log path in console to make parsing easier.
  • Clarify the ambiguity in test runner logger setup and run.

This change is Reviewable

* Encapsulate test run metadata with a proper container.
* Record test run elapsed time.
* Print out the log path to make parsing easier.
* Encapsulate test run metadata with a proper container.
* Record test run elapsed time.
* Print out the log path to make parsing easier.
Copy link
Collaborator

@eric100lin eric100lin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewable status: 0 of 1 files reviewed, 4 unresolved discussions (waiting on @xpconanfan)


mobly/test_runner.py, line 186 at r1 (raw file):

self.results

this should be results


mobly/test_runner.py, line 303 at r1 (raw file):

Refersh

typo: Refresh


mobly/test_runner.py, line 415 at r1 (raw file):

f'Artifacts are saved in "{self._test_run_metadata.root_output_path}"',

I am just wondering do we want to just print this information once?
Now, the first and the last line of the test_log.INFO show the same info:
https://gist.github.com/eric100lin/d6592a5d00e1053a2ab3b2e1636d49c6#file-test_log-info


mobly/test_runner.py, line 419 at r1 (raw file):

      msg = '\n'.join(summary_lines)
      logging.info(msg.strip())

I think we don't need strip anymore.
How about just inline it: logging.info('\n'.join(summary_lines))

Copy link
Collaborator Author

@xpconanfan xpconanfan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewable status: 0 of 1 files reviewed, 4 unresolved discussions (waiting on @eric100lin and @xpconanfan)


mobly/test_runner.py, line 186 at r1 (raw file):

Previously, eric100lin (Eric Lin (Tzu Hsiang Lin)) wrote…
self.results

this should be results

Done.


mobly/test_runner.py, line 303 at r1 (raw file):

Previously, eric100lin (Eric Lin (Tzu Hsiang Lin)) wrote…
Refersh

typo: Refresh

Done.


mobly/test_runner.py, line 415 at r1 (raw file):

Previously, eric100lin (Eric Lin (Tzu Hsiang Lin)) wrote…
f'Artifacts are saved in "{self._test_run_metadata.root_output_path}"',

I am just wondering do we want to just print this information once?
Now, the first and the last line of the test_log.INFO show the same info:
https://gist.github.com/eric100lin/d6592a5d00e1053a2ab3b2e1636d49c6#file-test_log-info

The one at the beginning is from the logger module.
Changed that to DEBUG level


mobly/test_runner.py, line 419 at r1 (raw file):

Previously, eric100lin (Eric Lin (Tzu Hsiang Lin)) wrote…
      msg = '\n'.join(summary_lines)
      logging.info(msg.strip())

I think we don't need strip anymore.
How about just inline it: logging.info('\n'.join(summary_lines))

Done.

Copy link
Collaborator

@eric100lin eric100lin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:lgtm:

Reviewed 2 of 2 files at r2.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @xpconanfan)

@xpconanfan xpconanfan merged commit 113ac44 into master May 27, 2021
@xpconanfan xpconanfan deleted the summary branch May 27, 2021 09:43
xianyuanjia pushed a commit to xianyuanjia/mobly that referenced this pull request Aug 16, 2021
* Encapsulate test run metadata with a proper container.
* Record test run elapsed time.
* Print out the log path to make parsing easier.
* Clarify the ambiguity in test runner logger setup and run.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants