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

Unified Diff: recipes/engine_tests/recipe_paths.py

Issue 2512253002: Add name, package_repo_resource and resource support to recipe scripts. (Closed)
Patch Set: Created 4 years, 1 month 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: recipes/engine_tests/recipe_paths.py
diff --git a/recipes/engine_tests/recipe_paths.py b/recipes/engine_tests/recipe_paths.py
new file mode 100644
index 0000000000000000000000000000000000000000..76c1c3da695266ccb06da90849236a194d5a3ea1
--- /dev/null
+++ b/recipes/engine_tests/recipe_paths.py
@@ -0,0 +1,18 @@
+# Copyright 2015 The LUCI Authors. All rights reserved.
+# Use of this source code is governed under the Apache License, Version 2.0
+# that can be found in the LICENSE file.
+
+"""Tests that recipes have access to names, resources and their package."""
+
+DEPS = [
+ 'step',
+ 'path',
nodir 2016/11/18 22:42:25 sort?
iannucci 2016/11/19 00:00:57 Done.
+]
+
+def RunSteps(api):
+ api.step('recipe_name', ['echo', api.name])
+ api.step('some_resource', ['echo', api.resource('something.py')])
+ api.step('package_root', ['echo', api.package_repo_resource('path', 'to', 'file')])
+
+def GenTests(api):
+ yield api.test('basic')

Powered by Google App Engine
This is Rietveld 408576698