aboutsummaryrefslogtreecommitdiff
path: root/build/lib.linux-x86_64-2.7/lava_android_test/test_definitions/gatortest/daemoncheck.py
diff options
context:
space:
mode:
Diffstat (limited to 'build/lib.linux-x86_64-2.7/lava_android_test/test_definitions/gatortest/daemoncheck.py')
-rw-r--r--build/lib.linux-x86_64-2.7/lava_android_test/test_definitions/gatortest/daemoncheck.py20
1 files changed, 20 insertions, 0 deletions
diff --git a/build/lib.linux-x86_64-2.7/lava_android_test/test_definitions/gatortest/daemoncheck.py b/build/lib.linux-x86_64-2.7/lava_android_test/test_definitions/gatortest/daemoncheck.py
new file mode 100644
index 0000000..a1fa1b9
--- /dev/null
+++ b/build/lib.linux-x86_64-2.7/lava_android_test/test_definitions/gatortest/daemoncheck.py
@@ -0,0 +1,20 @@
+import sys
+from commands import getstatusoutput
+
+if len(sys.argv) == 1:
+ adbcmd = 'adb'
+else:
+ adbcmd = 'adb -s %s' % (sys.argv[1])
+
+cmd = '%s shell ps' % (adbcmd)
+rc, output = getstatusoutput(cmd)
+if rc != 0:
+ print 'Failed to run command %s : %s' % (cmd, output)
+ sys.exit(1)
+
+# parse output
+
+if output.find("gator") != -1:
+ print "gator_daemon_check=pass"
+else:
+ print "gator_daemon_check=fail"