Bug 722367 - Update path to robocop.apk and fennec_ids.txt in mochitest-robotium target. r=jmaher

This commit is contained in:
Kartikaya Gupta 2012-01-30 13:14:47 -05:00
Родитель a2f3351029
Коммит d295229424
2 изменённых файлов: 15 добавлений и 3 удалений

Просмотреть файл

@ -117,6 +117,11 @@ class RemoteOptions(MochitestOptions):
help = "Path to the folder where robocop.apk is located at. Primarily used for ADB test running")
defaults["robocopPath"] = ""
self.add_option("--robocop-ids", action = "store",
type = "string", dest = "robocopIds",
help = "name of the file containing the view ID map (fennec_ids.txt)")
defaults["robocopIds"] = ""
defaults["remoteTestRoot"] = None
defaults["logFile"] = "mochitest.log"
defaults["autorun"] = True
@ -188,6 +193,12 @@ class RemoteOptions(MochitestOptions):
return None
options.robocopPath = os.path.abspath(options.robocopPath)
if options.robocopIds != "":
if not os.path.exists(options.robocopIds):
print "ERROR: Unable to find specified IDs file '%s'" % options.robocopIds
return None
options.robocopIds = os.path.abspath(options.robocopIds)
return options
def verifyOptions(self, options, mochitest):
@ -392,8 +403,8 @@ def main():
dm.removeFile("/sdcard/robotium.config")
dm.pushFile("robotium.config", "/sdcard/robotium.config")
fennec_ids = os.path.abspath("fennec_ids.txt")
if not os.path.exists(fennec_ids) and options.robocopPath:
fennec_ids = os.path.abspath(os.path.join(options.robocopPath, "fennec_ids.txt"))
if not os.path.exists(fennec_ids) and options.robocopIds:
fennec_ids = options.robocopIds
dm.pushFile(fennec_ids, "/sdcard/fennec_ids.txt")
options.extraPrefs.append('robocop.logfile="%s/robocop.log"' % deviceRoot)

Просмотреть файл

@ -76,7 +76,8 @@ RUN_MOCHITEST_REMOTE = \
RUN_MOCHITEST_ROBOTIUM = \
rm -f ./$@.log && \
$(PYTHON) _tests/testing/mochitest/runtestsremote.py --robocop-path=$(DEPTH)/build/mobile/robocop \
$(PYTHON) _tests/testing/mochitest/runtestsremote.py --robocop-path=$(DEPTH)/dist \
--robocop-ids=$(DEPTH)/build/mobile/robocop/fennec_ids.txt \
--console-level=INFO --log-file=./$@.log --file-level=INFO $(DM_FLAGS) --dm_trans=adb \
--app=$(TEST_PACKAGE_NAME) --deviceIP=${TEST_DEVICE} --xre-path=${MOZ_HOST_BIN} \
--robocop=$(DEPTH)/build/mobile/robocop/robocop.ini $(SYMBOLS_PATH) $(TEST_PATH_ARG) $(EXTRA_TEST_ARGS)