Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(102)

Unified Diff: third_party/recipe_engine/lint_test.py

Issue 1241323004: Cross-repo recipe package system. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/build
Patch Set: Moved show_me_the_modules into recipe_engine Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/recipe_engine/lint_test.py
diff --git a/third_party/recipe_engine/lint_test.py b/third_party/recipe_engine/lint_test.py
old mode 100755
new mode 100644
index 247d685c36eb0af5f8698e335f8a68dc40d9d473..340b9a453e05eb2cccdf4eb75a78a4c60106e43b
--- a/third_party/recipe_engine/lint_test.py
+++ b/third_party/recipe_engine/lint_test.py
@@ -23,6 +23,7 @@ MODULES_WHITELIST = [
r'collections',
r'contextlib',
r'datetime',
+ r'itertools',
r'json',
r'math',
r're',
@@ -58,8 +59,17 @@ def ImportsTest(recipe_path, recipe_name, whitelist, universe):
(recipe_path, module_name))
-def main(universe, whitelist=[]):
+def main(package_pyl, whitelist=[]):
+ from . import loader
+ from . import package
+
+ if isinstance(package_pyl, package.PackageDeps):
+ package_deps = package_pyl
+ else:
+ package_deps = package.PackageDeps.create(package_pyl)
+
whitelist = map(re.compile, MODULES_WHITELIST + whitelist)
+ universe = loader.RecipeUniverse(package_deps)
errors = []
for recipe_path, recipe_name in universe.loop_over_recipes():

Powered by Google App Engine
This is Rietveld 408576698