Migrate ART tests to new testing infrastructure.

Bug: 167145686
Change-Id: I967c0002d39cc44082e1e91c797954232bc7ef9e
diff --git a/tools/create_art_tests.py b/tools/create_art_tests.py
index 248f893..978b086 100755
--- a/tools/create_art_tests.py
+++ b/tools/create_art_tests.py
@@ -24,24 +24,38 @@
 import static com.android.tools.r8.R8RunArtTestsTest.DexTool.$testGeneratingToolchainEnum;
 
 import com.android.tools.r8.R8RunArtTestsTest;
+import com.android.tools.r8.TestBase;
+import com.android.tools.r8.TestParameters;
+import com.android.tools.r8.TestParametersCollection;
+import com.android.tools.r8.ToolHelper.DexVm;
 import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.Parameterized;
+import org.junit.runners.Parameterized.Parameters;
 
 /**
  * Auto-generated test for the art $name test using the $testGeneratingToolchain toolchain.
  *
  * DO NOT EDIT THIS FILE. EDIT THE HERE DOCUMENT TEMPLATE IN tools/create_art_tests.py INSTEAD!
  */
+@RunWith(Parameterized.class)
 public class $testClassName extends R8RunArtTestsTest {
 
-    public $testClassName() {
+    @Parameters(name = "{0}")
+    public static TestParametersCollection data() {
+      return TestBase.getTestParameters().withDexRuntimes().build();
+    }
+
+    private final TestParameters parameters;
+
+    public $testClassName(TestParameters parameters) {
       super("$name", $testGeneratingToolchainEnum);
+      this.parameters = parameters;
     }
 
     @Test
-    public void run$testClassName() throws Throwable {
-      // For testing with other Art VMs than the default pass the VM version as a argument to
-      // runArtTest, e.g. runArtTest(DexVm.ART_4_4_4_HOST, CompilerUnderTest.$compilerUnderTestEnum).
-      runArtTest(CompilerUnderTest.$compilerUnderTestEnum);
+    public void test() throws Throwable {
+      runArtTest(parameters.getRuntime().asDex().getVm(), CompilerUnderTest.$compilerUnderTestEnum);
     }
 }
 """)