ac7f23c807
* C++ code moved into tools/skqp/src/. * State held with single SkQP class. * gmkb functions moved to skqp_model.{h,cpp} * model no longer knows about report format. * skqp_main and skqp_lib no longer have globals * jni code has fewer globals. * skqp_main no longer uses googletest. * AssetMng returns SkData, not a SkStream. * Add jitter tool. * dump GPU information into grdump.txt * JUnit puts report in directory with timestamp. * Document SkQP Render Test Algorithm. * GPU driver correctness workarounds always off * cut_release tool for assembling models * make_rendertests_list.py to help cut_release * make_gmkb.go emits a list of models CQ_INCLUDE_TRYBOTS=skia.primary:Build-Debian9-Clang-x86-devrel-Android_SKQP Change-Id: I7d4f0c24592b1f64be0088578a3f1a0bc366dd4d Reviewed-on: https://skia-review.googlesource.com/c/110420 Reviewed-by: Hal Canary <halcanary@google.com> Commit-Queue: Hal Canary <halcanary@google.com>
50 lines
1.3 KiB
Python
Executable File
50 lines
1.3 KiB
Python
Executable File
#! /usr/bin/env python
|
|
|
|
# Copyright 2018 Google LLC.
|
|
# Use of this source code is governed by a BSD-style license that can be
|
|
# found in the LICENSE file.
|
|
|
|
import csv
|
|
import os
|
|
import shutil
|
|
import sys
|
|
|
|
def gset(path):
|
|
s = set()
|
|
if os.path.isfile(path):
|
|
with open(path, 'r') as f:
|
|
for line in f:
|
|
s.add(line.strip())
|
|
return s
|
|
|
|
def main():
|
|
assert '/' in [os.sep, os.altsep]
|
|
assets = os.path.join(os.path.dirname(__file__), os.pardir, os.pardir,
|
|
'platform_tools/android/apps/skqp/src/main/assets')
|
|
models = gset(assets + '/gmkb/models.txt')
|
|
good = gset('good.txt')
|
|
bad = gset('bad.txt')
|
|
assert good.isdisjoint(bad)
|
|
do_score = good & models
|
|
no_score = bad | (good - models)
|
|
to_delete = models & bad
|
|
for d in to_delete:
|
|
path = assets + '/gmkb/' + d
|
|
if os.path.isdir(path):
|
|
shutil.rmtree(path)
|
|
results = dict()
|
|
for n in do_score:
|
|
results[n] = 0
|
|
for n in no_score:
|
|
results[n] = -1
|
|
skqp = assets + '/skqp'
|
|
if not os.path.isdir(skqp):
|
|
os.mkdir(skqp)
|
|
with open(skqp + '/rendertests.txt', 'w') as o:
|
|
for n in sorted(results):
|
|
o.write('%s,%d\n' % (n, results[n]))
|
|
|
|
if __name__ == '__main__':
|
|
main()
|
|
|