blob: c4c554a5d3a3617c6ee76e6549de59e5235915da [file] [log] [blame]
Rico Wind1f4172c2018-09-06 16:29:03 +02001#!/usr/bin/env python
2# Copyright (c) 2018, the R8 project authors. Please see the AUTHORS file
3# for details. All rights reserved. Use of this source code is governed by a
4# BSD-style license that can be found in the LICENSE file.
5
6# Utility methods to make running on our performance tracking system easier.
7import os
8import sys
9
10LINKED_THIRD_PARTY_DIRECTORIES = [
11 'framework',
12 'benchmarks',
13 'gradle-plugin',
14 'gradle',
15 'android_jar',
16 'proguardsettings',
17 'gmscore',
18 'youtube',
19 'gmail',
20 'r8',
21 'openjdk',
22]
23
24# Path to our internally updated third party
Rico Wind1c737862018-09-12 09:40:26 +020025THIRD_PARTY_SOURCE = "/usr/local/google/home/golem/r8/third_party"
Rico Wind1f4172c2018-09-06 16:29:03 +020026
27def link_third_party():
28 assert os.path.exists('third_party')
29 for dir in LINKED_THIRD_PARTY_DIRECTORIES:
30 src = os.path.join(THIRD_PARTY_SOURCE, dir)
31 dest = os.path.join('third_party', dir)
32 if os.path.exists(dest):
33 raise Exception('Destination "{}" already exists, are you running with'
34 ' --golem locally'.format(dest))
35 print('Symlinking {} to {}'.format(src, dest))
36 os.symlink(src, dest)
37
38if __name__ == '__main__':
39 sys.exit(link_third_party())