aboutsummaryrefslogtreecommitdiff
path: root/build/lib.linux-x86_64-2.7/lava_android_test/test_definitions/gatortest/modulecheck.py
blob: 23f0ba648647f704c1839bc579d04e147feacf4d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
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"