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

Unified Diff: scripts/slave/recipes/annotated_run_test.py

Issue 1347273002: RELAND of Cross-repo recipe package system. (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/build@master
Patch Set: Here's how it got fixed Created 5 years, 3 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: scripts/slave/recipes/annotated_run_test.py
diff --git a/scripts/slave/recipes/annotated_run_test.py b/scripts/slave/recipes/annotated_run_test.py
new file mode 100644
index 0000000000000000000000000000000000000000..43907733a212bc3055de7bdd9ab9667bcd17a8dd
--- /dev/null
+++ b/scripts/slave/recipes/annotated_run_test.py
@@ -0,0 +1,40 @@
+# Copyright 2014 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+"""Checks that properties get to recipes from annotated_run properly"""
+
+from recipe_engine.recipe_api import Property
+
+DEPS = [
+ 'recipe_engine/step',
+ 'recipe_engine/properties',
+]
+
+PROPERTIES = {
+ 'true_prop': Property(),
+ 'num_prop': Property(),
+ 'string_prop': Property(),
+ 'dict_prop': Property(),
iannucci 2015/09/16 22:26:49 list_prop!
+}
+
+def RunSteps(api, true_prop, num_prop, string_prop, dict_prop):
+ assert true_prop == True
+ assert num_prop == 123
+ assert string_prop == '321'
+ assert dict_prop == {'foo': 'bar'}
+
+def GenTests(api):
+ yield api.test('basic') + api.properties(
+ true_prop=True,
+ num_prop=123,
+ string_prop='321',
+ dict_prop={'foo': 'bar'})
+
+ yield (api.test('type_error') + api.properties(
+ true_prop=True,
+ num_prop=123,
+ string_prop=321,
+ dict_prop={'foo': 'bar'}) +
+ api.expect_exception('AssertionError'))
+
« no previous file with comments | « scripts/slave/recipes/android_webview_shell_tests.py ('k') | scripts/slave/recipes/annotated_run_test.expected/basic.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698