Skip to content

Commit

Permalink
Update Bazel's android_device support to use new emulator paths.
Browse files Browse the repository at this point in the history
Also, bundle snapshots.img in Bazel since it was removed from the SDK.

Part of the fix for bazelbuild#3504

Note that this will require an update to unified launcher at https://github.com/google/android-testing-support-library

RELNOTES: None
PiperOrigin-RevId: 169937694
  • Loading branch information
aj-michael authored and vladmos committed Sep 26, 2017
1 parent 282c29e commit b5c0202
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,32 +20,27 @@ alias(

alias(
name = "emulator_arm",
actual = "tools/emulator64-arm",
actual = "emulator/emulator64-arm",
)

alias(
name = "emulator_x86",
actual = "tools/emulator64-x86",
actual = "emulator/emulator64-x86",
)

filegroup(
name = "emulator_x86_bios",
srcs = glob(["tools/lib/pc-bios/*"]),
srcs = glob(["emulator/lib/pc-bios/*"]),
)

alias(
name = "mksd",
actual = "tools/mksdcard",
)

alias(
name = "empty_snapshot_fs",
actual = "tools/lib/emulator/snapshots.img",
actual = "emulator/mksdcard",
)

filegroup(
name = "emulator_shared_libs",
srcs = glob(["tools/lib64/**"]),
srcs = glob(["emulator/lib64/**"]),
)

filegroup(
Expand All @@ -56,8 +51,8 @@ filegroup(
filegroup(
name = "qemu2_x86",
srcs = [
"tools/emulator",
"tools/qemu/linux-x86_64/qemu-system-i386",
"emulator/emulator",
"emulator/qemu/linux-x86_64/qemu-system-i386",
],
)

Expand Down
1 change: 1 addition & 0 deletions tools/android/emulator/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,6 @@ filegroup(
"BUILD.tools",
"googletest.sh",
"no_se_linux.properties",
"snapshots.img.zip",
],
)
7 changes: 5 additions & 2 deletions tools/android/emulator/BUILD.tools
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,12 @@ alias(
actual = "@androidsdk//:mksd",
)

alias(
genrule(
name = "empty_snapshot_fs",
actual = "@androidsdk//:empty_snapshot_fs",
srcs = ["snapshots.img.zip"],
outs = ["snapshots.img"],
tools = ["@bazel_tools//tools/zip:zipper"],
cmd = "$(location @bazel_tools//tools/zip:zipper) x $< -d $(@D)",
)

filegroup(
Expand Down
Binary file added tools/android/emulator/snapshots.img.zip
Binary file not shown.

0 comments on commit b5c0202

Please sign in to comment.