1#!/usr/bin/env python2 2# Copyright 2020 The Chromium OS 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# This is a trampoline script to invoke the actual generator script. 7 8import os 9import sys 10 11target_script_name = 'generate_controlfiles_CTS_R.py' 12target_script_path = os.path.abspath( 13 os.path.join(os.path.dirname(__file__), '..', '..', 'cros', 'tradefed', 14 target_script_name)) 15 16# Note: Remove this once JDK9+ is the base JDK. 17try: 18 os.environ['JAVA_HOME'] = '/usr/lib64/jvm/jdk-9.0.4' 19 os.environ['PATH'] = os.environ['JAVA_HOME']\ 20 + '/bin:' + os.environ['PATH'] 21except OSError: 22 logging.error('Can\'t change current PATH directory') 23 24os.execv(target_script_path, sys.argv) 25