Fix cdex bugs to enable ART_DEFAULT_COMPACT_DEX_LEVEL=fast tests passing
Compute dex checksum for compact dex generation. Handle input vdex
by not aborting in oat_writer, instead just avoid generating compact
dex for the input vdex case.
Re-enabled some compact dex tests.
Bug: 63756964
Test: ART_DEFAULT_COMPACT_DEX_LEVEL=fast test-art-host
Change-Id: Ic9b4e4e59e6cd22b66ee2fc0d32c9b4a15f13497
diff --git a/runtime/common_runtime_test.h b/runtime/common_runtime_test.h
index 0f931e3..625884d 100644
--- a/runtime/common_runtime_test.h
+++ b/runtime/common_runtime_test.h
@@ -26,6 +26,7 @@
#include "arch/instruction_set.h"
#include "base/mutex.h"
+#include "cdex/compact_dex_level.h"
#include "globals.h"
// TODO: Add inl file and avoid including inl.
#include "obj_ptr-inl.h"
@@ -305,6 +306,11 @@
return; \
}
+#define TEST_DISABLED_FOR_COMPACT_DEX() \
+ if (kDefaultCompactDexLevel != CompactDexLevel::kCompactDexLevelNone) { \
+ printf("WARNING: TEST DISABLED FOR COMPACT DEX\n"); \
+ return; \
+ }
} // namespace art
#endif // ART_RUNTIME_COMMON_RUNTIME_TEST_H_