Bug 1522689 - Update command line help for several android test commands; r=bc

This commit is contained in:
Geoff Brown 2019-02-01 07:18:05 -07:00
Родитель b70f38bced
Коммит 7c8f4e8f58
5 изменённых файлов: 53 добавлений и 41 удалений

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

@ -411,50 +411,52 @@ class RemoteArgumentsParser(ReftestArgumentsParser):
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:

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

@ -849,7 +849,9 @@ class AndroidArguments(ArgumentContainer):
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"],
@ -861,42 +863,42 @@ class AndroidArguments(ArgumentContainer):
[["--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.",
}],
]

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

@ -333,12 +333,14 @@ class JunitArgumentParser(argparse.ArgumentParser):
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,
@ -410,18 +412,18 @@ class JunitArgumentParser(argparse.ArgumentParser):
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="*",

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

@ -171,39 +171,43 @@ class RemoteCPPUnittestOptions(cppunittests.CPPUnittestOptions):
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"

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

@ -141,31 +141,33 @@ def add_common_arguments(parser):
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():