OLD | NEW |
| (Empty) |
1 # Copyright (c) 2015 The Chromium Authors. All rights reserved. | |
2 # Use of this source code is governed by a BSD-style license that can be | |
3 # found in the LICENSE file. | |
4 | |
5 import os | |
6 import sys | |
7 | |
8 BUILD_ROOT = os.path.dirname(os.path.dirname(os.path.dirname( | |
9 os.path.abspath(__file__)))) | |
10 BUILD_INTERNAL_ROOT = os.path.join( | |
11 os.path.dirname(BUILD_ROOT), 'build_internal') | |
12 | |
13 sys.path.append(os.path.join(BUILD_ROOT, 'third_party')) | |
14 | |
15 _UNIVERSE = None | |
16 def get_universe(): | |
17 from recipe_engine import loader | |
18 global _UNIVERSE | |
19 if _UNIVERSE is None: | |
20 roots = [BUILD_ROOT, BUILD_INTERNAL_ROOT] | |
21 _UNIVERSE = loader.RecipeUniverse( | |
22 module_dirs=[ os.path.join(root, 'scripts', 'slave', 'recipe_modules') | |
23 for root in roots ], | |
24 recipe_dirs=[ os.path.join(root, 'scripts', 'slave', 'recipes') | |
25 for root in roots ]) | |
26 return _UNIVERSE | |
27 | |
OLD | NEW |