bazel query and test tags

2,307 views
Skip to first unread message

Erik Kuefler

unread,
Aug 11, 2015, 2:40:05 PM8/11/15
to bazel-...@googlegroups.com
Is there a way to restrict the results of bazel query to include/exclude tests with certain tags? In particular, I'm using a derivative of the CI script, but the query it uses causes manual tests to be run that I'd prefer weren't.

Greg Estren

unread,
Aug 11, 2015, 3:38:47 PM8/11/15
to Erik Kuefler, bazel-...@googlegroups.com
How about:

bazel query 'kind("*_test", //foo:all) except attr("tags", "manual", //foo:all)'

?

On Tue, Aug 11, 2015 at 2:39 PM, Erik Kuefler <ekue...@gmail.com> wrote:
Is there a way to restrict the results of bazel query to include/exclude tests with certain tags? In particular, I'm using a derivative of the CI script, but the query it uses causes manual tests to be run that I'd prefer weren't.

--
You received this message because you are subscribed to the Google Groups "bazel-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bazel-discus...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/bazel-discuss/CANK5_0o18T2Ya9dfYB2U0h3O6WjvC6H1eNJMRWOeY_65mfx2sA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Erik Kuefler

unread,
Aug 11, 2015, 7:38:52 PM8/11/15
to Greg Estren, bazel-...@googlegroups.com
Aha, was too caught up looking for tags specifically that I forgot about attributes. Perfect, thanks.

Andrew Allen

unread,
Aug 11, 2015, 10:11:46 PM8/11/15
to Erik Kuefler, Greg Estren, bazel-...@googlegroups.com
It wouldn't be too hard to update the existing script to have that query. Would you mind contributing a patch?


/** ~Andrew Z Allen */

Thiago Farina

unread,
Aug 11, 2015, 10:56:13 PM8/11/15
to Andrew Allen, bazel-...@googlegroups.com
On Tue, Aug 11, 2015 at 11:11 PM, Andrew Allen <m...@andrewzallen.com> wrote:
It wouldn't be too hard to update the existing script to have that query. Would you mind contributing a patch?

He has uploaded for review. https://bazel-review.googlesource.com/1800

--
Thiago Farina

Erik Kuefler

unread,
Aug 12, 2015, 1:40:30 AM8/12/15
to Andrew Allen, Greg Estren, bazel-...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages