xref: /aosp_15_r20/external/autotest/autotest_lib/client/deps/gtest/gtest.py (revision 9c5db1993ded3edbeafc8092d69fe5de2ee02df7)
1#!/usr/bin/python3
2
3# Copyright (c) 2010 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
7import common, os
8from autotest_lib.client.bin import utils
9
10version = 1
11
12def setup(top_dir):
13    # The copy the gtest files from the SYSROOT to the client
14    for libdir in ('/usr/local/lib64', '/usr/lib64', '/usr/local/lib',
15                   '/usr/lib'):
16        libdir_path = os.path.join(os.environ['SYSROOT'], libdir)
17        if os.path.exists(os.path.join(libdir_path, 'libgtest.so')):
18            os.chdir(libdir_path)
19            utils.run('cp libgtest* ' + top_dir)
20            break
21
22pwd = os.getcwd()
23utils.update_version(pwd + '/src', False, version, setup, pwd)
24