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
No amp4test log on travis. #19611
No amp4test log on travis. #19611
Conversation
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.
Unfortunately, this was polluting the logs during local debugging test runs as well. Perhaps you can guard it with a flag that you pass in only if you actually care about the logs?
I think it's fine? I assume running test locally is most in dev / debug mode? |
Running all tests locally is a routine workflow for the infra team, so these logs do come in the way due to how often they're printed. A couple suggestions:
|
@rsimha instead of introducing another flag, what's your attitude to reusing the existing |
Good idea, using |
@rsimha changed to read |
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 with one minor cleanup task.
* @param {*} messages | ||
*/ | ||
function log(...messages) { | ||
if (!process.env.AMP_TEST) { |
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.
If this environment variable isn't used anywhere else, it can be removed from runtime_test.js.
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.
done. thx
build-system/amp4test.js
Outdated
* @param {*} messages | ||
*/ | ||
function log(...messages) { | ||
if (!process.env.AMP_TEST) { | ||
console.log(messages); | ||
if (argv.files) { |
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.
I just realized we also have a verbose
flag. You could use that instead of (or in addition to) files
if you'd like.
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.
SG. switched to --verbose
* No amp4test log on travis. * read --files to enable logging * Update js doc * clean up * print error in correct format * also do --verbose * use --verbose * Update js doc
Still want logs on local testing.