• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# -*- coding: utf-8 -*-
2
3import sys
4import os
5import time
6import string
7
8import common
9
10def install (extraArgs = ""):
11	curDir = os.getcwd()
12	try:
13		os.chdir(common.ANDROID_DIR)
14
15		adbCmd = common.shellquote(common.ADB_BIN)
16		if len(extraArgs) > 0:
17			adbCmd += " %s" % extraArgs
18
19		print "Removing old dEQP Package..."
20		common.execute("%s uninstall com.drawelements.deqp" % adbCmd)
21		print ""
22
23		print "Installing dEQP Package..."
24		common.execute("%s install -r package/bin/dEQP-debug.apk" % adbCmd)
25		print ""
26
27	finally:
28		# Restore working dir
29		os.chdir(curDir)
30
31if __name__ == "__main__":
32	if len(sys.argv) > 1:
33		install(string.join(sys.argv[1:], " "))
34	else:
35		install()
36