Skip to content

Commit

Permalink
Fix incorrect Chrome version pinning for visual diff tests (#32641)
Browse files Browse the repository at this point in the history
  • Loading branch information
danielrozenberg committed Feb 12, 2021
1 parent 7cf184c commit e0ab970
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
5 changes: 2 additions & 3 deletions build-system/common/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -146,16 +146,15 @@ function usesFilesOrLocalChanges(taskName) {
* Runs 'npm install' to install packages in a given directory.
*
* @param {string} dir
* @param {?NodeJS.ProcessEnv} options
*/
function installPackages(dir, options = {}) {
function installPackages(dir) {
log(
'Running',
cyan('npm install'),
'to install packages in',
cyan(path.relative(ROOT_DIR, dir)) + '...'
);
execOrDie(`npm install --prefix ${dir}`, {'stdio': 'ignore', ...options});
execOrDie(`npm install --prefix ${dir}`, {'stdio': 'ignore'});
}

module.exports = {
Expand Down
5 changes: 3 additions & 2 deletions build-system/tasks/visual-diff/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ const percyCss = [
// Use https://omahaproxy.appspot.com/ to convert version<->revision numbers.
// REPEATING TODO(@ampproject/wg-infra): keep this pinned with Percy whenever we
// update the version of Chrome in the project settings.
const INSTALL_PACKAGE_OPTIONS = {'PUPPETEER_CHROMIUM_REVISION': '693954'};
const PUPPETEER_CHROMIUM_REVISION = '693954';

const SNAPSHOT_SINGLE_BUILD_OPTIONS = {
widths: [375],
Expand Down Expand Up @@ -794,8 +794,9 @@ async function ensureOrBuildAmpRuntimeInTestMode_() {
}

function installPercy_() {
process.env['PUPPETEER_CHROMIUM_REVISION'] = PUPPETEER_CHROMIUM_REVISION;
if (!argv.noinstall) {
installPackages(__dirname, INSTALL_PACKAGE_OPTIONS);
installPackages(__dirname);
}

puppeteer = require('puppeteer');
Expand Down

0 comments on commit e0ab970

Please sign in to comment.