node/deps/v8/tools/clusterfuzz/js_fuzzer/foozzie_launcher.py
Michaël Zasso 6bbc5596b1
deps: update V8 to 10.2.154.2
PR-URL: https://github.com/nodejs/node/pull/42740
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
2022-04-21 11:54:15 +02:00

32 lines
898 B
Python

#!/usr/bin/env python3
# Copyright 2020 the V8 project authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""
Launcher for the foozzie differential-fuzzing harness. Wraps foozzie
with Python2 for backwards-compatibility when bisecting.
Obsolete now after switching to Python3 entirely. We keep the launcher
for a transition period.
"""
import os
import re
import subprocess
import sys
if __name__ == '__main__':
# In some cases or older versions, the python executable is passed as
# first argument. Let's be robust either way, with or without full
# path or version.
if re.match(r'.*python.*', sys.argv[1]):
args = sys.argv[2:]
else:
args = sys.argv[1:]
process = subprocess.Popen(['python3'] + args)
process = subprocess.Popen(args)
process.communicate()
sys.exit(process.returncode)