fix missing dx in build server.

Change-Id: I18c49c5cc1efc97199cb076dc258c4b9b7a46e8a
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