1#!/usr/bin/env python3 2# Lint as: python2, python3 3# Copyright 2020 The Chromium OS Authors. All rights reserved. 4# Use of this source code is governed by a BSD-style license that can be 5# found in the LICENSE file. 6 7# This is a trampoline script to invoke the actual generator script. 8 9import os 10import sys 11 12target_script_name = 'generate_controlfiles_CTS_R.py' 13target_script_path = os.path.abspath( 14 os.path.join(os.path.dirname(__file__), '..', '..', 'cros', 'tradefed', 15 target_script_name)) 16 17# Note: Remove this once JDK9+ is the base JDK. 18try: 19 os.environ['JAVA_HOME'] = '/usr/lib64/jvm/jdk-9.0.4' 20 os.environ['PATH'] = os.environ['JAVA_HOME']\ 21 + '/bin:' + os.environ['PATH'] 22except OSError: 23 logging.error('Can\'t change current PATH directory') 24 25os.execv(target_script_path, sys.argv) 26