ART: Invoke Checker from run-test scripts
This patch moves Checker-based tests of the optimizing compiler into
the art/test directory and modifies the run-test scripts to dump
the CFG during compilation and to verify the graph using Checker as
part of the "running" stage. Outputs generated by running the test
and running Checker are concatenated and compared with expected.txt.
Checker is invoked only if the test's name name matches the format
"<number>-checker-*" and it's currently enabled only for optimizing +
host configs. The tests are still invoked on other configs but
without Checker.
Change-Id: Ib24da808cd4bca66f07e0dbeb913a418065f2859
diff --git a/test/etc/default-build b/test/etc/default-build
index 6731ad3..58c9564 100755
--- a/test/etc/default-build
+++ b/test/etc/default-build
@@ -17,6 +17,22 @@
# Stop if something fails.
set -e
+DX_FLAGS=""
+
+while true; do
+ if [ "x$1" = "x--dx-option" ]; then
+ shift
+ option="$1"
+ DX_FLAGS="${DX_FLAGS} $option"
+ shift
+ elif expr "x$1" : "x--" >/dev/null 2>&1; then
+ echo "unknown $0 option: $1" 1>&2
+ exit 1
+ else
+ break
+ fi
+done
+
if [ -e classes.dex ]; then
zip $TEST_NAME.jar classes.dex
exit 0
@@ -30,7 +46,8 @@
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 ${DX_FLAGS} classes
fi
if [ -d smali ]; then
@@ -43,7 +60,8 @@
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 ${DX_FLAGS} classes-ex
# quick shuffle so that the stored name is "classes.dex"
mv classes.dex classes-1.dex