tools/perf/core/results_processor/testing.py
def TestResult(test_path, status='PASS', expected=None,
               start_time='2015-10-21T07:28:00.000Z', run_duration='1.00s',
               output_artifacts=None, tags=None, result_id=None):
  """Build a TestResult dict.

  This follows the TestResultEntry spec of LUCI Test Results format.
  See: go/luci-test-results-design

  Args:
    test_path: A string with the path that identifies this test. Usually of
      the form '{benchmark_name}/{story_name}'.
    status: An optional string indicating the status of the test run. Usually
      one of 'PASS', 'SKIP', 'FAIL'. Defaults to 'PASS'.
    expected: An optional bool indicating whether the status result is
      expected. Defaults to True for 'PASS', 'SKIP'; and False otherwise.
    start_time: An optional UTC timestamp recording when the test run started.
    run_duration: An optional duration string recording the amount of time
      that the test run lasted.
    output_artifacts: An optional mapping of artifact names to Artifact dicts,
      may be given as a dict or a sequence of pairs.
    tags: An optional sequence of tags associated with this test run; each
      tag is given as a '{key}:{value}' string. Keys are not unique, the same
      key may appear multiple times.

  Returns:
    A TestResult dict.
  """
  if expected is None:
    expected = status in ('PASS', 'SKIP')
  test_result = {
      'testPath': test_path,
      'status': status,
      'expected': expected,
      'startTime': start_time,
      'runDuration': run_duration,
  }
  if output_artifacts is not None:
    test_result['outputArtifacts'] = dict(output_artifacts)
  if tags is not None:
    test_result['tags'] = [_SplitTag(tag) for tag in tags]
  if result_id is not None:
    test_result['resultId'] = str(result_id)

  return test_result
Build a TestResult dict.

  This follows the TestResultEntry spec of LUCI Test Results format.
  See: go/luci-test-results-design

  Args:
    test_path: A string with the path that identifies this test. Usually of
      the form '{benchmark_name}/{story_name}'.
    status: An optional string indicating the status of the test run. Usually
      one of 'PASS', 'SKIP', 'FAIL'. Defaults to 'PASS'.
    expected: An optional bool indicating whether the status result is
      expected. Defaults to True for 'PASS', 'SKIP'; and False otherwise.
    start_time: An optional UTC timestamp recording when the test run started.
    run_duration: An optional duration string recording the amount of time
      that the test run lasted.
    output_artifacts: An optional mapping of artifact names to Artifact dicts,
      may be given as a dict or a sequence of pairs.
    tags: An optional sequence of tags associated with this test run; each
      tag is given as a '{key}:{value}' string. Keys are not unique, the same
      key may appear multiple times.

  Returns:
    A TestResult dict.
  
Build a TestResult dict.
This follows the TestResultEntry spec of LUCI Test Results format.
See: go/luci-test-results-design
Build a TestResult dict . This follows the TestResultEntry spec of LUCI Test Results format . See : go / luci - test - results - design
def TestResult(test_path, status='PASS', expected=None,
               start_time='2015-10-21T07:28:00.000Z', run_duration='1.00s',
               output_artifacts=None, tags=None, result_id=None):
  if expected is None:
    expected = status in ('PASS', 'SKIP')
  test_result = {
      'testPath': test_path,
      'status': status,
      'expected': expected,
      'startTime': start_time,
      'runDuration': run_duration,
  }
  if output_artifacts is not None:
    test_result['outputArtifacts'] = dict(output_artifacts)
  if tags is not None:
    test_result['tags'] = [_SplitTag(tag) for tag in tags]
  if result_id is not None:
    test_result['resultId'] = str(result_id)
  return test_result
def TestResult ( test_path , status = 'PASS' , expected = None , start_time = '2015-10-21T07:28:00.000Z' , run_duration = '1.00s' , output_artifacts = None , tags = None , result_id = None ) : if expected is None : expected = status in ( 'PASS' , 'SKIP' ) test_result = { 'testPath' : test_path , 'status' : status , 'expected' : expected , 'startTime' : start_time , 'runDuration' : run_duration , } if output_artifacts is not None : test_result [ 'outputArtifacts' ] = dict ( output_artifacts ) if tags is not None : test_result [ 'tags' ] = [ _SplitTag ( tag ) for tag in tags ] if result_id is not None : test_result [ 'resultId' ] = str ( result_id ) return test_result
Build a TestResult dict.
Build a TestResult dict .
"""Build a TestResult dict.

  This follows the TestResultEntry spec of LUCI Test Results format.
  See: go/luci-test-results-design

  Args:
    test_path: A string with the path that identifies this test. Usually of
      the form '{benchmark_name}/{story_name}'.
    status: An optional string indicating the status of the test run. Usually
      one of 'PASS', 'SKIP', 'FAIL'. Defaults to 'PASS'.
    expected: An optional bool indicating whether the status result is
      expected. Defaults to True for 'PASS', 'SKIP'; and False otherwise.
    start_time: An optional UTC timestamp recording when the test run started.
    run_duration: An optional duration string recording the amount of time
      that the test run lasted.
    output_artifacts: An optional mapping of artifact names to Artifact dicts,
      may be given as a dict or a sequence of pairs.
    tags: An optional sequence of tags associated with this test run; each
      tag is given as a '{key}:{value}' string. Keys are not unique, the same
      key may appear multiple times.

  Returns:
    A TestResult dict.
  """
A TestResult dict.
A TestResult dict .
test_path
A string with the path that identifies this test. Usually of
the form '{benchmark_name}/{story_name}'.
A string with the path that identifies this test . Usually of the form ' { benchmark_name } / { story_name } ' .
status
An optional string indicating the status of the test run. Usually
one of 'PASS', 'SKIP', 'FAIL'. Defaults to 'PASS'.
An optional string indicating the status of the test run . Usually one of ' PASS ' ' SKIP ' ' FAIL ' . Defaults to ' PASS ' .
expected
An optional bool indicating whether the status result is
expected. Defaults to True for 'PASS', 'SKIP'; and False otherwise.
An optional bool indicating whether the status result is expected . Defaults to True for ' PASS ' ' SKIP ' ; and False otherwise .
start_time
An optional UTC timestamp recording when the test run started.
An optional UTC timestamp recording when the test run started .
run_duration
An optional duration string recording the amount of time
that the test run lasted.
An optional duration string recording the amount of time that the test run lasted .
output_artifacts
An optional mapping of artifact names to Artifact dicts,
may be given as a dict or a sequence of pairs.
An optional mapping of artifact names to Artifact dicts may be given as a dict or a sequence of pairs .
tags
An optional sequence of tags associated with this test run; each
tag is given as a '{key}:{value}' string. Keys are not unique, the same
key may appear multiple times.
An optional sequence of tags associated with this test run ; each tag is given as a ' { key } : { value } ' string . Keys are not unique the same key may appear multiple times .
result_id