test: Modify 586-checker-null-array-get for javac/dx
Previously 1 of the methods were failing checker with javac/dx.
Move their old bytecode to a smali file to retain testing of those
optimizations.
Rewrite the checker tests in Main.java to use the javac/dx-generated
bytecode.
Test: art/test/run-test --64 --host --optimizing --build-with-javac-dx 586-checker-null-array-get
Bug: 62950048
Bug: 36902714
Change-Id: Ib320509422a358e116c24bb1b33442c0cf09ba25
diff --git a/test/586-checker-null-array-get/build b/test/586-checker-null-array-get/build
new file mode 100755
index 0000000..49292c9
--- /dev/null
+++ b/test/586-checker-null-array-get/build
@@ -0,0 +1,23 @@
+#!/bin/bash
+#
+# Copyright 2017 The Android Open Source Project
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# This checker test is incompatible with jack bytecode output,
+# so force it to use javac/dx.
+export USE_JACK=false
+# Also disable desugar because it is missing in jack platform builds.
+export DESUGAR=false
+
+./default-build "$@"