aboutsummaryrefslogtreecommitdiff
path: root/build/lib.linux-x86_64-2.7/lava_android_test/test_definitions/gatortest/modulecheck.py
diff options
context:
space:
mode:
Diffstat (limited to 'build/lib.linux-x86_64-2.7/lava_android_test/test_definitions/gatortest/modulecheck.py')
-rw-r--r--build/lib.linux-x86_64-2.7/lava_android_test/test_definitions/gatortest/modulecheck.py20
1 files changed, 20 insertions, 0 deletions
diff --git a/build/lib.linux-x86_64-2.7/lava_android_test/test_definitions/gatortest/modulecheck.py b/build/lib.linux-x86_64-2.7/lava_android_test/test_definitions/gatortest/modulecheck.py
new file mode 100644
index 0000000..23f0ba6
--- /dev/null
+++ b/build/lib.linux-x86_64-2.7/lava_android_test/test_definitions/gatortest/modulecheck.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 lsmod' % (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_module_check=pass"
+else:
+ print "gator_module_check=fail"