ART-tests: remove DX-dependency from 166-bad-interface-super

This tests is creating an illegal class file which compiles with DX
but D8 rejects it.

This CL, in addition to enabling D8, adds the precompiled, smali
versions of the jasmin sources. The build script will use either the
smali or the jasmin sources depending on the --host/--target/--jvm
flag.

Bug: 65168732
Test: art/test.py --host --gcstress -r -t 166-bad-interface-super
      art/test.py --target --gcstress -r -t 166-bad-interface-super
Change-Id: I58e69fa9a4aa08946b7e57001f5e2a2a2bc07b0f
diff --git a/test/166-bad-interface-super/build b/test/166-bad-interface-super/build
index d85147f..bba6184 100644
--- a/test/166-bad-interface-super/build
+++ b/test/166-bad-interface-super/build
@@ -14,7 +14,14 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-# See b/65168732
-export USE_D8=false
+# Use the jasmin sources for JVM, otherwise the smali sources.
+extra_arg="--no-jasmin"
 
-./default-build "$@"
+for arg in "$@"; do
+  if [[ "$arg" == "--jvm" ]]; then
+    extra_arg="--no-smali"
+    break
+  fi
+done
+
+./default-build "$@" "$extra_arg"
diff --git a/test/166-bad-interface-super/smali/BadSuper1.smali b/test/166-bad-interface-super/smali/BadSuper1.smali
new file mode 100644
index 0000000..6233403
--- /dev/null
+++ b/test/166-bad-interface-super/smali/BadSuper1.smali
@@ -0,0 +1,17 @@
+# Copyright (C) 2018 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.
+
+.class public interface LBadSuper1;
+.super LBaseInterface;
+.source "BadSuper1.j"
diff --git a/test/166-bad-interface-super/smali/BadSuper2.smali b/test/166-bad-interface-super/smali/BadSuper2.smali
new file mode 100644
index 0000000..8e410cf
--- /dev/null
+++ b/test/166-bad-interface-super/smali/BadSuper2.smali
@@ -0,0 +1,17 @@
+# Copyright (C) 2018 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.
+
+.class public interface LBadSuper2;
+.super LBaseClass;
+.source "BadSuper2.j"
diff --git a/test/etc/default-build b/test/etc/default-build
index d0ebe80..9dbc73c 100755
--- a/test/etc/default-build
+++ b/test/etc/default-build
@@ -169,6 +169,9 @@
   elif [ "x$1" = "x--no-smali" ]; then
     HAS_SMALI=false
     shift
+  elif [ "x$1" = "x--no-jasmin" ]; then
+    HAS_JASMIN=false
+    shift
   elif [ "x$1" = "x--experimental" ]; then
     shift
     # We have a specific experimental configuration so don't use the default.