Bug 1522689 - Update command line help for several android test commands; r=bc
authorGeoff Brown <gbrown@mozilla.com>
Fri, 01 Feb 2019 07:18:05 -0700
changeset 456417 81d899a5bbc32933759ef39da6adb3c28646c147
parent 456416 fc4ae5d9a7b2ce1191ecfed5b139024de5bd0c0e
child 456418 4ef98412ced0f8fb6e03adf04b93e917fb4083de
push id35484
push useraciure@mozilla.com
push dateFri, 01 Feb 2019 17:56:53 +0000
treeherdermozilla-central@09737cd5d4d9 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbc
bugs1522689
milestone67.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1522689 - Update command line help for several android test commands; r=bc
layout/tools/reftest/reftestcommandline.py
testing/mochitest/mochitest_options.py
testing/mochitest/runjunit.py
testing/remotecppunittests.py
testing/xpcshell/xpcshellcommandline.py
--- a/layout/tools/reftest/reftestcommandline.py
+++ b/layout/tools/reftest/reftestcommandline.py
@@ -406,60 +406,62 @@ class RemoteArgumentsParser(ReftestArgum
                           utilityPath="",
                           localLogName=None)
 
         self.add_argument("--adbpath",
                           action="store",
                           type=str,
                           dest="adb_path",
                           default=None,
-                          help="path to adb")
+                          help="Path to adb binary.")
 
         self.add_argument("--deviceSerial",
                           action="store",
                           type=str,
                           dest="deviceSerial",
-                          help="adb serial number of remote device to test")
+                          help="adb serial number of remote device. This is required "
+                               "when more than one device is connected to the host. "
+                               "Use 'adb devices' to see connected devices.")
 
         self.add_argument("--remote-webserver",
                           action="store",
                           type=str,
                           dest="remoteWebServer",
-                          help="IP Address of the webserver hosting the reftest content")
+                          help="IP address of the remote web server.")
 
         self.add_argument("--http-port",
                           action="store",
                           type=str,
                           dest="httpPort",
-                          help="port of the web server for http traffic")
+                          help="http port of the remote web server.")
 
         self.add_argument("--ssl-port",
                           action="store",
                           type=str,
                           dest="sslPort",
-                          help="Port for https traffic to the web server")
+                          help="ssl port of the remote web server.")
 
         self.add_argument("--remoteTestRoot",
                           action="store",
                           type=str,
                           dest="remoteTestRoot",
-                          help="remote directory to use as test root "
-                               "(eg. /mnt/sdcard/tests or /data/local/tests)")
+                          help="Remote directory to use as test root "
+                               "(eg. /mnt/sdcard/tests or /data/local/tests).")
 
         self.add_argument("--httpd-path",
                           action="store",
                           type=str,
                           dest="httpdPath",
-                          help="path to the httpd.js file")
+                          help="Path to the httpd.js file.")
 
         self.add_argument("--no-device-info",
                           action="store_false",
                           dest="printDeviceInfo",
                           default=True,
-                          help="do not display verbose diagnostics about the remote device")
+                          help="Do not display verbose diagnostics about the remote device.")
 
     def validate_remote(self, options, automation):
         if options.remoteWebServer is None:
             options.remoteWebServer = self.get_ip()
 
         if options.remoteWebServer == '127.0.0.1':
             self.error("ERROR: Either you specified the loopback for the remote webserver or ",
                        "your local IP cannot be detected.  "
--- a/testing/mochitest/mochitest_options.py
+++ b/testing/mochitest/mochitest_options.py
@@ -844,64 +844,66 @@ class MochitestArguments(ArgumentContain
 
 
 class AndroidArguments(ArgumentContainer):
     """Android specific arguments."""
 
     args = [
         [["--deviceSerial"],
          {"dest": "deviceSerial",
-          "help": "ip address of remote device to test",
+          "help": "adb serial number of remote device. This is required "
+                  "when more than one device is connected to the host. "
+                  "Use 'adb devices' to see connected devices.",
           "default": None,
           }],
         [["--adbpath"],
          {"dest": "adbPath",
           "default": None,
           "help": "Path to adb binary.",
           "suppress": True,
           }],
         [["--remote-webserver"],
          {"dest": "remoteWebServer",
           "default": None,
-          "help": "ip address where the remote web server is hosted at",
+          "help": "IP address of the remote web server.",
           }],
         [["--http-port"],
          {"dest": "httpPort",
           "default": DEFAULT_PORTS['http'],
-          "help": "http port of the remote web server",
+          "help": "http port of the remote web server.",
           "suppress": True,
           }],
         [["--ssl-port"],
          {"dest": "sslPort",
           "default": DEFAULT_PORTS['https'],
-          "help": "ssl port of the remote web server",
+          "help": "ssl port of the remote web server.",
           "suppress": True,
           }],
         [["--robocop-apk"],
          {"dest": "robocopApk",
           "default": "",
-          "help": "name of the Robocop APK to use for ADB test running",
+          "help": "Name of the robocop APK to use.",
           }],
         [["--remoteTestRoot"],
          {"dest": "remoteTestRoot",
           "default": None,
-          "help": "remote directory to use as test root \
-                   (eg. /mnt/sdcard/tests or /data/local/tests)",
+          "help": "Remote directory to use as test root "
+                  "(eg. /mnt/sdcard/tests or /data/local/tests).",
           "suppress": True,
           }],
         [["--enable-coverage"],
          {"action": "store_true",
           "default": False,
-          "help": "Enable collecting code coverage information when running"
+          "help": "Enable collecting code coverage information when running "
                   "robocop tests.",
           }],
         [["--coverage-output-dir"],
          {"action": "store",
           "default": None,
-          "help": "When using --enable-java-coverage, save the code coverage report"
+          "help": "When using --enable-java-coverage, save the code coverage report "
                   "files to this directory.",
           }],
     ]
 
     defaults = {
         # we don't want to exclude specialpowers on android just yet
         'extensionsToExclude': [],
         # mochijar doesn't get installed via marionette on android
--- a/testing/mochitest/runjunit.py
+++ b/testing/mochitest/runjunit.py
@@ -328,22 +328,24 @@ class JunitArgumentParser(argparse.Argum
                           dest="app",
                           default="org.mozilla.geckoview.test",
                           help="Test package name.")
         self.add_argument("--adbpath",
                           action="store",
                           type=str,
                           dest="adbPath",
                           default=None,
-                          help="Path to adb executable.")
+                          help="Path to adb binary.")
         self.add_argument("--deviceSerial",
                           action="store",
                           type=str,
                           dest="deviceSerial",
-                          help="adb serial number of remote device.")
+                          help="adb serial number of remote device. This is required "
+                               "when more than one device is connected to the host. "
+                               "Use 'adb devices' to see connected devices. ")
         self.add_argument("--remoteTestRoot",
                           action="store",
                           type=str,
                           dest="remoteTestRoot",
                           help="Remote directory to use as test root "
                                "(eg. /mnt/sdcard/tests or /data/local/tests).")
         self.add_argument("--disable-e10s",
                           action="store_false",
@@ -405,28 +407,28 @@ class JunitArgumentParser(argparse.Argum
                           dest="certPath",
                           default=None,
                           help="Path to directory containing certificate store."),
         self.add_argument("--http-port",
                           action="store",
                           type=str,
                           dest="httpPort",
                           default=DEFAULT_PORTS['http'],
-                          help="Port of the web server for http traffic.")
+                          help="http port of the remote web server.")
         self.add_argument("--remote-webserver",
                           action="store",
                           type=str,
                           dest="remoteWebServer",
-                          help="IP address of the webserver.")
+                          help="IP address of the remote web server.")
         self.add_argument("--ssl-port",
                           action="store",
                           type=str,
                           dest="sslPort",
                           default=DEFAULT_PORTS['https'],
-                          help="Port of the web server for https traffic.")
+                          help="ssl port of the remote web server.")
         # Remaining arguments are test filters.
         self.add_argument("test_filters",
                           nargs="*",
                           help="Test filter(s): class and/or method names of test(s) to run.")
 
         mozlog.commandline.add_logging_group(self)
 
 
--- a/testing/remotecppunittests.py
+++ b/testing/remotecppunittests.py
@@ -166,49 +166,53 @@ class RemoteCPPUnitTests(cppunittests.CP
 class RemoteCPPUnittestOptions(cppunittests.CPPUnittestOptions):
 
     def __init__(self):
         cppunittests.CPPUnittestOptions.__init__(self)
         defaults = {}
 
         self.add_option("--deviceSerial", action="store",
                         type="string", dest="device_serial",
-                        help="serial ID of device")
+                        help="adb serial number of remote device. This is required "
+                             "when more than one device is connected to the host. "
+                             "Use 'adb devices' to see connected devices.")
         defaults["device_serial"] = None
 
         self.add_option("--adbPath", action="store",
                         type="string", dest="adb_path",
-                        help="Path to adb")
+                        help="Path to adb binary.")
         defaults["adb_path"] = None
 
         self.add_option("--noSetup", action="store_false",
                         dest="setup",
-                        help="do not copy any files to device (to be used only if "
-                        "device is already setup)")
+                        help="Do not copy any files to device (to be used only if "
+                             "device is already setup).")
         defaults["setup"] = True
 
         self.add_option("--localLib", action="store",
                         type="string", dest="local_lib",
-                        help="location of libraries to push -- preferably stripped")
+                        help="Location of libraries to push -- preferably stripped.")
         defaults["local_lib"] = None
 
         self.add_option("--apk", action="store",
                         type="string", dest="local_apk",
-                        help="local path to Fennec APK")
+                        help="Local path to Firefox for Android APK.")
         defaults["local_apk"] = None
 
         self.add_option("--localBinDir", action="store",
                         type="string", dest="local_bin",
-                        help="local path to bin directory")
+                        help="Local path to bin directory.")
         defaults[
             "local_bin"] = build_obj.bindir if build_obj is not None else None
 
         self.add_option("--remoteTestRoot", action="store",
                         type="string", dest="remote_test_root",
-                        help="remote directory to use as test root (eg. /data/local/tests)")
+                        help="Remote directory to use as test root "
+                             "(eg. /mnt/sdcard/tests or /data/local/tests).")
+
         # /data/local/tests is used because it is usually not possible to set +x permissions
         # on binaries on /mnt/sdcard
         defaults["remote_test_root"] = "/data/local/tests"
 
         self.add_option("--addEnv", action="append",
                         type="string", dest="add_env",
                         help="additional remote environment variable definitions "
                         "(eg. --addEnv \"somevar=something\")")
--- a/testing/xpcshell/xpcshellcommandline.py
+++ b/testing/xpcshell/xpcshellcommandline.py
@@ -136,41 +136,43 @@ def add_common_arguments(parser):
     parser.add_argument("--verify-max-time",
                         dest="verifyMaxTime",
                         type=int, default=3600,
                         help="Maximum time, in seconds, to run in --verify mode.")
 
 
 def add_remote_arguments(parser):
     parser.add_argument("--objdir", action="store", type=str, dest="objdir",
-                        help="local objdir, containing xpcshell binaries")
+                        help="Local objdir, containing xpcshell binaries.")
 
     parser.add_argument("--apk", action="store", type=str, dest="localAPK",
-                        help="local path to Fennec APK")
+                        help="Local path to Firefox for Android APK.")
 
     parser.add_argument("--deviceSerial", action="store", type=str, dest="deviceSerial",
-                        help="serial ID of device")
+                        help="adb serial number of remote device. This is required "
+                             "when more than one device is connected to the host. "
+                             "Use 'adb devices' to see connected devices.")
 
     parser.add_argument("--adbPath", action="store", type=str, dest="adbPath",
                         default=None,
-                        help="Path to adb")
+                        help="Path to adb binary.")
 
     parser.add_argument("--noSetup", action="store_false", dest="setup", default=True,
-                        help="do not copy any files to device (to be used only if "
-                             "device is already setup)")
+                        help="Do not copy any files to device (to be used only if "
+                             "device is already setup).")
 
     parser.add_argument("--local-lib-dir", action="store", type=str, dest="localLib",
-                        help="local path to library directory")
+                        help="Local path to library directory.")
 
     parser.add_argument("--local-bin-dir", action="store", type=str, dest="localBin",
-                        help="local path to bin directory")
+                        help="Local path to bin directory.")
 
     parser.add_argument("--remoteTestRoot", action="store", type=str, dest="remoteTestRoot",
-                        help="remote directory to use as test root "
-                             "(eg. /mnt/sdcard/tests or /data/local/tests)")
+                        help="Remote directory to use as test root "
+                             "(eg. /mnt/sdcard/tests or /data/local/tests).")
 
 
 def parser_desktop():
     parser = argparse.ArgumentParser()
     add_common_arguments(parser)
     commandline.add_logging_group(parser)
 
     return parser