test: Skip desugar with DESUGAR=false when running tests
Allow one to skip desugar when running the tests, for example:
$> ANDROID_COMPILE_WITH_JACK=false DESUGAR=false DX=<your-dx-tool> art/test.py
Why this might be useful: If building with javac and a dexer tool that
already processes invoke-dynamic lambdas, then desugar is redundant.
Bug: 36902714
Change-Id: I39aadca4985e2aafe4b4b24ff3dc9d7a364bbad7
diff --git a/test/run-test b/test/run-test
index ba1f992..1b6df16 100755
--- a/test/run-test
+++ b/test/run-test
@@ -91,6 +91,11 @@
export JACK="$JACK -g -cp $JACK_CLASSPATH"
+# Allow changing DESUGAR script to something else, or to disable it with DESUGAR=false.
+if [ -z "$DESUGAR"]; then
+ export DESUGAR="$ANDROID_BUILD_TOP/art/tools/desugar.sh"
+fi
+
# Zipalign is not on the PATH in some configs, auto-detect it.
if [ -z "$ZIPALIGN" ]; then
if which zipalign >/dev/null; then