2a7f0aa9eb
* Generate report in app after running all tests. * Add script to unpack backup.ab file. * Remove unused index file. * Streamline instructions in README.md. Change-Id: I44c80b17332eb4496ee31578287b691bd646d71a Reviewed-on: https://skia-review.googlesource.com/86742 Commit-Queue: Hal Canary <halcanary@google.com> Reviewed-by: Hal Canary <halcanary@google.com>
30 lines
690 B
Python
Executable File
30 lines
690 B
Python
Executable File
#! /usr/bin/env python2
|
|
# Copyright 2017 Google Inc.
|
|
# Use of this source code is governed by a BSD-style license that can be
|
|
# found in the LICENSE file.
|
|
|
|
import StringIO
|
|
import os
|
|
import sys
|
|
import sysopen
|
|
import tarfile
|
|
import tempfile
|
|
import zlib
|
|
|
|
if __name__ == '__main__':
|
|
if len(sys.argv) != 2:
|
|
print 'usage: %s FILE.ab\n' % sys.argv[0]
|
|
exit (1)
|
|
with open(sys.argv[1], 'rb') as f:
|
|
f.read(24)
|
|
t = tarfile.open(fileobj=StringIO.StringIO(zlib.decompress(f.read())))
|
|
d = tempfile.mkdtemp(prefix='skqp_')
|
|
t.extractall(d)
|
|
p = os.path.join(d, 'apps/org.skia.skqp/f/skqp_report/report.html')
|
|
assert os.path.isfile(p)
|
|
print p
|
|
sysopen.sysopen(p)
|
|
|
|
|
|
|