Commit 31c541de authored by nednguyen's avatar nednguyen Committed by Commit bot

Reland of [testing/script] Switch run_telemetry_as_googletest.py to produce...

Reland of [testing/script] Switch run_telemetry_as_googletest.py to produce full json results format (patchset #1 id:1 of https://codereview.chromium.org/2408043002/ )

Reason for revert:
Mac 10.10 Tests & Mac 10.11 Tests are now swarmed:
https://uberchromegw.corp.google.com/i/chromium.mac/builders/Mac10.10%20Tests/builds/8831

https://uberchromegw.corp.google.com/i/chromium.mac/builders/Mac10.11%20Tests/builds/3344

Original issue's description:
> Revert of [testing/script] Switch run_telemetry_as_googletest.py to produce full json results format (patchset #2 id:20001 of https://codereview.chromium.org/2403913002/ )
>
> Reason for revert:
> Speculatively reverting this patch (suggested by findit) to see if it fixes Mac telemetry unit tests.
>
> https://uberchromegw.corp.google.com/i/chromium.mac/builders/Mac10.10%20Tests/builds/8276
>
> https://uberchromegw.corp.google.com/i/chromium.mac/builders/Mac10.10%20Tests/builds/8277
>
> Original issue's description:
> > [testing/script] Switch run_telemetry_as_googletest.py to produce full json results format
> >
> > BUG=649762
> >
> > Committed: https://crrev.com/caa3b797728c9337fcea7d108a087d005fa7f451
> > Cr-Commit-Position: refs/heads/master@{#424206}
>
> TBR=kbr@chromium.org,dpranke@chromium.org,nednguyen@google.com
> # Skipping CQ checks because original CL landed less than 1 days ago.
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=649762
>
> Committed: https://crrev.com/12b54d66ba1ce9e7a6c729fdf136b5b5c257b6f2
> Cr-Commit-Position: refs/heads/master@{#424341}

TBR=kbr@chromium.org,dpranke@chromium.org,loyso@chromium.org
# Not skipping CQ checks because original CL landed more than 1 days ago.
BUG=649762

Review-Url: https://codereview.chromium.org/2480273002
Cr-Commit-Position: refs/heads/master@{#430285}
parent 6253bb13
......@@ -35,7 +35,7 @@ import xvfb
def main():
parser = argparse.ArgumentParser()
parser.add_argument(
'--isolated-script-test-output', type=argparse.FileType('w'),
'--isolated-script-test-output', type=str,
required=True)
parser.add_argument('--xvfb', help='Start xvfb.', action='store_true')
args, rest_args = parser.parse_known_args()
......@@ -72,23 +72,8 @@ def main():
'--shard-index=%d' % shard_index
]
try:
with common.temporary_file() as tempfile_path:
rc = common.run_command([sys.executable] + rest_args + sharding_args + [
'--write-full-results-to', tempfile_path,
], env=env)
with open(tempfile_path) as f:
results = json.load(f)
parsed_results = common.parse_common_test_results(results,
test_separator='.')
failures = parsed_results['unexpected_failures']
json.dump({
'valid': bool(rc <= common.MAX_FAILURES_EXIT_STATUS and
((rc == 0) or failures)),
'failures': failures.keys(),
}, args.isolated_script_test_output)
return rc
return common.run_command([sys.executable] + rest_args + sharding_args + [
'--write-full-results-to', args.isolated_script_test_output], env=env)
finally:
xvfb.kill(xvfb_proc)
xvfb.kill(openbox_proc)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment