1#!/usr/bin/env python3 2# Copyright 2020 the V8 project authors. All rights reserved. 3# Use of this source code is governed by a BSD-style license that can be 4# found in the LICENSE file. 5 6 7""" 8Launcher for the foozzie differential-fuzzing harness. Wraps foozzie 9with Python2 for backwards-compatibility when bisecting. 10 11Obsolete now after switching to Python3 entirely. We keep the launcher 12for a transition period. 13""" 14 15import os 16import re 17import subprocess 18import sys 19 20if __name__ == '__main__': 21 # In some cases or older versions, the python executable is passed as 22 # first argument. Let's be robust either way, with or without full 23 # path or version. 24 if re.match(r'.*python.*', sys.argv[1]): 25 args = sys.argv[2:] 26 else: 27 args = sys.argv[1:] 28 process = subprocess.Popen(['python3'] + args) 29 process = subprocess.Popen(args) 30 process.communicate() 31 sys.exit(process.returncode) 32