Skip to content

Commit

Permalink
AG-11071 - Fix sharded execution for gallery thumbnail tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
alantreadway committed Mar 25, 2024
1 parent 17e5949 commit bb414c8
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions packages/ag-charts-website/tools/compare-gallery-thumbnails.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,22 @@ const fail = (msg, usage) => {

// Parse argv.
let argv = process.argv.slice(2);
const flags = new Set(argv.filter((v) => v.startsWith('-')));
const flags = new Map(argv.filter((v) => v.startsWith('-')).map((v) => v.split('=')));

const update = flags.has('-u');
const ci = flags.has('-ci');
const ci = flags.has('--ci');
const shard = flags.get('--shard');

argv = argv.filter((v) => !v.startsWith('-'));
if (argv.length !== 2) {
fail('Wrong number of arguments', true);
}

if (shard && shard.split('/')[0] !== '1') {
console.log(`Sharding detected, skipping execution for shard ${shard}`);
process.exit(0);
}

const inputDir = argv.shift();
const compareDir = argv.shift();

Expand Down

0 comments on commit bb414c8

Please sign in to comment.