fix missing dx in build server.
Change-Id: I18c49c5cc1efc97199cb076dc258c4b9b7a46e8a
diff --git a/test/003-omnibus-opcodes/build b/test/003-omnibus-opcodes/build
index 4bc2f84..9dff837 100644
--- a/test/003-omnibus-opcodes/build
+++ b/test/003-omnibus-opcodes/build
@@ -22,5 +22,5 @@
rm classes/UnresClass.class
${JAVAC} -d classes `find src2 -name '*.java'`
-dx -JXmx256m --debug --dex --dump-to=classes.lst --output=classes.dex classes
+${DX} -JXmx256m --debug --dex --dump-to=classes.lst --output=classes.dex classes
zip $TEST_NAME.jar classes.dex
diff --git a/test/022-interface/build b/test/022-interface/build
index 36738c3..c86b1dc 100644
--- a/test/022-interface/build
+++ b/test/022-interface/build
@@ -19,5 +19,5 @@
# Use classes that are compiled with ecj that exposes an invokeinterface
# issue when interfaces override methods in Object
-dx --debug --dex --dump-to=classes.lst --output=classes.dex classes
+${DX} --debug --dex --dump-to=classes.lst --output=classes.dex classes
zip $TEST_NAME.jar classes.dex
diff --git a/test/023-many-interfaces/build b/test/023-many-interfaces/build
index 618d85e..4ea52d9 100644
--- a/test/023-many-interfaces/build
+++ b/test/023-many-interfaces/build
@@ -24,5 +24,5 @@
mkdir classes
${JAVAC} -d classes src/*.java
-dx --debug --dex --dump-to=classes.lst --output=classes.dex classes
+${DX} --debug --dex --dump-to=classes.lst --output=classes.dex classes
zip $TEST_NAME.jar classes.dex
diff --git a/test/056-const-string-jumbo/build b/test/056-const-string-jumbo/build
index ce71acd..a12c9d3 100644
--- a/test/056-const-string-jumbo/build
+++ b/test/056-const-string-jumbo/build
@@ -42,5 +42,5 @@
mkdir classes
${JAVAC} -d classes src/*.java
-dx -JXmx500m --debug --dex --no-optimize --positions=none --no-locals --dump-to=classes.lst --output=classes.dex classes
+${DX} -JXmx500m --debug --dex --no-optimize --positions=none --no-locals --dump-to=classes.lst --output=classes.dex classes
zip $TEST_NAME.jar classes.dex
diff --git a/test/085-old-style-inner-class/build b/test/085-old-style-inner-class/build
index 9e77013..963d6b3 100644
--- a/test/085-old-style-inner-class/build
+++ b/test/085-old-style-inner-class/build
@@ -23,6 +23,6 @@
${JAVAC} -source 1.4 -target 1.4 -d classes `find src -name '*.java'`
# Suppress stderr to keep the inner class warnings out of the expected output.
-dx --debug --dex --dump-to=classes.lst --output=classes.dex --dump-width=1000 classes 2>/dev/null
+${DX} --debug --dex --dump-to=classes.lst --output=classes.dex --dump-width=1000 classes 2>/dev/null
zip $TEST_NAME.jar classes.dex
diff --git a/test/089-many-methods/build b/test/089-many-methods/build
index 0bd90c2..7ede759 100644
--- a/test/089-many-methods/build
+++ b/test/089-many-methods/build
@@ -45,5 +45,5 @@
mkdir classes
${JAVAC} -d classes `find src -name '*.java'`
-dx -JXmx1024m --dex --no-optimize classes
+${DX} -JXmx1024m --dex --no-optimize classes
diff --git a/test/Android.mk b/test/Android.mk
index 83d4399..591c44b 100644
--- a/test/Android.mk
+++ b/test/Android.mk
@@ -22,9 +22,9 @@
# $(1): the test number
define declare-make-art-run-test
dmart_target := $(TARGET_OUT_DATA)/art-run-tests/$(1)/touch
-$$(dmart_target):
+$$(dmart_target): $(DX)
$(hide) rm -rf $$(dir $$@) && mkdir -p $$(dir $$@)
- $(hide) $(LOCAL_PATH)/run-test --build-only --output-path $$(abspath $$(dir $$@)) $(1)
+ $(hide) DX=$(DX) $(LOCAL_PATH)/run-test --build-only --output-path $$(abspath $$(dir $$@)) $(1)
$(hide) touch $$@
TEST_ART_RUN_TEST_MAKE_TARGETS += $$(dmart_target)
diff --git a/test/etc/default-build b/test/etc/default-build
index 57a2a04..faafc1f 100755
--- a/test/etc/default-build
+++ b/test/etc/default-build
@@ -25,7 +25,7 @@
fi
if [ ${NEED_DEX} = "true" ]; then
- dx -JXmx256m --debug --dex --dump-to=classes.lst --output=classes.dex --dump-width=1000 classes
+ ${DX} -JXmx256m --debug --dex --dump-to=classes.lst --output=classes.dex --dump-width=1000 classes
zip $TEST_NAME.jar classes.dex
fi
@@ -33,7 +33,7 @@
mkdir classes-ex
${JAVAC} -d classes-ex -cp classes `find src-ex -name '*.java'`
if [ ${NEED_DEX} = "true" ]; then
- dx -JXmx256m --debug --dex --dump-to=classes-ex.lst --output=classes-ex.dex --dump-width=1000 classes-ex
+ ${DX} -JXmx256m --debug --dex --dump-to=classes-ex.lst --output=classes-ex.dex --dump-width=1000 classes-ex
# quick shuffle so that the stored name is "classes.dex"
mv classes.dex classes-1.dex
diff --git a/test/run-test b/test/run-test
index f7a5827..25771ec 100755
--- a/test/run-test
+++ b/test/run-test
@@ -38,10 +38,14 @@
export JAVA="java"
export JAVAC="javac -g -target 1.5"
export RUN="${progdir}/etc/push-and-run-test-jar"
-export IMAGE=${ANDROID_PRODUCT_OUT}/data/art-test/core.art
export DEX_LOCATION=/data/run-test/${test_dir}
export NEED_DEX="true"
+# If dx was not set by the environment variable, assume it is in the path.
+if [ -z "$DX" ]; then
+ export DX="dx"
+fi
+
info="info.txt"
build="build"
run="run"
@@ -61,7 +65,6 @@
if [ "x$1" = "x--host" ]; then
target_mode="no"
RUN="${progdir}/etc/host-run-test-jar"
- IMAGE=${ANDROID_HOST_OUT}/framework/core.art
DEX_LOCATION=$tmp_dir
shift
elif [ "x$1" = "x--jvm" ]; then