blob: 4924fb6e6bc455aded45ac0e22086cd03f52de8a [file] [log] [blame]
#!/usr/bin/env python
# Copyright 2018 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""This script is a wrapper script used during migration of performance
tests to use the new recipe. See
Non-telemetry tests now will all run with this script. The flag
--migrated-test will indicate if this test is using the new recipe or not.
By default this script runs the legacy testing/scripts/
import argparse
import os
import subprocess
import sys
SRC_DIR = os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(
GTEST = os.path.join(SRC_DIR, 'testing', 'scripts', '')
PERF = os.path.join(SRC_DIR, 'testing', 'scripts', '')
def main():
parser = argparse.ArgumentParser()
parser.add_argument('--migrated-test', type=bool, default=False)
args, rest_args = parser.parse_known_args()
if args.migrated_test:
return[sys.executable, PERF] + rest_args)
return[sys.executable, GTEST] + rest_args)
if __name__ == '__main__':