Skip to content

Commit

Permalink
Be explicit about alowing empty globs (third part)
Browse files Browse the repository at this point in the history
There are several globs that are empty and this prevents building
with the incompatible flag bazelbuild#8195.
This commit just makes it explicit that empty is allowed.
  • Loading branch information
limdor committed Oct 18, 2022
1 parent 63aace2 commit 201beaa
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,6 @@ public void testFatApk_androidPlatformsFlag() throws Exception {
" proguard_specs = [],",
" deps = ['lib', 'native-lib'],",
" manifest = 'AndroidManifest.xml',",
" resource_files = glob(['res/**']))");
useConfiguration(
"--android_platforms=//java/android/platforms:x86,//java/android/platforms:armeabi-v7a",
"--dynamic_mode=off");
Expand Down Expand Up @@ -1077,7 +1076,6 @@ public void testIncrementalDexingUsesDexArchives_binaryDependingOnAliasTarget()
"android_library(",
" name = 'dep',",
" srcs = ['dep.java'],",
" resource_files = glob(['res/**']),",
" manifest = 'AndroidManifest.xml',",
")",
"alias(",
Expand Down Expand Up @@ -1632,7 +1630,6 @@ public void testProGuardExecutableMatchesConfiguration() throws Exception {
"java/com/google/devtools/build/jkrunchy/BUILD",
"package(default_visibility=['//visibility:public'])",
"java_binary(name = 'jkrunchy',",
" srcs = glob(['*.java']),",
" main_class = 'com.google.devtools.build.jkrunchy.JKrunchyMain')");

useConfiguration("--proguard_top=//java/com/google/devtools/build/jkrunchy:jkrunchy");
Expand Down Expand Up @@ -1903,7 +1900,6 @@ public void omitResourcesInfoProviderFromAndroidBinary_enabled() throws Exceptio
"android_binary(",
" name = 'myapp',",
" manifest = 'AndroidManifest.xml',",
" resource_files = glob(['res/**/*']),",
")");

assertThat(binary.get(AndroidResourcesInfo.PROVIDER)).isNull();
Expand All @@ -1919,7 +1915,6 @@ public void omitResourcesInfoProviderFromAndroidBinary_disabled() throws Excepti
"android_binary(",
" name = 'myapp',",
" manifest = 'AndroidManifest.xml',",
" resource_files = glob(['res/**/*']),",
")");

assertThat(binary.get(AndroidResourcesInfo.PROVIDER)).isNotNull();
Expand Down Expand Up @@ -1979,7 +1974,6 @@ public void testFilterResourcesPseudolocalesPropagated() throws Exception {
dir,
"bin",
"android_binary(name = 'bin',",
" resource_files = glob(['res/**']),",
" resource_configuration_filters = ['en', 'en-rXA', 'ar-rXB'],",
" manifest = 'AndroidManifest.xml')");

Expand Down Expand Up @@ -2045,18 +2039,15 @@ public void testInheritedRNotInRuntimeJars() throws Exception {
dir + "BUILD",
"android_library(name = 'sublib',",
" manifest = 'AndroidManifest.xml',",
" resource_files = glob(['res3/**']),",
" srcs =['sublib.java'],",
" )",
"android_library(name = 'lib',",
" manifest = 'AndroidManifest.xml',",
" resource_files = glob(['res2/**']),",
" deps = [':sublib'],",
" srcs =['lib.java'],",
" )",
"android_binary(name = 'bin',",
" manifest = 'AndroidManifest.xml',",
" resource_files = glob(['res/**']),",
" deps = [':lib'],",
" srcs =['bin.java'],",
" )");
Expand Down Expand Up @@ -2160,15 +2151,12 @@ public void testUseRClassGeneratorMultipleDeps() throws Exception {
"java/r/android/BUILD",
"android_library(name = 'lib1',",
" manifest = 'AndroidManifest.xml',",
" resource_files = glob(['res1/**']),",
" )",
"android_library(name = 'lib2',",
" manifest = 'AndroidManifest.xml',",
" resource_files = glob(['res2/**']),",
" )",
"android_binary(name = 'r',",
" manifest = 'AndroidManifest.xml',",
" resource_files = glob(['res/**']),",
" deps = [':lib1', ':lib2'],",
" )");
ConfiguredTargetAndData binary = getConfiguredTargetAndData("//java/r/android:r");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,6 @@ public void javaHomeGenerated() throws Exception {
")",
"java_runtime(",
" name = 'jvm', ",
" srcs = glob(['generated_java_home/**']), ",
" java = 'generated_java_home/bin/java', ",
" java_home = 'generated_java_home',",
")");
Expand Down
1 change: 0 additions & 1 deletion src/test/shell/integration/discard_graph_edges_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,6 @@ load(":bar.bzl", "bar")
load(":baz.bzl", "baz")
cc_library(name = 'cclib', srcs = ['cclib.cc'])
genrule(name = 'histodump',
srcs = glob(["*.in"]),
outs = ['histo.txt'],
local = 1,
tools = [':cclib'],
Expand Down

0 comments on commit 201beaa

Please sign in to comment.