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

Unified Diff: recipe_modules/properties/example.py

Issue 2909983003: [loader] Make recipe engine support examples/ module subdir (Closed)
Patch Set: Created 3 years, 7 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: recipe_modules/properties/example.py
diff --git a/recipe_modules/properties/example.py b/recipe_modules/properties/example.py
deleted file mode 100644
index ae25a2f9c270319f144caa275d6f2a8b21d3f430..0000000000000000000000000000000000000000
--- a/recipe_modules/properties/example.py
+++ /dev/null
@@ -1,72 +0,0 @@
-# Copyright 2014 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.
-
-from recipe_engine.recipe_api import Property
-
-DEPS = [
- 'properties',
- 'step',
-]
-
-PROPERTIES = {
- 'test_prop': Property(),
- 'foo.bar-bam': Property(param_name='param_name_test'),
-}
-
-def RunSteps(api, test_prop, param_name_test):
- api.step('echo', ['echo'] + [repr(test_prop), repr(param_name_test)])
-
- properties = api.properties.thaw()
- api.step('echo all', ['echo'] + map(repr, sorted(properties.iteritems())))
-
- # It should behave like a real dictionary.
- assert len(properties) == len(api.properties)
- for k in api.properties:
- api.step('echo %s' % k, ['echo', repr(api.properties[k])])
-
-
-def GenTests(api):
- pd = {'foo.bar-bam': 'thing'}
- yield api.test('basic') + api.properties(
- test_prop={'key': 'value'}, **pd)
- yield api.test('lists') + api.properties(
- test_prop={'key': ['value', ['value']]}, **pd)
- yield api.test('dicts') + api.properties(
- test_prop={'key': {'key': 'value', 'other_key': {'key': 'value'}}},
- **pd)
-
- yield (
- api.test('exception') +
- api.expect_exception('ValueError')
- )
-
- # Some default buildbot configurations.
- pd['test_prop'] = None
- yield api.test('buildbot_generic') + api.properties.generic(**pd)
- yield (api.test('buildbot_scheduled') +
- api.properties.scheduled(**pd))
- yield (api.test('buildbot_git_scheduled') +
- api.properties.git_scheduled(**pd))
- yield (api.test('buildbot_tryserver') +
- api.properties.tryserver(**pd))
- yield (api.test('buildbot_tryserver_gerrit') +
- api.properties.tryserver(gerrit_project='infra/infra', **pd))
- yield (api.test('buildbot_tryserver_gerrit_override_gerrit') +
- api.properties.tryserver(
- gerrit_project='infra/internal',
- gerrit_url='https://chrome-internal-review.googlesource.com',
- **pd))
- yield (api.test('buildbot_tryserver_gerrit_override_git') +
- api.properties.tryserver(
- gerrit_project='infra/hidden',
- git_url='https://chrome-internal.googlesource.com/infra/hidden',
- **pd))
- yield (api.test('buildbot_tryserver_gerrit_override_both') +
- api.properties.tryserver(
- gerrit_project='custom',
- gerrit_url='https://gerrit.my.host',
- git_url='https://git.my.host/custom',
- patch_issue=989898,
- patch_set=3,
- **pd))
« no previous file with comments | « recipe_modules/platform/examples/full.expected/win32.json ('k') | recipe_modules/properties/example.expected/basic.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698