diff options
author | marmeladema <xademax@gmail.com> | 2019-10-20 19:34:25 +0100 |
---|---|---|
committer | marmeladema <xademax@gmail.com> | 2019-10-20 23:43:25 +0100 |
commit | 865d7377b30c43c98072a6883a50f98d97e2b45a (patch) | |
tree | 631e510a5745a51bb2ec8318e8d5ebaa6a3caa87 /python/servo/testing_commands.py | |
parent | 882dcc8408159bed5633337d11e83b6839f97e34 (diff) | |
download | servo-865d7377b30c43c98072a6883a50f98d97e2b45a.tar.gz servo-865d7377b30c43c98072a6883a50f98d97e2b45a.zip |
Replace call to execfile(...) by call to exec(compile(open(...)))
This is done in order to be compatible with Python3
Diffstat (limited to 'python/servo/testing_commands.py')
-rw-r--r-- | python/servo/testing_commands.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/python/servo/testing_commands.py b/python/servo/testing_commands.py index 1f7651f814b..79b73ccc6e5 100644 --- a/python/servo/testing_commands.py +++ b/python/servo/testing_commands.py @@ -350,7 +350,7 @@ class MachCommands(CommandBase): run_file = path.abspath(path.join(test_file_dir, "runtests.py")) run_globals = {"__file__": run_file} - execfile(run_file, run_globals) + exec(compile(open(run_file).read(), run_file, 'exec'), run_globals) verbose = not quiet return run_globals["run_tests"](tests, verbose) @@ -442,7 +442,7 @@ class MachCommands(CommandBase): kwargs["binary_args"] = binary_args run_globals = {"__file__": run_file} - execfile(run_file, run_globals) + exec(compile(open(run_file).read(), run_file, 'exec'), run_globals) return run_globals["run_tests"](**kwargs) @Command('update-manifest', @@ -473,7 +473,7 @@ class MachCommands(CommandBase): return 1 run_globals = {"__file__": run_file} - execfile(run_file, run_globals) + exec(compile(open(run_file).read(), run_file, 'exec'), run_globals) return run_globals["update_tests"](**kwargs) @Command('filter-intermittents', @@ -913,7 +913,7 @@ testing/web-platform/mozilla/tests for Servo-only tests""" % reference_path) "components", "net", "tests", "cookie_http_state_utils.py")) run_globals = {"__file__": run_file} - execfile(run_file, run_globals) + exec(compile(open(run_file).read(), run_file, 'exec'), run_globals) return run_globals["update_test_file"](cache_dir) @Command('update-webgl', @@ -934,7 +934,7 @@ testing/web-platform/mozilla/tests for Servo-only tests""" % reference_path) shutil.rmtree(dest_folder) run_globals = {"__file__": run_file} - execfile(run_file, run_globals) + exec(compile(open(run_file).read(), run_file, 'exec'), run_globals) return run_globals["update_conformance"](version, dest_folder, None, patches_dir) @Command('smoketest', |