Add run-parameter test metadata to ART run-tests.

For now, use these run parameters to determine whether to safely
ignore a test's `run.py` Python script while regenerating ART test
files.

Test: art/test/utils/regen-test-files
Bug: 147812905
Change-Id: I76c1460b6df3adea60167a21b653436ecaf34389
diff --git a/test/099-vmdebug/test-metadata.json b/test/099-vmdebug/test-metadata.json
new file mode 100644
index 0000000..2d1dd45
--- /dev/null
+++ b/test/099-vmdebug/test-metadata.json
@@ -0,0 +1,5 @@
+{
+  "run-param": {
+    "default-run": true
+  }
+}
diff --git a/test/143-string-value/test-metadata.json b/test/143-string-value/test-metadata.json
new file mode 100644
index 0000000..2d1dd45
--- /dev/null
+++ b/test/143-string-value/test-metadata.json
@@ -0,0 +1,5 @@
+{
+  "run-param": {
+    "default-run": true
+  }
+}
diff --git a/test/utils/regen-test-files b/test/utils/regen-test-files
index ab8ba67..db6ba3d 100755
--- a/test/utils/regen-test-files
+++ b/test/utils/regen-test-files
@@ -396,19 +396,33 @@
     # All other tests are considered buildable.
     return True
 
-  # Is (successfully) running `run_test` supported?
-  # TODO(b/147812905): Add run-time support for more tests.
-  def is_runnable(self, run_test):
-    run_test_path = os.path.join(self.art_test_dir, run_test)
+  # Can the run script of `run_test` be safely ignored?
+  def can_ignore_run_script(self, run_test):
     # Unconditionally consider some identified tests that have a
     # (not-yet-handled) custom `run` script as runnable.
+    #
     # TODO(rpl): Get rid of this exception mechanism by supporting
     # these tests' `run` scripts properly.
     if run_test in runnable_test_exceptions:
       return True
-    # Skip tests with a custom `run` script.
+    # Check whether there are test metadata with run parameters
+    # enabling us to safely ignore the run script.
+    metadata = self.get_test_metadata(run_test)
+    run_param = metadata.get("run-param", {})
+    if run_param.get("default-run", ""):
+      return True
+    return False
+
+  # Is (successfully) running `run_test` supported?
+  # TODO(b/147812905): Add run-time support for more tests.
+  def is_runnable(self, run_test):
+    run_test_path = os.path.join(self.art_test_dir, run_test)
+
+    # Skip tests with non-default run rules, unless these run rules
+    # can be safely ignored.
     if os.path.isfile(os.path.join(run_test_path, "run.py")):
-      return False
+      if not self.can_ignore_run_script(run_test):
+        return False
     # Skip tests known to fail.
     if run_test in known_failing_tests:
       return False