aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/test
diff options
context:
space:
mode:
authorGravatar Adam Michael <ajmichael@google.com>2016-12-05 19:44:53 +0000
committerGravatar Damien Martin-Guillerez <dmarting@google.com>2016-12-06 12:04:57 +0000
commit3f008a0bec454a9f83415b5f23ddd7c710e25b7c (patch)
tree26f8a986327e58976f1879b6464a8f6c06ca04e1 /src/test
parentc645a45204b5ee4698387b0487b8a5136ba6d06f (diff)
Mount TreeArtifact directories as inputs to Spawns.
Fixes https://github.com/bazelbuild/bazel/issues/1928. -- PiperOrigin-RevId: 141077737 MOS_MIGRATED_REVID=141077737
Diffstat (limited to 'src/test')
-rwxr-xr-xsrc/test/shell/bazel/android/android_integration_test.sh23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/test/shell/bazel/android/android_integration_test.sh b/src/test/shell/bazel/android/android_integration_test.sh
index 466f78776a..00d215757a 100755
--- a/src/test/shell/bazel/android/android_integration_test.sh
+++ b/src/test/shell/bazel/android/android_integration_test.sh
@@ -234,6 +234,29 @@ function test_android_binary_clang() {
check_soname
}
+# Regression test for https://github.com/bazelbuild/bazel/issues/1928.
+function test_empty_tree_artifact_action_inputs_mount_empty_directories() {
+ create_new_workspace
+ setup_android_support
+ cat > AndroidManifest.xml <<EOF
+<manifest package="com.test"/>
+EOF
+ mkdir res
+ zip test.aar AndroidManifest.xml res/
+ cat > BUILD <<EOF
+aar_import(
+ name = "test",
+ aar = "test.aar",
+)
+EOF
+ # Building aar_import invokes the AndroidResourceProcessingAction with a
+ # TreeArtifact of the AAR resources as the input. Since there are no
+ # resources, the Bazel sandbox should create an empty directory. If the
+ # directory is not created, the action thinks that its inputs do not exist and
+ # crashes.
+ bazel build :test
+}
+
# ndk r10 and earlier
if [[ ! -r "${TEST_SRCDIR}/androidndk/ndk/RELEASE.TXT" ]]; then
# ndk r11 and later