def testNew(self): body = { 'name': 'name', 'user': '******', 'priority': '100', 'expiration_secs': '600', 'properties': { 'inputs_ref': { 'isolated': 'isolated_hash', }, 'extra_args': ['--output-format=json'], 'dimensions': [ {'key': 'id', 'value': 'bot_id'}, {'key': 'pool', 'value': 'Chrome-perf'}, ], 'execution_timeout_secs': '3600', 'io_timeout_secs': '3600', }, 'tags': [ 'id:bot_id', 'pool:Chrome-perf', ], } self._Set200ReturnValue() response = swarming_service.Tasks().New(body) self._Assert200Response(response) self._AssertRequestMade('tasks/new', 'POST', body=json.dumps(body), headers={'Content-Type': 'application/json'})
def _StartTask(self): """Kick off a Swarming task to run a test.""" if self._first_execution and not self._first_execution._bot_id: if self._first_execution.failed: # If the first Execution fails before it gets a bot ID, it's likely it # couldn't find any device to run on. Subsequent Executions probably # wouldn't have any better luck, and failing fast is less complex than # handling retries. raise RunTestError( 'There are no bots available to run the test.') else: return # TODO: Support non-Telemetry tests. extra_args = [self._test_suite] if self._test: extra_args += ('--story-filter', self._test) if self._repeat_count != 1: extra_args += ('--pageset-repeat', str(self._repeat_count)) # TODO: Use the correct browser for Android and 64-bit Windows. extra_args += [ '-v', '--upload-results', '--output-format=chartjson', '--browser=release', '--isolated-script-test-output=${ISOLATED_OUTDIR}/output.json', '--isolated-script-test-chartjson-output=' '${ISOLATED_OUTDIR}/chartjson-output.json', ] dimensions = [{'key': 'pool', 'value': 'Chrome-perf-pinpoint'}] if self._first_execution: dimensions.append({ 'key': 'id', 'value': self._first_execution.bot_id }) else: dimensions += _ConfigurationDimensions(self._configuration) body = { 'name': 'Pinpoint job on %s' % self._configuration, 'user': '******', 'priority': '100', 'expiration_secs': '600', 'properties': { 'inputs_ref': { 'isolated': self._isolate_hash }, 'extra_args': extra_args, 'dimensions': dimensions, 'execution_timeout_secs': '3600', 'io_timeout_secs': '3600', }, 'tags': [ 'configuration:' + self._configuration, ], } response = swarming_service.Tasks().New(body) self._task_id = response['task_id']
def testNew(self): body = { 'name': 'name', 'user': '******', 'priority': '100', 'expiration_secs': '600', 'properties': { 'inputs_ref': { 'isolated': 'isolated_hash', }, 'extra_args': ['--output-format=histograms'], 'dimensions': [ { 'key': 'id', 'value': 'bot_id' }, { 'key': 'pool', 'value': 'Chrome-perf' }, ], 'execution_timeout_secs': '3600', 'io_timeout_secs': '3600', }, 'tags': [ 'id:bot_id', 'pool:Chrome-perf', ], } response = swarming_service.Tasks().New(body) self._AssertCorrectResponse(response) self._AssertRequestMadeOnce('tasks/new', method='POST', body=body)
def _StartTask(self): """Kick off a Swarming task to run a test.""" # TODO: Support non-Telemetry tests. extra_args = [self._test_suite] if self._test: extra_args.append('--story-filter') extra_args.append(self._test) # TODO: Use the correct browser for Android and 64-bit Windows. extra_args += [ '-v', '--upload-results', '--output-format=chartjson', '--browser=release', '--isolated-script-test-output=${ISOLATED_OUTDIR}/output.json', '--isolated-script-test-chartjson-output=' '${ISOLATED_OUTDIR}/chartjson-output.json', ] dimensions = [{'key': 'pool', 'value': 'Chrome-perf-pinpoint'}] if self._bot_id: dimensions.append({'key': 'id', 'value': self._bot_id}) else: dimensions += _ConfigurationDimensions(self._configuration) body = { 'name': 'Pinpoint job on %s' % self._configuration, 'user': '******', 'priority': '100', 'expiration_secs': '600', 'properties': { 'inputs_ref': { 'isolated': self._isolate_hash }, 'extra_args': extra_args, 'dimensions': dimensions, 'execution_timeout_secs': '3600', 'io_timeout_secs': '3600', }, 'tags': [ 'configuration:' + self._configuration, ], } response = swarming_service.Tasks().New(body) self._task_id = response['task_id']
def _StartTask(self): """Kick off a Swarming task to run a test.""" if self._previous_execution and not self._previous_execution.bot_id: if self._previous_execution.failed: # If the previous Execution fails before it gets a bot ID, it's likely # it couldn't find any device to run on. Subsequent Executions probably # wouldn't have any better luck, and failing fast is less complex than # handling retries. raise RunTestError( 'There are no bots available to run the test.') else: return dimensions = [{'key': 'pool', 'value': 'Chrome-perf-pinpoint'}] if self._previous_execution: dimensions.append({ 'key': 'id', 'value': self._previous_execution.bot_id }) else: dimensions += self._dimensions body = { 'name': 'Pinpoint job', 'user': '******', 'priority': '100', 'expiration_secs': '86400', # 1 day. 'properties': { 'inputs_ref': { 'isolated': self._isolate_hash }, 'extra_args': self._extra_args, 'dimensions': dimensions, 'execution_timeout_secs': '7200', # 2 hours. 'io_timeout_secs': '1200', # 20 minutes, to match the perf bots. }, } response = swarming_service.Tasks().New(body) self._task_id = response['task_id']