summaryrefslogtreecommitdiffstats
path: root/test/etc/default-build
diff options
context:
space:
mode:
authorBrian Carlstrom <bdc@google.com>2012-03-06 22:56:41 -0800
committerBrian Carlstrom <bdc@google.com>2012-03-06 22:56:53 -0800
commit78325a44fbbdfbf47c9f1bd3166afcb71465a013 (patch)
treea0c56c1b792c44a4d4bc041104df1c08a05c9926 /test/etc/default-build
parent37c44442a0f1b3ae5f95e40d455022bcafb566e4 (diff)
downloadart-78325a44fbbdfbf47c9f1bd3166afcb71465a013.tar.gz
art-78325a44fbbdfbf47c9f1bd3166afcb71465a013.tar.bz2
art-78325a44fbbdfbf47c9f1bd3166afcb71465a013.zip
Fix 071-dexfile by having run-test use a unique directory
If userdata.img is flashed, the /data/art-test is owned by the system user. However, 071 requires the directory it runs in to have be owned by the running user (root in eng builds). Change-Id: I5230908291fd2ff6c5ebda98cfc3ef4c7ea7482e
Diffstat (limited to 'test/etc/default-build')
-rwxr-xr-xtest/etc/default-build10
1 files changed, 6 insertions, 4 deletions
diff --git a/test/etc/default-build b/test/etc/default-build
index 1d11c9f77d..308a49f6c0 100755
--- a/test/etc/default-build
+++ b/test/etc/default-build
@@ -25,8 +25,9 @@ if [ -r src2 ]; then
fi
dx -JXmx256m --debug --dex --dump-to=classes.lst --output=classes.dex --dump-width=1000 classes
-zip ${ANDROID_PRODUCT_OUT}/data/art-test/$TEST_NAME.jar classes.dex
-dex2oatd --boot-image=${ANDROID_PRODUCT_OUT}/data/art-test/core.art --dex-file=${ANDROID_PRODUCT_OUT}/data/art-test/$TEST_NAME.jar --dex-location=/data/art-test/$TEST_NAME.jar --oat-file=${ANDROID_PRODUCT_OUT}/data/art-test/$TEST_NAME.jar.oat
+mkdir -p ${ANDROID_PRODUCT_OUT}/data/run-test
+zip ${ANDROID_PRODUCT_OUT}/data/run-test/$TEST_NAME.jar classes.dex
+dex2oatd --boot-image=${ANDROID_PRODUCT_OUT}/data/art-test/core.art --dex-file=${ANDROID_PRODUCT_OUT}/data/run-test/$TEST_NAME.jar --dex-location=/data/run-test/$TEST_NAME.jar --oat-file=${ANDROID_PRODUCT_OUT}/data/run-test/$TEST_NAME.jar.oat
if [ -r src-ex ]; then
mkdir classes-ex
@@ -36,8 +37,9 @@ if [ -r src-ex ]; then
# quick shuffle so that the stored name is "classes.dex"
mv classes.dex classes-1.dex
mv classes-ex.dex classes.dex
- zip ${ANDROID_PRODUCT_OUT}/data/art-test/$TEST_NAME-ex.jar classes.dex
- dex2oatd --boot-image=${ANDROID_PRODUCT_OUT}/data/art-test/core.art --dex-file=${ANDROID_PRODUCT_OUT}/data/art-test/$TEST_NAME-ex.jar --dex-location=/data/art-test/$TEST_NAME-ex.jar --oat-file=${ANDROID_PRODUCT_OUT}/data/art-test/$TEST_NAME-ex.jar.oat
+ mkdir -p ${ANDROID_PRODUCT_OUT}/data/run-test
+ zip ${ANDROID_PRODUCT_OUT}/data/run-test/$TEST_NAME-ex.jar classes.dex
+ dex2oatd --boot-image=${ANDROID_PRODUCT_OUT}/data/art-test/core.art --dex-file=${ANDROID_PRODUCT_OUT}/data/run-test/$TEST_NAME-ex.jar --dex-location=/data/run-test/$TEST_NAME-ex.jar --oat-file=${ANDROID_PRODUCT_OUT}/data/run-test/$TEST_NAME-ex.jar.oat
mv classes.dex classes-ex.dex
mv classes-1.dex classes.dex
fi