aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools/skpbench/_os_path.py
diff options
context:
space:
mode:
authorGravatar csmartdalton <csmartdalton@google.com>2016-09-19 12:04:56 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2016-09-19 12:04:56 -0700
commit0262b5c1a0ab704e42d367b070a09bb83188d983 (patch)
tree1231f8e42dab5433c26cb1d4032b9fc9e9b02788 /tools/skpbench/_os_path.py
parent613664b1bc645de31253c335c4f17e26ca40378f (diff)
Add adb support to skpbench
Diffstat (limited to 'tools/skpbench/_os_path.py')
-rw-r--r--tools/skpbench/_os_path.py22
1 files changed, 22 insertions, 0 deletions
diff --git a/tools/skpbench/_os_path.py b/tools/skpbench/_os_path.py
new file mode 100644
index 0000000000..42b1c42bf2
--- /dev/null
+++ b/tools/skpbench/_os_path.py
@@ -0,0 +1,22 @@
+# Copyright 2016 Google Inc.
+#
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+from os import path
+import glob
+
+def join(*pathnames):
+ return path.join(*pathnames)
+
+def basename(pathname):
+ return pathname.basename(pathname)
+
+def find_skps(skps):
+ pathnames = list()
+ for skp in skps:
+ if (path.isdir(skp)):
+ pathnames.extend(glob.iglob(path.join(skp, '*.skp')))
+ else:
+ pathnames.append(skp)
+ return pathnames