Reland "Copy crash_dump from device to chroot." am: 69c4d26fb3
Original change: https://android-review.googlesource.com/c/platform/art/+/2183158
Change-Id: I87cf70f0df8e6f17f077f6c2d528421864ae1262
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
diff --git a/tools/buildbot-sync.sh b/tools/buildbot-sync.sh
index 28dab0c..5970cc7 100755
--- a/tools/buildbot-sync.sh
+++ b/tools/buildbot-sync.sh
@@ -111,6 +111,26 @@
activate_apex com.android.conscrypt
activate_apex com.android.os.statsd
+# Replace the crash dump binary with the one on the device. This is because
+# the tombstoned server running is the one on the device.
+crash_dump_locations=(
+ # Location for Q+ devices.
+ "/apex/com.android.runtime/bin"
+ # Location on devices prior to Q.
+ "/system/bin/"
+)
+
+for b in 32 64; do
+ for crash_dump_location in ${crash_dump_locations[@]}; do
+ crash_dump_path="$crash_dump_location/crash_dump$b"
+ if adb shell test -x "$crash_dump_path"; then
+ msginfo "Copying $crash_dump_path from device to chroot"
+ adb shell cp "$crash_dump_path" "$ART_TEST_CHROOT/$crash_dump_path"
+ break
+ fi
+ done
+done
+
# Generate primary boot images on device for testing.
for b in {32,64}; do
basename="generate-boot-image$b"