Merge "Create an artifact to include the list of integrated tests in TradeFed"
diff --git a/core/Makefile b/core/Makefile
index 135422d..5b0cb2c 100644
--- a/core/Makefile
+++ b/core/Makefile
@@ -1133,10 +1133,9 @@
 recovery_sepolicy := \
     $(TARGET_RECOVERY_ROOT_OUT)/sepolicy \
     $(TARGET_RECOVERY_ROOT_OUT)/plat_file_contexts \
-    $(TARGET_RECOVERY_ROOT_OUT)/vendor_file_contexts \
+    $(TARGET_RECOVERY_ROOT_OUT)/nonplat_file_contexts \
     $(TARGET_RECOVERY_ROOT_OUT)/plat_property_contexts \
-    $(TARGET_RECOVERY_ROOT_OUT)/vendor_property_contexts
-
+    $(TARGET_RECOVERY_ROOT_OUT)/nonplat_property_contexts
 # Passed into rsync from non-recovery root to recovery root, to avoid overwriting recovery-specific
 # SELinux files
 IGNORE_RECOVERY_SEPOLICY := $(patsubst $(TARGET_RECOVERY_OUT)/%,--exclude=/%,$(recovery_sepolicy))
diff --git a/core/soong_java_prebuilt.mk b/core/soong_java_prebuilt.mk
index e7f5fa5..6cf9422 100644
--- a/core/soong_java_prebuilt.mk
+++ b/core/soong_java_prebuilt.mk
@@ -26,6 +26,8 @@
 ifdef LOCAL_SOONG_JACOCO_REPORT_CLASSES_JAR
   $(eval $(call copy-one-file,$(LOCAL_SOONG_JACOCO_REPORT_CLASSES_JAR),\
     $(intermediates.COMMON)/jacoco-report-classes.jar))
+  $(call add-dependency,$(common_javalib.jar),\
+    $(intermediates.COMMON)/jacoco-report-classes.jar)
 endif
 
 ifneq ($(TURBINE_DISABLED),false)
@@ -41,9 +43,13 @@
     $(eval $(call copy-one-file,$(LOCAL_SOONG_DEX_JAR),$(common_javalib.jar)))
     $(eval $(call add-dependency,$(common_javalib.jar),$(full_classes_jar) $(full_classes_header_jar)))
 
+    dex_preopt_profile_src_file := $(common_javalib.jar)
+
     # defines built_odex along with rule to install odex
     include $(BUILD_SYSTEM)/dex_preopt_odex_install.mk
 
+    dex_preopt_profile_src_file :=
+
     ifdef LOCAL_DEX_PREOPT
       ifneq ($(dexpreopt_boot_jar_module),) # boot jar
         # boot jar's rules are defined in dex_preopt.mk
diff --git a/tools/releasetools/build_image.py b/tools/releasetools/build_image.py
index e11f5a6..3770a79 100755
--- a/tools/releasetools/build_image.py
+++ b/tools/releasetools/build_image.py
@@ -548,6 +548,7 @@
     if base_fs_file is not None:
       os.remove(base_fs_file)
   if exit_code != 0:
+    print("Error: '%s' failed with exit code %d" % (build_command, exit_code))
     return False
 
   # Bug: 21522719, 22023465
@@ -625,7 +626,11 @@
 
     os.remove(unsparse_image)
 
-  return exit_code == 0
+    if exit_code != 0:
+      print("Error: '%s' failed with exit code %d" % (e2fsck_command, exit_code))
+      return False
+
+  return True
 
 
 def ImagePropFromGlobalDict(glob_dict, mount_point):