aboutsummaryrefslogtreecommitdiffhomepage
path: root/infra/bots/assets/opencl_headers/common.py
diff options
context:
space:
mode:
authorGravatar Ben Wagner <benjaminwagner@google.com>2018-06-28 20:41:04 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2018-06-29 13:06:57 +0000
commit55a7d22beb635ac960b16858b0ffe67424402950 (patch)
tree4313247b900b3e1c36cbfddc108e9c0468151e78 /infra/bots/assets/opencl_headers/common.py
parenteb8f8106f38ccd975f8b513cb1272f48c5362f74 (diff)
Add OpenCL build.
Bug: skia:8081 Change-Id: I8b2a88cc25970398511aa078d456ca8a1182792b Reviewed-on: https://skia-review.googlesource.com/136594 Commit-Queue: Mike Klein <mtklein@google.com> Auto-Submit: Ben Wagner <benjaminwagner@google.com> Reviewed-by: Mike Klein <mtklein@google.com>
Diffstat (limited to 'infra/bots/assets/opencl_headers/common.py')
-rwxr-xr-xinfra/bots/assets/opencl_headers/common.py26
1 files changed, 26 insertions, 0 deletions
diff --git a/infra/bots/assets/opencl_headers/common.py b/infra/bots/assets/opencl_headers/common.py
new file mode 100755
index 0000000000..caa0ad899c
--- /dev/null
+++ b/infra/bots/assets/opencl_headers/common.py
@@ -0,0 +1,26 @@
+#!/usr/bin/env python
+#
+# Copyright 2017 Google Inc.
+#
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+
+"""Common vars used by scripts in this directory."""
+
+
+import os
+import sys
+
+FILE_DIR = os.path.dirname(os.path.abspath(__file__))
+INFRA_BOTS_DIR = os.path.realpath(os.path.join(FILE_DIR, os.pardir, os.pardir))
+
+sys.path.insert(0, INFRA_BOTS_DIR)
+from assets import assets
+
+ASSET_NAME = os.path.basename(FILE_DIR)
+
+
+def run(cmd):
+ """Run a command, eg. "upload" or "download". """
+ assets.main([cmd, ASSET_NAME] + sys.argv[1:])