function getDefinitionsToRun(allTestDefns, requestedIds, excludedTests) {
  let smokes = [];
  const usage = `    ${log.dim}yarn smoke ${allTestDefns.map(t => t.id).join(' ')}${log.reset}\n`;

  if (requestedIds.length === 0) {
    smokes = [...allTestDefns];
    console.log('Running ALL smoketests. Equivalent to:');
    console.log(usage);
  } else {
    smokes = allTestDefns.filter(test => {
      // Include all tests that *include* requested id.
      // e.g. a requested 'perf' will match 'perf-preload', 'perf-trace-elements', etc
      return requestedIds.some(requestedId => test.id.includes(requestedId));
    });
    console.log(`Running ONLY smoketests for: ${smokes.map(t => t.id).join(' ')}\n`);
  }

  const unmatchedIds = requestedIds.filter(requestedId => {
    return !allTestDefns.map(t => t.id).some(id => id.includes(requestedId));
  });
  if (unmatchedIds.length) {
    console.log(log.redify(`Smoketests not found for: ${unmatchedIds.join(' ')}`));
    console.log(`Check test exclusions (${[...excludedTests].join(' ')})\n`);
    console.log(usage);
  }

  if (!smokes.length) {
    throw new Error('no smoketest found to run');
  }

  return smokes;
}
Determine batches of smoketests to run, based on the `requestedIds`.
@param {Array<Smokehouse.TestDfn>} allTestDefns
@param {Array<string>} requestedIds
@param {Set<string>} excludedTests
@return {Array<Smokehouse.TestDfn>}