def ExecuteTest():
 app_id = GetApplicationId(_SCHEME['ios'])
 test_name = options.testname
 if test_name:
  Setup(test_name)
  test_dir = ('%s/results/current/%s/%s' % (_BASE_PATH, options.conf, test_name))
  os.makedirs(test_dir, 493)
  instrument_cmd = ('instruments -t templates/VF_AutoUI_Template.tracetemplate /Users/%s/Library/Application\\ Support/iPhone\\ Simulator/%s/Applications/%s/Viewfinder.app -e UIASCRIPT js/control/%s_control.js -e UIARESULTSPATH %s' % (os.environ['USER'], _SCHEME['ios'], app_id, test_name, test_dir))
  print instrument_cmd
  call(instrument_cmd, shell=True)
  Teardown(test_name)
 else:
  for temp_name in _SUMMARY.keys():
   Setup('all')
   test_dir = ('%s/results/current/%s/%s' % (_BASE_PATH, options.conf, temp_name))
   os.makedirs(test_dir, 493)
   instrument_cmd = ('instruments -t templates/VF_AutoUI_Template.tracetemplate /Users/%s/Library/Application\\ Support/iPhone\\ Simulator/%s/Applications/%s/Viewfinder.app -e UIASCRIPT js/control/%s_control.js -e UIARESULTSPATH %s' % (os.environ['USER'], _SCHEME['ios'], app_id, temp_name, test_dir))
   print instrument_cmd
   call(instrument_cmd, shell=True)
   Teardown(temp_name)

def ExecuteTest ( ) : app_id = GetApplicationId ( _SCHEME [ 'ios' ] ) test_name = options . testname if test_name : Setup ( test_name ) test_dir = ( '%s/results/current/%s/%s' % ( _BASE_PATH , options . conf , test_name ) ) os . makedirs ( test_dir , 493 ) instrument_cmd = ( 'instruments -t templates/VF_AutoUI_Template.tracetemplate /Users/%s/Library/Application\\ Support/iPhone\\ Simulator/%s/Applications/%s/Viewfinder.app -e UIASCRIPT js/control/%s_control.js -e UIARESULTSPATH %s' % ( os . environ [ 'USER' ] , _SCHEME [ 'ios' ] , app_id , test_name , test_dir ) ) print instrument_cmd call ( instrument_cmd , shell = True ) Teardown ( test_name ) else : for temp_name in _SUMMARY . keys ( ) : Setup ( 'all' ) test_dir = ( '%s/results/current/%s/%s' % ( _BASE_PATH , options . conf , temp_name ) ) os . makedirs ( test_dir , 493 ) instrument_cmd = ( 'instruments -t templates/VF_AutoUI_Template.tracetemplate /Users/%s/Library/Application\\ Support/iPhone\\ Simulator/%s/Applications/%s/Viewfinder.app -e UIASCRIPT js/control/%s_control.js -e UIARESULTSPATH %s' % ( os . environ [ 'USER' ] , _SCHEME [ 'ios' ] , app_id , temp_name , test_dir ) ) print instrument_cmd call ( instrument_cmd , shell = True ) Teardown ( temp_name )
run the tests .