Loading mobile/android/mach_commands.py +43 −0 Original line number Diff line number Diff line Loading @@ -171,3 +171,46 @@ class AndroidEmulatorCommands(MachCommandBase): self.log(logging.WARN, "emulator", {}, "Unable to retrieve Android emulator return code.") return 0 @CommandProvider class AutophoneCommands(MachCommandBase): """ Run autophone, https://wiki.mozilla.org/Auto-tools/Projects/Autophone. If necessary, autophone is cloned from github, installed, and configured. """ @Command('autophone', category='devenv', conditions=[], description='Run autophone.') @CommandArgument('--clean', action='store_true', help='Delete an existing autophone installation.') @CommandArgument('--verbose', action='store_true', help='Log informative status messages.') def autophone(self, clean=False, verbose=False): import platform from mozrunner.devices.autophone import AutophoneRunner if platform.system() == "Windows": # Autophone is normally run on Linux or OSX. self.log(logging.ERROR, "autophone", {}, "This mach command is not supported on Windows!") return -1 runner = AutophoneRunner(self, verbose) runner.load_config() if clean: runner.reset_to_clean() return 0 if not runner.setup_directory(): return 1 if not runner.install_requirements(): runner.save_config() return 2 if not runner.configure(): runner.save_config() return 3 runner.save_config() runner.launch_autophone() runner.command_prompts() return 0 testing/mozbase/mozrunner/mozrunner/devices/autophone.py 0 → 100644 +619 −0 File added.Preview size limit exceeded, changes collapsed. Show changes Loading
mobile/android/mach_commands.py +43 −0 Original line number Diff line number Diff line Loading @@ -171,3 +171,46 @@ class AndroidEmulatorCommands(MachCommandBase): self.log(logging.WARN, "emulator", {}, "Unable to retrieve Android emulator return code.") return 0 @CommandProvider class AutophoneCommands(MachCommandBase): """ Run autophone, https://wiki.mozilla.org/Auto-tools/Projects/Autophone. If necessary, autophone is cloned from github, installed, and configured. """ @Command('autophone', category='devenv', conditions=[], description='Run autophone.') @CommandArgument('--clean', action='store_true', help='Delete an existing autophone installation.') @CommandArgument('--verbose', action='store_true', help='Log informative status messages.') def autophone(self, clean=False, verbose=False): import platform from mozrunner.devices.autophone import AutophoneRunner if platform.system() == "Windows": # Autophone is normally run on Linux or OSX. self.log(logging.ERROR, "autophone", {}, "This mach command is not supported on Windows!") return -1 runner = AutophoneRunner(self, verbose) runner.load_config() if clean: runner.reset_to_clean() return 0 if not runner.setup_directory(): return 1 if not runner.install_requirements(): runner.save_config() return 2 if not runner.configure(): runner.save_config() return 3 runner.save_config() runner.launch_autophone() runner.command_prompts() return 0
testing/mozbase/mozrunner/mozrunner/devices/autophone.py 0 → 100644 +619 −0 File added.Preview size limit exceeded, changes collapsed. Show changes