aboutsummaryrefslogtreecommitdiff
path: root/lava_android_test/api.py
diff options
context:
space:
mode:
authorYongqin Liu <yongqin.liu@linaro.org>2015-01-03 17:46:21 +0800
committerYongqin Liu <yongqin.liu@linaro.org>2015-01-03 17:46:21 +0800
commitcf7013d6e23f0a0da3bcae5fb9d8e20639b1d21f (patch)
tree4888505a53fc2070d376945391ae48bbee333166 /lava_android_test/api.py
downloadlava-android-test-cf7013d6e23f0a0da3bcae5fb9d8e20639b1d21f.tar.gz
first commit
Signed-off-by: Yongqin Liu <yongqin.liu@linaro.org>
Diffstat (limited to 'lava_android_test/api.py')
-rw-r--r--lava_android_test/api.py44
1 files changed, 44 insertions, 0 deletions
diff --git a/lava_android_test/api.py b/lava_android_test/api.py
new file mode 100644
index 0000000..624422e
--- /dev/null
+++ b/lava_android_test/api.py
@@ -0,0 +1,44 @@
+"""
+Public API for extending Abrek
+"""
+from abc import abstractmethod
+
+
+class ITest(object):
+ """
+ Abrek test.
+
+ Something that can be installed and invoked by abre.
+ """
+
+ @abstractmethod
+ def install(self):
+ """
+ Install the test suite.
+
+ This creates an install directory under the user's XDG_DATA_HOME
+ directory to mark that the test is installed. The installer's
+ install() method is then called from this directory to complete any
+ test specific install that may be needed.
+ """
+
+ @abstractmethod
+ def uninstall(self):
+ """
+ Uninstall the test suite.
+
+ Uninstalling just recursively removes the test specific directory under
+ the user's XDG_DATA_HOME directory. This will both mark the test as
+ removed, and clean up any files that were downloaded or installed under
+ that directory. Dependencies are intentionally not removed by this.
+ """
+
+ @abstractmethod
+ def run(self, quiet=False):
+ # TODO: Document me
+ pass
+
+ @abstractmethod
+ def parse(self, resultname):
+ # TODO: Document me
+ pass