add jasmin dependency so that it can be used when building the tests.

Change-Id: I9c4756341b9f4cbc764ac034f0c9ad4dcd13a40b
diff --git a/test/097-duplicate-method/build b/test/097-duplicate-method/build
index fe5f50d..6576779 100644
--- a/test/097-duplicate-method/build
+++ b/test/097-duplicate-method/build
@@ -19,7 +19,7 @@
 
 mkdir classes
 ${JAVAC} -d classes src/*.java
-jasmin -d classes src/*.j
+${JASMIN} -d classes src/*.j
 
 ${DX} --debug --dex --dump-to=classes.lst --output=classes.dex classes
 zip $TEST_NAME.jar classes.dex
diff --git a/test/Android.mk b/test/Android.mk
index e17f8c0..6c7b26e 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): $(DX)
+$$(dmart_target): $(DX) $(HOST_OUT_EXECUTABLES)/jasmin
 	$(hide) rm -rf $$(dir $$@) && mkdir -p $$(dir $$@)
-	$(hide) DX=$(abspath $(DX)) $(LOCAL_PATH)/run-test --build-only --output-path $$(abspath $$(dir $$@)) $(1)
+	$(hide) DX=$(abspath $(DX)) JASMIN=$(abspath $(HOST_OUT_EXECUTABLES)/jasmin) $(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/run-test b/test/run-test
index 46d966c..21f4617 100755
--- a/test/run-test
+++ b/test/run-test
@@ -46,6 +46,12 @@
   export DX="dx"
 fi
 
+# If jasmin was not set by the environment variable, assume it is in the path.
+if [ -z "$JASMIN" ]; then
+  export JASMIN="jasmin"
+fi
+
+
 info="info.txt"
 build="build"
 run="run"