Bug 717684 - Robocop: better diagnostics when TEST_PATH incorrect; r=jmaher
authorGeoff Brown <gbrown@mozilla.com>
Tue, 24 Jan 2012 09:46:34 -0500
changeset 86454 8689bf0890246878031b3c36752451bdfa8ac450
parent 86453 3ca66b666f8531f9deaecb0cf5ff52654bb736f9
child 86455 91782ac21c655eba42c5a792bd9418b2996a37be
push id805
push userakeybl@mozilla.com
push dateWed, 01 Feb 2012 18:17:35 +0000
treeherdermozilla-aurora@6fb3bf232436 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjmaher
bugs717684
milestone12.0a1
Bug 717684 - Robocop: better diagnostics when TEST_PATH incorrect; r=jmaher
testing/mochitest/runtestsremote.py
--- a/testing/mochitest/runtestsremote.py
+++ b/testing/mochitest/runtestsremote.py
@@ -396,16 +396,17 @@ def main():
             fennec_ids = os.path.abspath(os.path.join(options.robocopPath, "fennec_ids.txt"))
         dm.pushFile(fennec_ids, "/sdcard/fennec_ids.txt")
         options.extraPrefs.append('robocop.logfile="%s/robocop.log"' % deviceRoot)
 
         if (options.dm_trans == 'adb' and options.robocopPath):
           dm.checkCmd(["install", "-r", os.path.join(options.robocopPath, "robocop.apk")])
 
         appname = options.app
+        retVal = None
         for test in robocop_tests:
             if options.testPath and options.testPath != test['name']:
                 continue
 
             options.app = "am"
             options.browserArgs = ["instrument", "-w", "-e", "class"]
             options.browserArgs.append("%s.tests.%s" % (appname, test['name']))
             options.browserArgs.append("org.mozilla.roboexample.test/android.test.InstrumentationTestRunner")
@@ -416,16 +417,19 @@ def main():
                 print "TEST-UNEXPECTED-ERROR | %s | Exception caught while running robocop tests." % sys.exc_info()[1]
                 mochitest.stopWebServer(options)
                 mochitest.stopWebSocketServer(options)
                 try:
                     self.cleanup(None, options)
                 except:
                     pass
                 sys.exit(1)
+        if retVal is None:
+            print "No tests run. Did you pass an invalid TEST_PATH?"
+            retVal = 1         
     else:
       try:
         retVal = mochitest.runTests(options)
       except:
         print "TEST-UNEXPECTED-ERROR | %s | Exception caught while running tests." % sys.exc_info()[1]
         mochitest.stopWebServer(options)
         mochitest.stopWebSocketServer(options)
         try: