Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(586)

Unified Diff: build/android/pylib/instrumentation/test_package.py

Issue 2101243005: Add a snapshot of flutter/engine/src/build to our sdk (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: add README.dart Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: build/android/pylib/instrumentation/test_package.py
diff --git a/build/android/pylib/instrumentation/test_package.py b/build/android/pylib/instrumentation/test_package.py
new file mode 100644
index 0000000000000000000000000000000000000000..5be061d4af8fb1b3aa9814eed409a4385ca01071
--- /dev/null
+++ b/build/android/pylib/instrumentation/test_package.py
@@ -0,0 +1,44 @@
+# Copyright (c) 2013 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+"""Class representing instrumentation test apk and jar."""
+
+import os
+
+from pylib.instrumentation import test_jar
+from pylib.utils import apk_helper
+
+
+class TestPackage(test_jar.TestJar):
+ def __init__(self, apk_path, jar_path, test_support_apk_path):
+ test_jar.TestJar.__init__(self, jar_path)
+
+ if not os.path.exists(apk_path):
+ raise Exception('%s not found, please build it' % apk_path)
+ if test_support_apk_path and not os.path.exists(test_support_apk_path):
+ raise Exception('%s not found, please build it' % test_support_apk_path)
+ self._apk_path = apk_path
+ self._apk_name = os.path.splitext(os.path.basename(apk_path))[0]
+ self._package_name = apk_helper.GetPackageName(self._apk_path)
+ self._test_support_apk_path = test_support_apk_path
+
+ def GetApkPath(self):
+ """Returns the absolute path to the APK."""
+ return self._apk_path
+
+ def GetApkName(self):
+ """Returns the name of the apk without the suffix."""
+ return self._apk_name
+
+ def GetPackageName(self):
+ """Returns the package name of this APK."""
+ return self._package_name
+
+ # Override.
+ def Install(self, device):
+ device.Install(self.GetApkPath())
+ if (self._test_support_apk_path and
+ os.path.exists(self._test_support_apk_path)):
+ device.Install(self._test_support_apk_path)
+
« no previous file with comments | « build/android/pylib/instrumentation/test_options.py ('k') | build/android/pylib/instrumentation/test_result.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698