blob: 82cb9bd5e32ac40a05216d9e561c474f9e238caf (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
|
<p><code>List of arbitrary text tags. Tags may be any valid string; default is the
empty list.</code></p>
<p>
<i>Tags</i> can be used on any rule. <i>Tags</i> on test and
<code>test_suite</code> rules are useful for categorizing the tests. <i>Tags</i>
on non-test rules are used to control sandboxed execution of
<code>genrule</code>s and [Skylark](/docs/skylark/index.html) actions, and for
parsing by humans and/or external tools.
</p>
<p>
Bazel modifies the behavior of its sandboxing code if it finds the following
keywords in the <code>tags</code> attribute of any test rule or
<code>genrule</code>, or the keys of <code>execution_requirements</code> for
any Skylark action.
</p>
<ul>
<li><code>local</code> keyword results in the action or test never being
run inside the [sandbox](/docs/bazel-user-manual.html#sandboxing).
</li>
</ul>
<p>
<i>Tags</i> on tests are generally used to annotate a test's role in your debug
and release process. Typically, tags are most useful for C++ and
Python tests, which
lack any runtime annotation ability. The use of tags and size elements
gives flexibility in assembling suites of tests based around codebase
check-in policy.
</p>
<p>
Bazel modifies test running behavior if it finds the following keywords in the
<code>tags</code> attribute of the test rule:
</p>
<ul>
<li><code>exclusive</code> keyword will force test to be run in the
"exclusive" mode, ensuring that no other tests are running at the
same time. Such tests will be executed in serial fashion after all build
activity and non-exclusive tests have been completed.
</li>
<li><code>manual</code> keyword will force test to be ignored by all command
line wildcards (<code>...</code>, <code>:*</code>, <code>:all</code>, etc).
It will also be ignored by the <code>test_suite</code> rules that do not
mention this test explicitly. The only way
to run such test is to specify it explicitly on the command line.
</li>
<li><code>external</code> keyword will force test to be unconditionally
executed (regardless of <code class='flag'>--cache_test_results</code> value).
</li>
</ul>
|