Loading taskcluster/mach_commands.py +13 −2 Original line number Diff line number Diff line Loading @@ -15,7 +15,6 @@ from six import text_type import sys import traceback import re from distutils.util import strtobool from mach.decorators import ( CommandArgument, Loading @@ -27,6 +26,18 @@ from mach.decorators import ( from mozbuild.base import MachCommandBase def strtobool(value): """Convert string to boolean. Wraps "distutils.util.strtobool", deferring the import of the package in case it's not installed. Otherwise, we have a "chicken and egg problem" where |mach bootstrap| would install the required package to enable "distutils.util", but it can't because mach fails to interpret this file. """ from distutils.util import strtobool return bool(strtobool(value)) class ShowTaskGraphSubCommand(SubCommand): """A SubCommand with TaskGraph-specific arguments""" Loading Loading @@ -162,7 +173,7 @@ class MachCommands(MachCommandBase): @CommandArgument('--target-tasks-method', type=text_type, help='method for selecting the target tasks to generate') @CommandArgument('--optimize-target-tasks', type=lambda flag: bool(strtobool(flag)), type=lambda flag: strtobool(flag), nargs='?', const='true', help='If specified, this indicates whether the target ' 'tasks are eligible for optimization. Otherwise, ' Loading testing/raptor/mach_commands.py +4 −1 Original line number Diff line number Diff line Loading @@ -25,7 +25,6 @@ from mozbuild.base import ( BinaryNotFoundException, ) from mozbuild.base import MachCommandConditions as Conditions from raptor.power import enable_charging, disable_charging HERE = os.path.dirname(os.path.realpath(__file__)) Loading Loading @@ -222,6 +221,10 @@ class MachRaptor(MachCommandBase): description='Run Raptor performance tests.', parser=create_parser) def run_raptor(self, **kwargs): # Defers this import so that a transitive dependency doesn't # stop |mach bootstrap| from running from raptor.power import enable_charging, disable_charging build_obj = self is_android = Conditions.is_android(build_obj) or \ Loading Loading
taskcluster/mach_commands.py +13 −2 Original line number Diff line number Diff line Loading @@ -15,7 +15,6 @@ from six import text_type import sys import traceback import re from distutils.util import strtobool from mach.decorators import ( CommandArgument, Loading @@ -27,6 +26,18 @@ from mach.decorators import ( from mozbuild.base import MachCommandBase def strtobool(value): """Convert string to boolean. Wraps "distutils.util.strtobool", deferring the import of the package in case it's not installed. Otherwise, we have a "chicken and egg problem" where |mach bootstrap| would install the required package to enable "distutils.util", but it can't because mach fails to interpret this file. """ from distutils.util import strtobool return bool(strtobool(value)) class ShowTaskGraphSubCommand(SubCommand): """A SubCommand with TaskGraph-specific arguments""" Loading Loading @@ -162,7 +173,7 @@ class MachCommands(MachCommandBase): @CommandArgument('--target-tasks-method', type=text_type, help='method for selecting the target tasks to generate') @CommandArgument('--optimize-target-tasks', type=lambda flag: bool(strtobool(flag)), type=lambda flag: strtobool(flag), nargs='?', const='true', help='If specified, this indicates whether the target ' 'tasks are eligible for optimization. Otherwise, ' Loading
testing/raptor/mach_commands.py +4 −1 Original line number Diff line number Diff line Loading @@ -25,7 +25,6 @@ from mozbuild.base import ( BinaryNotFoundException, ) from mozbuild.base import MachCommandConditions as Conditions from raptor.power import enable_charging, disable_charging HERE = os.path.dirname(os.path.realpath(__file__)) Loading Loading @@ -222,6 +221,10 @@ class MachRaptor(MachCommandBase): description='Run Raptor performance tests.', parser=create_parser) def run_raptor(self, **kwargs): # Defers this import so that a transitive dependency doesn't # stop |mach bootstrap| from running from raptor.power import enable_charging, disable_charging build_obj = self is_android = Conditions.is_android(build_obj) or \ Loading