File tree 2 files changed +19
-1
lines changed
main/java/com/google/devtools/build/lib/runtime/commands
2 files changed +19
-1
lines changed Original file line number Diff line number Diff line change @@ -81,7 +81,7 @@ public void editOptions(OptionsParser optionsParser) {
81
81
"cquery should include 'tags = [\" manual\" ]' targets by default" ,
82
82
ImmutableList .of ("--build_manual_tests" ));
83
83
optionsParser .parse (
84
- PriorityCategory .COMPUTED_DEFAULT ,
84
+ PriorityCategory .SOFTWARE_REQUIREMENT ,
85
85
// https://github.com/bazelbuild/bazel/issues/11078
86
86
"cquery should not exclude test_suite rules" ,
87
87
ImmutableList .of ("--noexpand_test_suites" ));
@@ -93,6 +93,10 @@ public void editOptions(OptionsParser optionsParser) {
93
93
"--include_config_fragments_provider="
94
94
+ cqueryOptions .showRequiredConfigFragments ));
95
95
}
96
+ optionsParser .parse (
97
+ PriorityCategory .SOFTWARE_REQUIREMENT ,
98
+ "cquery should not exclude tests" ,
99
+ ImmutableList .of ("--nobuild_tests_only" ));
96
100
} catch (OptionsParsingException e ) {
97
101
throw new IllegalStateException ("Cquery's known options failed to parse" , e );
98
102
}
Original file line number Diff line number Diff line change 819
819
assert_contains " //$pkg :my_test" output
820
820
}
821
821
822
+ function test_build_tests_only_override() {
823
+ local -r pkg=$FUNCNAME
824
+ mkdir -p $pkg
825
+ cat > $pkg /BUILD << 'EOF '
826
+ cc_binary(
827
+ name = "not_a_test",
828
+ srcs = ["not_a_test.cc"])
829
+ EOF
830
+
831
+ bazel cquery --build_tests_only " //$pkg :all" > output 2> " $TEST_log " || \
832
+ fail " Expected success"
833
+ assert_contains " //$pkg :not_a_test" output
834
+ }
835
+
822
836
function test_label_output_shows_alias_labels() {
823
837
local -r pkg=$FUNCNAME
824
838
mkdir -p $pkg
You can’t perform that action at this time.
0 commit comments