diff --git a/testing/remotecppunittests.py b/testing/remotecppunittests.py index fbe2f5335c1f..80af905f34dc 100644 --- a/testing/remotecppunittests.py +++ b/testing/remotecppunittests.py @@ -180,7 +180,8 @@ class RemoteCPPUnittestOptions(cppunittests.CPPUnittestOptions): 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", @@ -213,7 +214,8 @@ class RemoteCPPUnittestOptions(cppunittests.CPPUnittestOptions): help="Architecture of emulator to use: x86 or arm") self.add_option("--addEnv", action="append", type="string", dest="add_env", - help="additional remote environment variable definitions (eg. --addEnv \"somevar=something\")") + help="additional remote environment variable definitions " + "(eg. --addEnv \"somevar=something\")") defaults["add_env"] = None self.set_defaults(**defaults) @@ -237,7 +239,7 @@ def run_test_harness(options, args): dm_args['host'] = options.device_ip dm_args['port'] = options.device_port if options.log_tbpl_level == 'debug' or options.log_mach_level == 'debug': - dm_args['logLevel'] = logging.DEBUG + dm_args['logLevel'] = logging.DEBUG # noqa python 2 / 3 dm = devicemanagerADB.DeviceManagerADB(**dm_args) except: if options.with_b2g_emulator: diff --git a/testing/runcppunittests.py b/testing/runcppunittests.py index f56b5f410c60..a7ba1c925695 100755 --- a/testing/runcppunittests.py +++ b/testing/runcppunittests.py @@ -95,7 +95,8 @@ class CPPUnitTests(object): def build_environment(self): """ Create and return a dictionary of all the appropriate env variables and values. - On a remote system, we overload this to set different values and are missing things like os.environ and PATH. + On a remote system, we overload this to set different values and are missing things + like os.environ and PATH. """ if not os.path.isdir(self.xre_path): raise Exception("xre_path does not exist: %s", self.xre_path) @@ -185,7 +186,8 @@ class CPPUnittestOptions(OptionParser): self.add_option("--symbols-path", action="store", type="string", dest="symbols_path", default=None, - help="absolute path to directory containing breakpad symbols, or the URL of a zip file containing symbols") + help="absolute path to directory containing breakpad symbols, or " + "the URL of a zip file containing symbols") self.add_option("--manifest-path", action="store", type="string", dest="manifest_path", default=None, @@ -218,9 +220,16 @@ def extract_unittests_from_args(args, environ, manifest_path): active_tests = mp.active_tests(exists=False, disabled=False, **environ) suffix = '.exe' if mozinfo.isWin else '' if binary_path: - tests.extend([(os.path.join(binary_path, test['relpath'] + suffix), int(test.get('requesttimeoutfactor', 1))) for test in active_tests]) + tests.extend([ + (os.path.join(binary_path, test['relpath'] + suffix), + int(test.get('requesttimeoutfactor', 1))) + for test in active_tests]) else: - tests.extend([(test['path'] + suffix, int(test.get('requesttimeoutfactor', 1))) for test in active_tests]) + tests.extend([ + (test['path'] + suffix, + int(test.get('requesttimeoutfactor', 1))) + for test in active_tests + ]) # skip non-existing tests tests = [test for test in tests if os.path.isfile(test[0])] diff --git a/tools/lint/flake8.yml b/tools/lint/flake8.yml index 7c787abbc7fb..fed7d53b497e 100644 --- a/tools/lint/flake8.yml +++ b/tools/lint/flake8.yml @@ -17,6 +17,8 @@ flake8: - testing/marionette/puppeteer - testing/mozbase - testing/mochitest + - testing/remotecppunittests.py + - testing/runcppunittests.py - testing/talos/ - testing/xpcshell - tools/git