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

tests: fix smoketests from sharing artifacts #8897

Merged
merged 2 commits into from
May 7, 2019
Merged

Conversation

paulirish
Copy link
Member

No description provided.

Copy link
Member

@brendankenny brendankenny left a comment

Choose a reason for hiding this comment

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

🚫🔀

const args = [
'lighthouse-cli/index.js',
url,
`--config-path=${configPath}`,
`--output-path=${outputPath}`,
'--output=json',
`-GA=${artifactsDirectory}`,
`-G=${artifactsDirectory}`,
`-A=${artifactsDirectory}`,
Copy link
Member

Choose a reason for hiding this comment

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

any reason to split these up

Copy link
Member Author

Choose a reason for hiding this comment

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

yup.

node lighthouse-cli/index.js http://localhost:10200/seo/seo-tester.html?extra_header=link%3D%253Chttp%253A%252F%252Flocalhost%253A10200%252Fseo%252F%253E%253B%2Brel%253D%2522canonical%2522 --config-path=/Users/paulirish/code/pristine/lighthouse-pristine/lighthouse-cli/test/smokehouse/seo-config.js --output-path=smokehouse-83625.report.json --output=json -GA=./.tmp/smokehouse-artifacts-83625

image

Copy link
Member

Choose a reason for hiding this comment

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

:this_is_fine:

@brendankenny
Copy link
Member

nice find

@brendankenny
Copy link
Member

Error: ENOENT: no such file or directory, open './.tmp/smokehouse-artifacts-8306/artifacts.json'

this is a problem for yarn smoke errors, presumably because no artifacts were written...

@brendankenny
Copy link
Member

this is a problem for yarn smoke errors, presumably because no artifacts were written...

oh, yes, that's correct, but also fine. It's just smokehouse itself running into this. Need something like

// Artifacts are undefined if they weren't written to file (e.g. if there was an error).
let artifacts;
try {
  artifacts = JSON.parse( fs.readFileSync(`${artifactsDirectory}/artifacts.json`, 'utf8'));
} catch (e) {}

down on L119 of smokehouse.js

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants