lib/instruments/utils.js
async function quickLaunch (udid, appPath = path.resolve(__dirname, '..', '..', 'assets', 'TestApp.app')) {
  let traceTemplatePath = await xcode.getAutomationTraceTemplatePath();
  let scriptPath = path.resolve(__dirname, '..', '..', 'assets', 'blank_instruments_test.js');
  let traceDocument = path.resolve('/', 'tmp', 'testTrace.trace');
  let resultsPath = path.resolve('/', 'tmp');

  // the trace document can be in a weird state
  // but we never do anything with it, so delete
  await fs.rimraf(traceDocument);

  let args = [
    'instruments',
    '-D', traceDocument,
    '-t', traceTemplatePath,
    '-w', udid,
    appPath,
    '-e', 'UIASCRIPT', scriptPath,
    '-e', 'UIARESULTSPATH', resultsPath];
  log.debug(`Running command: 'xcrun ${args.join(' ')}'`);
  await exec('xcrun', args);
}
async function quickLaunch (udid, appPath = path.resolve(__dirname, '..', '..', 'assets', 'TestApp.app')) {
  let traceTemplatePath = await xcode.getAutomationTraceTemplatePath();
  let scriptPath = path.resolve(__dirname, '..', '..', 'assets', 'blank_instruments_test.js');
  let traceDocument = path.resolve('/', 'tmp', 'testTrace.trace');
  let resultsPath = path.resolve('/', 'tmp');

  // the trace document can be in a weird state
  // but we never do anything with it, so delete
  await fs.rimraf(traceDocument);

  let args = [
    'instruments',
    '-D', traceDocument,
    '-t', traceTemplatePath,
    '-w', udid,
    appPath,
    '-e', 'UIASCRIPT', scriptPath,
    '-e', 'UIARESULTSPATH', resultsPath];
  log.debug(`Running command: 'xcrun ${args.join(' ')}'`);
  await exec('xcrun', args);
}
async function quickLaunch ( udid , appPath = path . resolve ( __dirname , '..' , '..' , 'assets' , 'TestApp.app' ) ) { let traceTemplatePath = await xcode . getAutomationTraceTemplatePath ( ) ; let scriptPath = path . resolve ( __dirname , '..' , '..' , 'assets' , 'blank_instruments_test.js' ) ; let traceDocument = path . resolve ( '/' , 'tmp' , 'testTrace.trace' ) ; let resultsPath = path . resolve ( '/' , 'tmp' ) ; // the trace document can be in a weird state // but we never do anything with it, so delete await fs . rimraf ( traceDocument ) ; let args = [ 'instruments' , '-D' , traceDocument , '-t' , traceTemplatePath , '-w' , udid , appPath , '-e' , 'UIASCRIPT' , scriptPath , '-e' , 'UIARESULTSPATH' , resultsPath ] ; log . debug ( ` ${ args . join ( ' ' ) } ` ) ; await exec ( 'xcrun' , args ) ; }
this function launches an instruments test with a default test that immediately passes. In this way we can start a simulator and be notified when it completely launches
this function launches an instruments test with a default test that immediately passes . In this way we can start a simulator and be notified when it completely launches