SkQP: Fix broken run_skqp_exe
This fixes several issues: * sysopen.py was moved to bin/sysopen in previous CL. Change to use os.system to run it * "adb push" doesn't follow symlinks. * SkQP added a new commandline flag for rendertests file. * The report path was wrong in old code. Bug: skia:10156 Change-Id: I821a49c49bffe588f34d1216d9406c97ae5a903b Reviewed-on: https://skia-review.googlesource.com/c/skia/+/284524 Reviewed-by: Tyler Denniston <tdenniston@google.com> Auto-Submit: Lepton Wu <lepton@chromium.org> Commit-Queue: Tyler Denniston <tdenniston@google.com>
This commit is contained in:
parent
5a9e7fba1e
commit
710bd4f969
@ -7,7 +7,6 @@
|
||||
import os
|
||||
import subprocess
|
||||
import tempfile
|
||||
import sysopen
|
||||
import sys
|
||||
|
||||
def skqp(build):
|
||||
@ -20,21 +19,24 @@ def skqp(build):
|
||||
|
||||
os.chdir(os.path.join(os.path.dirname(__file__), os.pardir, os.pardir))
|
||||
|
||||
adb('shell', 'rm -rf /data/local/tmp/skqp; mkdir -p /data/local/tmp/skqp')
|
||||
adb('shell', 'rm -rf /data/local/tmp/skqp; mkdir -p /data/local/tmp/skqp/skqp_assets')
|
||||
|
||||
adb('push',
|
||||
os.path.join(*'platform_tools/android/apps/skqp/src/main/assets'.split('/')),
|
||||
os.path.join(*'platform_tools/android/apps/skqp/src/main/assets/skqp'.split('/')),
|
||||
'/data/local/tmp/skqp/skqp_assets')
|
||||
adb('push',
|
||||
os.path.join(*'out/skqp/gmkb'.split('/')), '/data/local/tmp/skqp/skqp_assets')
|
||||
adb('push', 'resources', '/data/local/tmp/skqp/skqp_assets')
|
||||
|
||||
adb('push', os.path.join(build, 'skqp'), '/data/local/tmp/skqp/skqp')
|
||||
|
||||
cmd = "cd /data/local/tmp/skqp; ./skqp skqp_assets report"
|
||||
cmd = "cd /data/local/tmp/skqp; ./skqp skqp_assets '' report"
|
||||
sys.stdout.write("adb 'shell' '%s'\n" % cmd)
|
||||
ret = subprocess.call(['adb', 'shell', cmd])
|
||||
|
||||
tmpdir = tempfile.mkdtemp(prefix='skqp')
|
||||
|
||||
adb('pull', "/data/local/tmp/report", tmpdir)
|
||||
adb('pull', "/data/local/tmp/skqp/report", tmpdir)
|
||||
|
||||
return ret, os.path.join(tmpdir, 'report')
|
||||
|
||||
@ -49,5 +51,4 @@ if __name__ == '__main__':
|
||||
sys.exit(1)
|
||||
|
||||
sys.stdout.write('\nReturn code: %d\nOutput written to "%s"\n' % (ret, report))
|
||||
sysopen.sysopen(os.path.join(report, 'report.html'))
|
||||
|
||||
os.system("bin/sysopen " + os.path.join(report, 'report.html'))
|
||||
|
Loading…
Reference in New Issue
Block a user