diff options
author | Googler <noreply@google.com> | 2016-02-23 17:04:12 +0000 |
---|---|---|
committer | Damien Martin-Guillerez <dmarting@google.com> | 2016-02-23 22:18:18 +0000 |
commit | b5ea2812b27656d01886d4182d6101ce47fae087 (patch) | |
tree | 09cb3535eaf4630e5b4154a8457ae6345711842d /site | |
parent | 78bac3e03b4aa028eda715adf66b194661bd6211 (diff) |
Looks to me like the example was slightly broken, I think this fixes it.
--
MOS_MIGRATED_REVID=115346303
Diffstat (limited to 'site')
-rw-r--r-- | site/docs/skylark/cookbook.md | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/site/docs/skylark/cookbook.md b/site/docs/skylark/cookbook.md index 9664e42451..cce7165fe3 100644 --- a/site/docs/skylark/cookbook.md +++ b/site/docs/skylark/cookbook.md @@ -80,7 +80,7 @@ tests for diverse flavors of the same test. `extension.bzl`: ```python -def system_test(test_file, flavor): +def system_test(name, test_file, flavor): n = "system_test_%s_%s_test" % (test_file, flavor) if native.existing_rule(n) == None: native.py_test( @@ -93,11 +93,11 @@ def system_test_suite(name, flavors=["default"], test_files): ts = [] for flavor in flavors: for test in test_files: - ts.append(system_test(name, flavor, test)) + ts.append(system_test(name, test, flavor)) native.test_suite(name = name, tests = ts) ``` -In the following BUILD file, note how `(fast, basic_test.py)` is emitted for +In the following BUILD file, note how `(basic_test.py, fast)` is emitted for both the `smoke` test suite and the `thorough` test suite. ```python |