aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorHal Canary <halcanary@google.com>2019-01-11 16:27:35 -0500
committerSkia Commit-Bot <skia-commit-bot@chromium.org>2019-01-14 15:22:49 +0000
commit69802c4704adaded02a5e4e0542660db9882552a (patch)
tree6960f24db6fdd3daa45be94e789fdb20ebb816c9 /tools
parenta6854de5d8d187b76dc4d739e75c2555968d449f (diff)
downloadplatform_external_skqp-69802c4704adaded02a5e4e0542660db9882552a.tar.gz
platform_external_skqp-69802c4704adaded02a5e4e0542660db9882552a.tar.bz2
platform_external_skqp-69802c4704adaded02a5e4e0542660db9882552a.zip
SkQP: clean up make_universal_apk.py
Now works better when mixing docker and non-docker builds. CQ_INCLUDE_TRYBOTS=skia.primary:Build-Debian9-Clang-x86-devrel-Android_SKQP Change-Id: I968a855ee9e6c9899aaf514d7a19a145bc818a28 Reviewed-on: https://skia-review.googlesource.com/c/183388 Reviewed-by: Hal Canary <halcanary@google.com> Commit-Queue: Hal Canary <halcanary@google.com>
Diffstat (limited to 'tools')
-rwxr-xr-xtools/skqp/make_universal_apk.py12
1 files changed, 7 insertions, 5 deletions
diff --git a/tools/skqp/make_universal_apk.py b/tools/skqp/make_universal_apk.py
index d2a7a175db..8dd67d7bad 100755
--- a/tools/skqp/make_universal_apk.py
+++ b/tools/skqp/make_universal_apk.py
@@ -63,7 +63,7 @@ def check_ninja():
def remove(p):
if not os.path.islink(p) and os.path.isdir(p):
shutil.rmtree(p)
- elif os.path.exists(p):
+ elif os.path.lexists(p):
os.remove(p)
assert not os.path.exists(p)
@@ -84,6 +84,7 @@ def make_apk(architectures,
assert os.path.exists(android_ndk)
assert os.path.exists(android_home)
assert os.path.exists(skia_dir)
+ assert os.path.exists(skia_dir + '/bin/gn') # Did you `tools/git-syc-deps`?
assert architectures
assert all(arch in skia_to_android_arch_name_map
for arch in architectures)
@@ -100,10 +101,8 @@ def make_apk(architectures,
build_paths = [apps_dir + '/.gradle',
apps_dir + '/skqp/build',
apps_dir + '/skqp/src/main/libs',
- apps_dir + '/skqp/src/main/assets/resources',
apps_dir + '/skqp/src/main/assets/gmkb']
remove(build_dir + '/libs')
- remove(build_dir + '/resources')
for path in build_paths:
remove(path)
newdir = os.path.join(build_dir, os.path.basename(path))
@@ -114,6 +113,11 @@ def make_apk(architectures,
except OSError:
pass
+ resources_path = apps_dir + '/skqp/src/main/assets/resources'
+ remove(resources_path)
+ os.symlink('../../../../../../../resources', resources_path)
+ build_paths.append(resources_path)
+
app = 'skqp'
lib = 'libskqp_app.so'
@@ -125,8 +129,6 @@ def make_apk(architectures,
sys.stderr.write(
'\n* * *\n\nNote: SkQP models are missing!!!!\n\n* * *\n\n')
- check_call([sys.executable, 'tools/skqp/setup_resources'])
-
for arch in architectures:
build = os.path.join(build_dir, arch)
gn_args = [android_ndk, '--arch', arch]