When profiles are requested, also generate then for non-prebuild.
Test: test-art-host-run-test-debug-no-prebuild-optimizing-no-relocate-ntrace-cms-checkjni-picimage-npictest-ndebuggable-638-checker-inline-caches
Change-Id: Ib9243d453b723eda894f98a0fd25cea155251003
diff --git a/test/etc/run-test-jar b/test/etc/run-test-jar
index de16256..e4e571c 100755
--- a/test/etc/run-test-jar
+++ b/test/etc/run-test-jar
@@ -522,6 +522,16 @@
strip_cmdline="true"
sync_cmdline="true"
+if [ "$PROFILE" = "y" ]; then
+ profman_cmdline="${ANDROID_ROOT}/bin/profman \
+ --apk=$DEX_LOCATION/$TEST_NAME.jar \
+ --dex-location=$DEX_LOCATION/$TEST_NAME.jar \
+ --create-profile-from=$DEX_LOCATION/profile \
+ --reference-profile-file=$DEX_LOCATION/$TEST_NAME.prof"
+ COMPILE_FLAGS="${COMPILE_FLAGS} --profile-file=$DEX_LOCATION/$TEST_NAME.prof"
+ FLAGS="${FLAGS} -Xcompiler-option --profile-file=$DEX_LOCATION/$TEST_NAME.prof"
+fi
+
if [ "$PREBUILD" = "y" ]; then
mkdir_locations="${mkdir_locations} ${DEX_LOCATION}/oat/$ISA"
@@ -541,15 +551,6 @@
dex2oat_cmdline="${dex2oat_cmdline} --instruction-set-features=${INSTRUCTION_SET_FEATURES}"
fi
- if [ "$PROFILE" = "y" ]; then
- profman_cmdline="${ANDROID_ROOT}/bin/profman \
- --apk=$DEX_LOCATION/$TEST_NAME.jar \
- --dex-location=$DEX_LOCATION/$TEST_NAME.jar \
- --create-profile-from=$DEX_LOCATION/profile \
- --reference-profile-file=$TEST_NAME.prof"
- dex2oat_cmdline="${dex2oat_cmdline} --profile-file=$TEST_NAME.prof"
- fi
-
# Add in a timeout. This is important for testing the compilation/verification time of
# pathological cases.
# Note: as we don't know how decent targets are (e.g., emulator), only do this on the host for