diff --git a/scripts/angle_deqp_test_merge.py b/scripts/angle_deqp_test_merge.py index 2d881a4d1..e80682155 100644 --- a/scripts/angle_deqp_test_merge.py +++ b/scripts/angle_deqp_test_merge.py @@ -6,9 +6,14 @@ """ Merges dEQP sharded test results in the ANGLE testing infrastucture.""" import os -import pathlib import sys +if sys.version_info.major != 3 and __name__ == '__main__': + # Swarming prepends sys.executable so we get python2 regardless of shebang. + # Spawn itself with vpython3 instead. + import subprocess + sys.exit(subprocess.call(['vpython3', os.path.realpath(__file__)] + sys.argv[1:])) +import pathlib # python3 PY_UTILS = str(pathlib.Path(__file__).resolve().parents[1] / 'src' / 'tests' / 'py_utils') if PY_UTILS not in sys.path: