Bläddra i källkod

Automate the addition of RUN and simplify RUN lines (#2292)

This was an offshoot of the discussion about how much boilerplate we could remove. lit requires RUN lines be there, everything else is optional.
Jon Ross-Perkins 3 år sedan
förälder
incheckning
eac7c2bda4
100 ändrade filer med 446 tillägg och 395 borttagningar
  1. 56 39
      bazel/testing/lit.cfg.py
  2. 87 45
      bazel/testing/lit_autoupdate_base.py
  3. 9 16
      explorer/README.md
  4. 7 8
      explorer/lit_autoupdate.py
  5. 3 3
      explorer/testdata/addr/fail_method_let.carbon
  6. 3 3
      explorer/testdata/addr/fail_method_me_misspelled.carbon
  7. 3 3
      explorer/testdata/addr/fail_method_me_type.carbon
  8. 3 3
      explorer/testdata/addr/method.carbon
  9. 3 3
      explorer/testdata/addr/nested_method.carbon
  10. 3 3
      explorer/testdata/alias/class_alias.carbon
  11. 3 3
      explorer/testdata/alias/fail_alias_expression.carbon
  12. 3 3
      explorer/testdata/alias/fail_alias_var.carbon
  13. 3 3
      explorer/testdata/alias/fail_self_alias.carbon
  14. 3 3
      explorer/testdata/alias/function_alias.carbon
  15. 3 3
      explorer/testdata/alias/interface_alias.carbon
  16. 3 3
      explorer/testdata/alias/member_name_alias.carbon
  17. 3 3
      explorer/testdata/alias/struct_alias.carbon
  18. 3 3
      explorer/testdata/alias/type_alias.carbon
  19. 3 3
      explorer/testdata/array/fail_index.carbon
  20. 3 3
      explorer/testdata/array/fail_negative_size.carbon
  21. 3 3
      explorer/testdata/array/fail_size_mismatch.carbon
  22. 3 3
      explorer/testdata/array/index.carbon
  23. 3 3
      explorer/testdata/array/nested.carbon
  24. 3 3
      explorer/testdata/as/as_same_type.carbon
  25. 3 3
      explorer/testdata/as/convert.carbon
  26. 3 3
      explorer/testdata/as/fail_destination_not_type.carbon
  27. 3 3
      explorer/testdata/as/fail_no_conversion.carbon
  28. 3 3
      explorer/testdata/as/implicit_as.carbon
  29. 3 2
      explorer/testdata/assert/fail_assert.carbon
  30. 3 3
      explorer/testdata/assign/convert_rhs.carbon
  31. 3 3
      explorer/testdata/assign/destruct_original.carbon
  32. 3 3
      explorer/testdata/assign/reassign_original.carbon
  33. 3 3
      explorer/testdata/assoc_const/fail_anonymous.carbon
  34. 3 3
      explorer/testdata/assoc_const/fail_incomplete_impl_1.carbon
  35. 3 3
      explorer/testdata/assoc_const/fail_incomplete_impl_2.carbon
  36. 3 3
      explorer/testdata/assoc_const/fail_indirectly_equal.carbon
  37. 3 3
      explorer/testdata/assoc_const/fail_match_in_deduction.carbon
  38. 3 3
      explorer/testdata/assoc_const/fail_multi_impl_scoping.carbon
  39. 3 3
      explorer/testdata/assoc_const/fail_multiple_deduction.carbon
  40. 3 3
      explorer/testdata/assoc_const/fail_overspecified_impl.carbon
  41. 3 3
      explorer/testdata/assoc_const/fail_redefined.carbon
  42. 3 3
      explorer/testdata/assoc_const/fail_unknown_value.carbon
  43. 3 3
      explorer/testdata/assoc_const/fail_unknown_value_specified_in_constraint.carbon
  44. 3 3
      explorer/testdata/assoc_const/impl_lookup.carbon
  45. 3 3
      explorer/testdata/assoc_const/implement.carbon
  46. 3 3
      explorer/testdata/assoc_const/lookup_in_rewrite.carbon
  47. 3 3
      explorer/testdata/assoc_const/member_of_value.carbon
  48. 3 3
      explorer/testdata/assoc_const/simple_constraint.carbon
  49. 3 3
      explorer/testdata/assoc_const/simple_equality.carbon
  50. 3 3
      explorer/testdata/auto/fail_use_in_init.carbon
  51. 3 3
      explorer/testdata/basic_syntax/addition.carbon
  52. 3 3
      explorer/testdata/basic_syntax/choice.carbon
  53. 3 3
      explorer/testdata/basic_syntax/fail_alternative_not_type.carbon
  54. 3 3
      explorer/testdata/basic_syntax/fail_alternative_uses_choice.carbon
  55. 3 3
      explorer/testdata/basic_syntax/fail_assign_to_function.carbon
  56. 3 3
      explorer/testdata/basic_syntax/fail_assign_to_rval.carbon
  57. 3 3
      explorer/testdata/basic_syntax/fail_block.carbon
  58. 3 3
      explorer/testdata/basic_syntax/fail_choice_no_parens.carbon
  59. 4 4
      explorer/testdata/basic_syntax/fail_compare_precedence.carbon
  60. 3 3
      explorer/testdata/basic_syntax/fail_invalid_char.carbon
  61. 3 3
      explorer/testdata/basic_syntax/fail_invalid_integer.carbon
  62. 3 3
      explorer/testdata/basic_syntax/fail_invalid_integer_type.carbon
  63. 3 3
      explorer/testdata/basic_syntax/fail_invalid_var_expression.carbon
  64. 3 3
      explorer/testdata/basic_syntax/fail_missing_var.carbon
  65. 3 3
      explorer/testdata/basic_syntax/fail_nested_binding.carbon
  66. 3 3
      explorer/testdata/basic_syntax/fail_unimplemented_example.carbon
  67. 3 3
      explorer/testdata/basic_syntax/fail_unknown_intrinsic.carbon
  68. 3 3
      explorer/testdata/basic_syntax/fail_unsupported_integer_type.carbon
  69. 3 3
      explorer/testdata/basic_syntax/fail_var_named_self.carbon
  70. 3 3
      explorer/testdata/basic_syntax/fail_var_type.carbon
  71. 3 3
      explorer/testdata/basic_syntax/next.carbon
  72. 3 3
      explorer/testdata/basic_syntax/placeholder_variable.carbon
  73. 3 3
      explorer/testdata/basic_syntax/record.carbon
  74. 3 3
      explorer/testdata/basic_syntax/star.carbon
  75. 1 2
      explorer/testdata/basic_syntax/trace.carbon
  76. 3 3
      explorer/testdata/basic_syntax/var_tuple.carbon
  77. 3 3
      explorer/testdata/basic_syntax/zero.carbon
  78. 3 3
      explorer/testdata/block/empty.carbon
  79. 3 3
      explorer/testdata/block/shadowing.carbon
  80. 3 3
      explorer/testdata/choice/fail_recursive_use.carbon
  81. 3 3
      explorer/testdata/choice/generic_choice_multiple_template_arguments.carbon
  82. 3 3
      explorer/testdata/choice/generic_choice_nested_in_template_class.carbon
  83. 3 3
      explorer/testdata/choice/generic_choice_simple_assignment.carbon
  84. 3 3
      explorer/testdata/class/assign.carbon
  85. 3 3
      explorer/testdata/class/assign_member.carbon
  86. 3 3
      explorer/testdata/class/bound_method.carbon
  87. 3 3
      explorer/testdata/class/class_function.carbon
  88. 3 3
      explorer/testdata/class/class_function_from_instance.carbon
  89. 3 3
      explorer/testdata/class/class_function_self.carbon
  90. 3 3
      explorer/testdata/class/class_function_value.carbon
  91. 3 3
      explorer/testdata/class/empty_class.carbon
  92. 3 3
      explorer/testdata/class/fail_abstract_class.carbon
  93. 3 3
      explorer/testdata/class/fail_base_class.carbon
  94. 3 3
      explorer/testdata/class/fail_class_extends.carbon
  95. 3 3
      explorer/testdata/class/fail_class_named_self.carbon
  96. 3 3
      explorer/testdata/class/fail_field_access_mismatch.carbon
  97. 3 3
      explorer/testdata/class/fail_field_mismatch.carbon
  98. 3 3
      explorer/testdata/class/fail_field_missing.carbon
  99. 3 3
      explorer/testdata/class/fail_member_call_before_typecheck.carbon
  100. 3 3
      explorer/testdata/class/fail_member_of_self.carbon

+ 56 - 39
bazel/testing/lit.cfg.py

@@ -6,6 +6,7 @@ SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 
 import lit.formats
 import os
+from pathlib import Path
 
 
 # This is a provided variable, ignore the undefined name warning.
@@ -13,47 +14,63 @@ config = config  # noqa: F821
 
 
 def fullpath(relative_path):
-    return os.path.join(os.environ["TEST_SRCDIR"], relative_path)
+    return Path(os.environ["TEST_SRCDIR"]).joinpath(relative_path)
+
+
+def add_substitution(before, after):
+    """Adds a substitution to the config. Wraps before as `%{before}`."""
+    config.substitutions.append((f"%{{{before}}}", after))
+
+
+def add_substitutions():
+    """Adds required substitutions to the config."""
+    tools = {
+        "carbon": fullpath("carbon/toolchain/driver/carbon"),
+        "explorer": fullpath("carbon/explorer/explorer"),
+        "explorer_prelude": fullpath("carbon/explorer/data/prelude.carbon"),
+        "filecheck": fullpath("llvm-project/llvm/FileCheck"),
+        "not": fullpath("llvm-project/llvm/not"),
+        "merge_output": fullpath("carbon/bazel/testing/merge_output"),
+    }
+
+    run_carbon = f"{tools['merge_output']} {tools['carbon']}"
+    run_explorer = (
+        f"{tools['merge_output']} {tools['explorer']} %s "
+        f"--prelude={tools['explorer_prelude']}"
+    )
+    filecheck_allow_unmatched = (
+        f"{tools['filecheck']} %s --match-full-lines --strict-whitespace"
+    )
+    filecheck_strict = (
+        f"{filecheck_allow_unmatched} --implicit-check-not={{{{.}}}}"
+    )
+
+    add_substitution("carbon", f"{tools['merge_output']} {tools['carbon']}")
+    add_substitution(
+        "carbon-run-parser",
+        f"{run_carbon} dump parse-tree %s | {filecheck_strict}",
+    )
+    add_substitution(
+        "carbon-run-semantics",
+        f"{run_carbon} dump semantics-ir %s | {filecheck_strict}",
+    )
+    add_substitution(
+        "carbon-run-tokens", f"{run_carbon} dump tokens %s | {filecheck_strict}"
+    )
+    add_substitution(
+        "explorer-run",
+        f"{run_explorer} | {filecheck_strict}",
+    )
+    add_substitution(
+        "explorer-run-trace",
+        f"{run_explorer} --parser_debug --trace_file=- | "
+        f"{filecheck_allow_unmatched}",
+    )
+    add_substitution("FileCheck-strict", filecheck_strict)
+    add_substitution("not", tools["not"])
 
 
 config.name = "lit"
 config.suffixes = [".carbon"]
 config.test_format = lit.formats.ShTest()
-
-_MERGE_OUTPUT = fullpath("carbon/bazel/testing/merge_output")
-
-config.substitutions.append(
-    (
-        "%{carbon}",
-        "%s %s" % (_MERGE_OUTPUT, fullpath("carbon/toolchain/driver/carbon")),
-    )
-)
-_EXPLORER = "%s %s --prelude=%s" % (
-    _MERGE_OUTPUT,
-    fullpath("carbon/explorer/explorer"),
-    fullpath("carbon/explorer/data/prelude.carbon"),
-)
-config.substitutions.append(("%{explorer}", _EXPLORER))
-config.substitutions.append(
-    ("%{explorer-trace}", _EXPLORER + " --parser_debug --trace_file=-")
-)
-
-config.substitutions.append(("%{not}", fullpath("llvm-project/llvm/not")))
-
-_FILE_CHECK = "%s --dump-input-filter=all" % fullpath(
-    "llvm-project/llvm/FileCheck"
-)
-config.substitutions.append(("%{FileCheck}", _FILE_CHECK))
-config.substitutions.append(
-    (
-        "%{FileCheck-allow-unmatched}",
-        _FILE_CHECK + " --match-full-lines --strict-whitespace",
-    )
-)
-config.substitutions.append(
-    (
-        "%{FileCheck-strict}",
-        _FILE_CHECK
-        + " --implicit-check-not={{.}} --match-full-lines --strict-whitespace",
-    )
-)
+add_substitutions()

+ 87 - 45
bazel/testing/lit_autoupdate_base.py

@@ -11,7 +11,6 @@ SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 from abc import ABC, abstractmethod
 import argparse
 from concurrent import futures
-import logging
 import os
 from pathlib import Path
 import re
@@ -19,45 +18,61 @@ import subprocess
 from typing import Any, Dict, List, NamedTuple, Optional, Pattern, Set, Tuple
 
 # A prefix followed by a command to run for autoupdating checked output.
-AUTOUPDATE_MARKER = "// AUTOUPDATE: "
+AUTOUPDATE_MARKER = "// AUTOUPDATE"
 
 # Indicates no autoupdate is requested.
 NOAUTOUPDATE_MARKER = "// NOAUTOUPDATE"
 
 # Standard replacements normally done in lit.cfg.py.
 MERGE_OUTPUT = "./bazel-bin/bazel/testing/merge_output"
-LIT_REPLACEMENTS = [
-    ("%{carbon}", f"{MERGE_OUTPUT} ./bazel-bin/toolchain/driver/carbon"),
-    ("%{explorer}", f"{MERGE_OUTPUT} ./bazel-bin/explorer/explorer"),
-]
+
+
+class Tool(NamedTuple):
+    build_target: str
+    autoupdate_cmd: List[str]
+
+
+tools = {
+    "carbon": Tool(
+        "//toolchain/driver:carbon",
+        [MERGE_OUTPUT, "./bazel-bin/toolchain/driver/carbon"],
+    ),
+    "explorer": Tool(
+        "//explorer",
+        [MERGE_OUTPUT, "./bazel-bin/explorer/explorer"],
+    ),
+}
 
 
 class ParsedArgs(NamedTuple):
+    autoupdate_args: List[str]
     build_mode: str
-    build_target: str
     extra_check_replacements: List[Tuple[Pattern, Pattern, str]]
     line_number_format: str
     line_number_pattern: Pattern
+    lit_run: List[str]
     testdata: str
     tests: List[Path]
+    tool: str
 
 
 def parse_args() -> ParsedArgs:
     """Parses command-line arguments and flags."""
     parser = argparse.ArgumentParser(description=__doc__)
     parser.add_argument("tests", nargs="*")
+    parser.add_argument(
+        "--autoupdate_arg",
+        metavar="COMMAND",
+        default=[],
+        action="append",
+        help="Optional arguments to pass to the autoupdate command.",
+    )
     parser.add_argument(
         "--build_mode",
         metavar="MODE",
         default="opt",
         help="The build mode to use. Defaults to opt for faster execution.",
     )
-    parser.add_argument(
-        "--build_target",
-        metavar="TARGET",
-        required=True,
-        help="The target to build.",
-    )
     parser.add_argument(
         "--extra_check_replacement",
         nargs=3,
@@ -80,6 +95,13 @@ def parse_args() -> ParsedArgs:
         help="A regular expression which matches line numbers to update as its "
         "only group.",
     )
+    parser.add_argument(
+        "--lit_run",
+        metavar="COMMAND",
+        required=True,
+        action="append",
+        help="RUN lines to set.",
+    )
     parser.add_argument(
         "--testdata",
         metavar="PATH",
@@ -87,19 +109,28 @@ def parse_args() -> ParsedArgs:
         help="The path to the testdata to update, relative to the workspace "
         "root.",
     )
+    parser.add_argument(
+        "--tool",
+        metavar="TOOL",
+        required=True,
+        choices=tools.keys(),
+        help="The tool being tested.",
+    )
     parsed_args = parser.parse_args()
     extra_check_replacements = [
         (re.compile(line_matcher), re.compile(before), after)
         for line_matcher, before, after in parsed_args.extra_check_replacement
     ]
     return ParsedArgs(
+        autoupdate_args=parsed_args.autoupdate_arg,
         build_mode=parsed_args.build_mode,
-        build_target=parsed_args.build_target,
         extra_check_replacements=extra_check_replacements,
         line_number_format=parsed_args.line_number_format,
         line_number_pattern=re.compile(parsed_args.line_number_pattern),
+        lit_run=parsed_args.lit_run,
         testdata=parsed_args.testdata,
         tests=[Path(test).resolve() for test in parsed_args.tests],
+        tool=parsed_args.tool,
     )
 
 
@@ -139,6 +170,16 @@ class OriginalLine(Line):
         return self.text
 
 
+class RunLine(Line):
+    """A RUN line."""
+
+    def __init__(self, text: str) -> None:
+        self.text = text
+
+    def format(self, **kwargs: Any) -> str:
+        return self.text
+
+
 class CheckLine(Line):
     """A `// CHECK:` line generated from the test output.
 
@@ -179,23 +220,17 @@ class CheckLine(Line):
         return f"{self.indent}// CHECK:{result}\n"
 
 
-class Autoupdate(NamedTuple):
-    line_number: int
-    cmd: str
-
-
-def find_autoupdate(test: str, orig_lines: List[str]) -> Optional[Autoupdate]:
+def find_autoupdate(test: str, orig_lines: List[str]) -> Optional[int]:
     """Figures out whether autoupdate should occur.
 
-    For AUTOUPDATE, returns the line and command. For NOAUTOUPDATE, returns
-    None.
+    For AUTOUPDATE, returns the line. For NOAUTOUPDATE, returns None.
     """
     found = 0
     result = None
     for line_number, line in enumerate(orig_lines):
         if line.startswith(AUTOUPDATE_MARKER):
             found += 1
-            result = Autoupdate(line_number, line[len(AUTOUPDATE_MARKER) :])
+            result = line_number
         elif line.startswith(NOAUTOUPDATE_MARKER):
             found += 1
     if found == 0:
@@ -219,23 +254,16 @@ def replace_all(s: str, replacements: List[Tuple[str, str]]) -> str:
 
 
 def get_matchable_test_output(
-    parsed_args: ParsedArgs,
-    test: str,
-    autoupdate_cmd: str,
+    autoupdate_args: List[str],
     extra_check_replacements: List[Tuple[Pattern, Pattern, str]],
+    tool: str,
+    test: str,
 ) -> List[str]:
     """Runs the autoupdate command and returns the output lines."""
-    # Mirror lit.cfg.py substitutions; bazel runs don't need --prelude.
-    # Also replaces `%s` with the test file.
-    autoupdate_cmd = replace_all(
-        autoupdate_cmd, [("%s", test)] + LIT_REPLACEMENTS
-    )
-
     # Run the autoupdate command to generate output.
     # (`bazel run` would serialize)
     p = subprocess.run(
-        autoupdate_cmd,
-        shell=True,
+        tools[tool].autoupdate_cmd + autoupdate_args + [test],
         stdout=subprocess.PIPE,
         stderr=subprocess.STDOUT,
     )
@@ -263,9 +291,17 @@ def get_matchable_test_output(
     return out_lines
 
 
+def is_replaced(line: str) -> bool:
+    """Returns true if autoupdate should replace the line."""
+    line = line.lstrip()
+    return line.startswith("// CHECK") or line.startswith("// RUN:")
+
+
 def merge_lines(
     line_number_format: str,
     line_number_pattern: Pattern,
+    lit_run: List[str],
+    test: str,
     autoupdate_line_number: int,
     raw_orig_lines: List[str],
     out_lines: List[str],
@@ -274,8 +310,7 @@ def merge_lines(
     orig_lines = [
         OriginalLine(i, line)
         for i, line in enumerate(raw_orig_lines)
-        # Remove CHECK lines in the original output.
-        if not line.lstrip().startswith("// CHECK")
+        if not is_replaced(line)
     ]
     check_lines = [
         CheckLine(out_line, line_number_format, line_number_pattern)
@@ -286,6 +321,11 @@ def merge_lines(
     # CHECK lines must go after AUTOUPDATE.
     while orig_lines and orig_lines[0].line_number <= autoupdate_line_number:
         result_lines.append(orig_lines.pop(0))
+    for line in lit_run:
+        run_not = ""
+        if Path(test).name.startswith("fail_"):
+            run_not = "%{not} "
+        result_lines.append(RunLine(f"// RUN: {run_not}{line}\n"))
     # Interleave the original lines and the CHECK: lines.
     while orig_lines and check_lines:
         # Original lines go first when the CHECK line is known and later.
@@ -315,21 +355,23 @@ def update_check(parsed_args: ParsedArgs, test: Path) -> bool:
         orig_lines = f.readlines()
 
     # Make sure we're supposed to autoupdate.
-    autoupdate = find_autoupdate(str(test), orig_lines)
-    if autoupdate is None:
+    autoupdate_line = find_autoupdate(str(test), orig_lines)
+    if autoupdate_line is None:
         return False
 
     # Determine the merged output lines.
     out_lines = get_matchable_test_output(
-        parsed_args,
-        str(test),
-        autoupdate.cmd,
+        parsed_args.autoupdate_args,
         parsed_args.extra_check_replacements,
+        parsed_args.tool,
+        str(test),
     )
     result_lines = merge_lines(
         parsed_args.line_number_format,
         parsed_args.line_number_pattern,
-        autoupdate.line_number,
+        parsed_args.lit_run,
+        str(test),
+        autoupdate_line,
         orig_lines,
         out_lines,
     )
@@ -369,8 +411,8 @@ def update_checks(parsed_args: ParsedArgs, tests: Set[Path]) -> None:
     def map_helper(test: Path) -> bool:
         try:
             updated = update_check(parsed_args, test)
-        except Exception:
-            logging.exception(f"Failed to update {test}")
+        except Exception as e:
+            raise ValueError(f"Failed to update {test}") from e
         print(".", end="", flush=True)
         return updated
 
@@ -406,7 +448,7 @@ def main() -> None:
             "-c",
             parsed_args.build_mode,
             "//bazel/testing:merge_output",
-            parsed_args.build_target,
+            tools[parsed_args.tool].build_target,
         ]
     )
 

+ 9 - 16
explorer/README.md

@@ -72,9 +72,9 @@ boilerplate at the top:
 // Exceptions. See /LICENSE for license information.
 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 //
-// RUN: %{explorer} %s | %{FileCheck-strict} %s
-// RUN: %{explorer-trace} %s | %{FileCheck-allow-unmatched} %s
-// AUTOUPDATE: %{explorer} %s
+// AUTOUPDATE
+// RUN: %{explorer-run}
+// RUN: %{explorer-run-trace}
 // CHECK:result: 0
 
 package ExplorerTest api;
@@ -83,23 +83,16 @@ package ExplorerTest api;
 To explain this boilerplate:
 
 -   The standard copyright is expected.
+-   The `AUTOUPDATE` line indicates that `RUN` and `CHECK` lines will be
+    automatically inserted immediately below by the `./lit_autoupdate.py`
+    script.
 -   The `RUN` lines indicate two commands for `lit` to execute using the file:
     one without trace and debug output, one with.
-    -   Output is piped to `FileCheck` for verification.
-    -   Setting `-allow-unused-prefixes` to false when processing the ordinary
-        output, and true when handling the trace output, allows us to omit the
-        tracing output from the `CHECK` lines, while ensuring they cover all
-        non-tracing output.
-    -   Setting `-match-full-lines` in both cases indicates that each `CHECK`
-        line must match a complete output line, with no extra characters before
-        or after the `CHECK` pattern.
     -   `RUN:` will be followed by the `not` command when failure is expected.
         In particular, `RUN: not explorer ...`.
-    -   `%s` is a
-        [`lit` substitution](https://llvm.org/docs/CommandGuide/lit.html#substitutions)
-        for the path to the given test file.
--   The `AUTOUPDATE` line indicates that `CHECK` lines will be automatically
-    inserted immediately below by the `./lit_autoupdate.py` script.
+    -   The full command is in `lit.cfg.py`; it will run explorer and pass
+        results to
+        [`FileCheck`](https://llvm.org/docs/CommandGuide/FileCheck.html).
 -   The `CHECK` lines indicate expected output, verified by `FileCheck`.
     -   Where a `CHECK` line contains text like `{{.*}}`, the double curly
         braces indicate a contained regular expression.

+ 7 - 8
explorer/lit_autoupdate.py

@@ -14,8 +14,8 @@ from pathlib import Path
 
 
 def main() -> None:
-    # Calls the main script with explorer settings. This uses execv in order to
-    # avoid Python import behaviors.
+    # Calls the main script using execv in order to avoid Python import
+    # behaviors.
     this_py = Path(__file__).resolve()
     actual_py = this_py.parent.parent.joinpath(
         "bazel", "testing", "lit_autoupdate_base.py"
@@ -23,12 +23,11 @@ def main() -> None:
     args = [
         sys.argv[0],
         # Flags to configure for explorer testing.
-        "--build_target",
-        "//explorer",
-        "--testdata",
-        "explorer/testdata",
-        "--line_number_pattern",
-        r"(?<=\.carbon:)(\d+)(?=(?:\D|$))",
+        "--tool=explorer",
+        "--testdata=explorer/testdata",
+        r"--line_number_pattern=(?<=\.carbon:)(\d+)(?=(?:\D|$))",
+        "--lit_run=%{explorer-run}",
+        "--lit_run=%{explorer-run-trace}",
     ] + sys.argv[1:]
     os.execv(actual_py, args)
 

+ 3 - 3
explorer/testdata/addr/fail_method_let.carbon

@@ -2,9 +2,9 @@
 // Exceptions. See /LICENSE for license information.
 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 //
-// RUN: %{not} %{explorer} %s | %{FileCheck-strict} %s
-// RUN: %{not} %{explorer-trace} %s | %{FileCheck-allow-unmatched} %s
-// AUTOUPDATE: %{explorer} %s
+// AUTOUPDATE
+// RUN: %{not} %{explorer-run}
+// RUN: %{not} %{explorer-run-trace}
 
 package ExplorerTest api;
 

+ 3 - 3
explorer/testdata/addr/fail_method_me_misspelled.carbon

@@ -2,9 +2,9 @@
 // Exceptions. See /LICENSE for license information.
 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 //
-// RUN: %{not} %{explorer} %s | %{FileCheck-strict} %s
-// RUN: %{not} %{explorer-trace} %s | %{FileCheck-allow-unmatched} %s
-// AUTOUPDATE: %{explorer} %s
+// AUTOUPDATE
+// RUN: %{not} %{explorer-run}
+// RUN: %{not} %{explorer-run-trace}
 
 package ExplorerTest api;
 

+ 3 - 3
explorer/testdata/addr/fail_method_me_type.carbon

@@ -2,9 +2,9 @@
 // Exceptions. See /LICENSE for license information.
 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 //
-// RUN: %{not} %{explorer} %s | %{FileCheck-strict} %s
-// RUN: %{not} %{explorer-trace} %s | %{FileCheck-allow-unmatched} %s
-// AUTOUPDATE: %{explorer} %s
+// AUTOUPDATE
+// RUN: %{not} %{explorer-run}
+// RUN: %{not} %{explorer-run-trace}
 
 package ExplorerTest api;
 

+ 3 - 3
explorer/testdata/addr/method.carbon

@@ -2,9 +2,9 @@
 // Exceptions. See /LICENSE for license information.
 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 //
-// RUN: %{explorer} %s | %{FileCheck-strict} %s
-// RUN: %{explorer-trace} %s | %{FileCheck-allow-unmatched} %s
-// AUTOUPDATE: %{explorer} %s
+// AUTOUPDATE
+// RUN: %{explorer-run}
+// RUN: %{explorer-run-trace}
 // CHECK:STDOUT: result: 0
 
 package ExplorerTest api;

+ 3 - 3
explorer/testdata/addr/nested_method.carbon

@@ -3,9 +3,9 @@
 // Exceptions. See /LICENSE for license information.
 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 //
-// RUN: %{explorer} %s | %{FileCheck-strict} %s
-// RUN: %{explorer-trace} %s | %{FileCheck-allow-unmatched} %s
-// AUTOUPDATE: %{explorer} %s
+// AUTOUPDATE
+// RUN: %{explorer-run}
+// RUN: %{explorer-run-trace}
 // CHECK:STDOUT: result: 0
 
 package ExplorerTest api;

+ 3 - 3
explorer/testdata/alias/class_alias.carbon

@@ -2,9 +2,9 @@
 // Exceptions. See /LICENSE for license information.
 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 //
-// RUN: %{explorer} %s | %{FileCheck-strict} %s
-// RUN: %{explorer-trace} %s | %{FileCheck-allow-unmatched} %s
-// AUTOUPDATE: %{explorer} %s
+// AUTOUPDATE
+// RUN: %{explorer-run}
+// RUN: %{explorer-run-trace}
 // CHECK:STDOUT: b.n: 1
 // CHECK:STDOUT: d.Get(0): 2
 // CHECK:STDOUT: e.Get(1): 3

+ 3 - 3
explorer/testdata/alias/fail_alias_expression.carbon

@@ -2,9 +2,9 @@
 // Exceptions. See /LICENSE for license information.
 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 //
-// RUN: %{not} %{explorer} %s | %{FileCheck-strict} %s
-// RUN: %{not} %{explorer-trace} %s | %{FileCheck-allow-unmatched} %s
-// AUTOUPDATE: %{explorer} %s
+// AUTOUPDATE
+// RUN: %{not} %{explorer-run}
+// RUN: %{not} %{explorer-run-trace}
 
 package ExplorerTest api;
 

+ 3 - 3
explorer/testdata/alias/fail_alias_var.carbon

@@ -2,9 +2,9 @@
 // Exceptions. See /LICENSE for license information.
 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 //
-// RUN: %{not} %{explorer} %s | %{FileCheck-strict} %s
-// RUN: %{not} %{explorer-trace} %s | %{FileCheck-allow-unmatched} %s
-// AUTOUPDATE: %{explorer} %s
+// AUTOUPDATE
+// RUN: %{not} %{explorer-run}
+// RUN: %{not} %{explorer-run-trace}
 
 package ExplorerTest api;
 

+ 3 - 3
explorer/testdata/alias/fail_self_alias.carbon

@@ -2,9 +2,9 @@
 // Exceptions. See /LICENSE for license information.
 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 //
-// RUN: %{not} %{explorer} %s | %{FileCheck-strict} %s
-// RUN: %{not} %{explorer-trace} %s | %{FileCheck-allow-unmatched} %s
-// AUTOUPDATE: %{explorer} %s
+// AUTOUPDATE
+// RUN: %{not} %{explorer-run}
+// RUN: %{not} %{explorer-run-trace}
 
 package ExplorerTest api;
 

+ 3 - 3
explorer/testdata/alias/function_alias.carbon

@@ -2,9 +2,9 @@
 // Exceptions. See /LICENSE for license information.
 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 //
-// RUN: %{explorer} %s | %{FileCheck-strict} %s
-// RUN: %{explorer-trace} %s | %{FileCheck-allow-unmatched} %s
-// AUTOUPDATE: %{explorer} %s
+// AUTOUPDATE
+// RUN: %{explorer-run}
+// RUN: %{explorer-run-trace}
 // CHECK:STDOUT: result: 7
 
 package ExplorerTest api;

+ 3 - 3
explorer/testdata/alias/interface_alias.carbon

@@ -2,9 +2,9 @@
 // Exceptions. See /LICENSE for license information.
 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 //
-// RUN: %{explorer} %s | %{FileCheck-strict} %s
-// RUN: %{explorer-trace} %s | %{FileCheck-allow-unmatched} %s
-// AUTOUPDATE: %{explorer} %s
+// AUTOUPDATE
+// RUN: %{explorer-run}
+// RUN: %{explorer-run-trace}
 // CHECK:STDOUT: result: 12345
 
 package ExplorerTest api;

+ 3 - 3
explorer/testdata/alias/member_name_alias.carbon

@@ -2,9 +2,9 @@
 // Exceptions. See /LICENSE for license information.
 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 //
-// RUN: %{explorer} %s | %{FileCheck-strict} %s
-// RUN: %{explorer-trace} %s | %{FileCheck-allow-unmatched} %s
-// AUTOUPDATE: %{explorer} %s
+// AUTOUPDATE
+// RUN: %{explorer-run}
+// RUN: %{explorer-run-trace}
 // CHECK:STDOUT: result: 0
 
 package ExplorerTest api;

+ 3 - 3
explorer/testdata/alias/struct_alias.carbon

@@ -2,9 +2,9 @@
 // Exceptions. See /LICENSE for license information.
 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 //
-// RUN: %{explorer} %s | %{FileCheck-strict} %s
-// RUN: %{explorer-trace} %s | %{FileCheck-allow-unmatched} %s
-// AUTOUPDATE: %{explorer} %s
+// AUTOUPDATE
+// RUN: %{explorer-run}
+// RUN: %{explorer-run-trace}
 // CHECK:STDOUT: ab.a: 2
 // CHECK:STDOUT: ab.b: 1
 // CHECK:STDOUT: ba.a: 2

+ 3 - 3
explorer/testdata/alias/type_alias.carbon

@@ -2,9 +2,9 @@
 // Exceptions. See /LICENSE for license information.
 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 //
-// RUN: %{explorer} %s | %{FileCheck-strict} %s
-// RUN: %{explorer-trace} %s | %{FileCheck-allow-unmatched} %s
-// AUTOUPDATE: %{explorer} %s
+// AUTOUPDATE
+// RUN: %{explorer-run}
+// RUN: %{explorer-run-trace}
 // CHECK:STDOUT: result: 4
 
 package ExplorerTest api;

+ 3 - 3
explorer/testdata/array/fail_index.carbon

@@ -2,9 +2,9 @@
 // Exceptions. See /LICENSE for license information.
 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 //
-// RUN: %{not} %{explorer} %s | %{FileCheck-strict} %s
-// RUN: %{not} %{explorer-trace} %s | %{FileCheck-allow-unmatched} %s
-// AUTOUPDATE: %{explorer} %s
+// AUTOUPDATE
+// RUN: %{not} %{explorer-run}
+// RUN: %{not} %{explorer-run-trace}
 
 package ExplorerTest api;
 

+ 3 - 3
explorer/testdata/array/fail_negative_size.carbon

@@ -2,9 +2,9 @@
 // Exceptions. See /LICENSE for license information.
 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 //
-// RUN: %{not} %{explorer} %s | %{FileCheck-strict} %s
-// RUN: %{not} %{explorer-trace} %s | %{FileCheck-allow-unmatched} %s
-// AUTOUPDATE: %{explorer} %s
+// AUTOUPDATE
+// RUN: %{not} %{explorer-run}
+// RUN: %{not} %{explorer-run-trace}
 
 package ExplorerTest api;
 

+ 3 - 3
explorer/testdata/array/fail_size_mismatch.carbon

@@ -2,9 +2,9 @@
 // Exceptions. See /LICENSE for license information.
 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 //
-// RUN: %{not} %{explorer} %s | %{FileCheck-strict} %s
-// RUN: %{not} %{explorer-trace} %s | %{FileCheck-allow-unmatched} %s
-// AUTOUPDATE: %{explorer} %s
+// AUTOUPDATE
+// RUN: %{not} %{explorer-run}
+// RUN: %{not} %{explorer-run-trace}
 
 package ExplorerTest api;
 

+ 3 - 3
explorer/testdata/array/index.carbon

@@ -2,9 +2,9 @@
 // Exceptions. See /LICENSE for license information.
 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 //
-// RUN: %{explorer} %s | %{FileCheck-strict} %s
-// RUN: %{explorer-trace} %s | %{FileCheck-allow-unmatched} %s
-// AUTOUPDATE: %{explorer} %s
+// AUTOUPDATE
+// RUN: %{explorer-run}
+// RUN: %{explorer-run-trace}
 // CHECK:STDOUT: result: 0
 
 package ExplorerTest api;

+ 3 - 3
explorer/testdata/array/nested.carbon

@@ -2,9 +2,9 @@
 // Exceptions. See /LICENSE for license information.
 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 //
-// RUN: %{explorer} %s | %{FileCheck-strict} %s
-// RUN: %{explorer-trace} %s | %{FileCheck-allow-unmatched} %s
-// AUTOUPDATE: %{explorer} %s
+// AUTOUPDATE
+// RUN: %{explorer-run}
+// RUN: %{explorer-run-trace}
 // CHECK:STDOUT: result: 0
 
 package ExplorerTest api;

+ 3 - 3
explorer/testdata/as/as_same_type.carbon

@@ -2,9 +2,9 @@
 // Exceptions. See /LICENSE for license information.
 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 //
-// RUN: %{explorer} %s | %{FileCheck-strict} %s
-// RUN: %{explorer-trace} %s | %{FileCheck-allow-unmatched} %s
-// AUTOUPDATE: %{explorer} %s
+// AUTOUPDATE
+// RUN: %{explorer-run}
+// RUN: %{explorer-run-trace}
 // CHECK:STDOUT: result: 5
 
 package ExplorerTest api;

+ 3 - 3
explorer/testdata/as/convert.carbon

@@ -2,9 +2,9 @@
 // Exceptions. See /LICENSE for license information.
 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 //
-// RUN: %{explorer} %s | %{FileCheck-strict} %s
-// RUN: %{explorer-trace} %s | %{FileCheck-allow-unmatched} %s
-// AUTOUPDATE: %{explorer} %s
+// AUTOUPDATE
+// RUN: %{explorer-run}
+// RUN: %{explorer-run-trace}
 // CHECK:STDOUT: result: 5
 
 package ExplorerTest api;

+ 3 - 3
explorer/testdata/as/fail_destination_not_type.carbon

@@ -2,9 +2,9 @@
 // Exceptions. See /LICENSE for license information.
 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 //
-// RUN: %{not} %{explorer} %s | %{FileCheck-strict} %s
-// RUN: %{not} %{explorer-trace} %s | %{FileCheck-allow-unmatched} %s
-// AUTOUPDATE: %{explorer} %s
+// AUTOUPDATE
+// RUN: %{not} %{explorer-run}
+// RUN: %{not} %{explorer-run-trace}
 
 package ExplorerTest api;
 

+ 3 - 3
explorer/testdata/as/fail_no_conversion.carbon

@@ -2,9 +2,9 @@
 // Exceptions. See /LICENSE for license information.
 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 //
-// RUN: %{not} %{explorer} %s | %{FileCheck-strict} %s
-// RUN: %{not} %{explorer-trace} %s | %{FileCheck-allow-unmatched} %s
-// AUTOUPDATE: %{explorer} %s
+// AUTOUPDATE
+// RUN: %{not} %{explorer-run}
+// RUN: %{not} %{explorer-run-trace}
 
 package ExplorerTest api;
 

+ 3 - 3
explorer/testdata/as/implicit_as.carbon

@@ -2,9 +2,9 @@
 // Exceptions. See /LICENSE for license information.
 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 //
-// RUN: %{explorer} %s | %{FileCheck-strict} %s
-// RUN: %{explorer-trace} %s | %{FileCheck-allow-unmatched} %s
-// AUTOUPDATE: %{explorer} %s
+// AUTOUPDATE
+// RUN: %{explorer-run}
+// RUN: %{explorer-run-trace}
 // CHECK:STDOUT: result: 5
 
 package ExplorerTest api;

+ 3 - 2
explorer/testdata/assert/assert.carbon → explorer/testdata/assert/fail_assert.carbon

@@ -5,9 +5,10 @@
 // This won't auto-update because it uses a regex for the prelude line number,
 // so that it doesn't need to be updated on every prelude change.
 //
-// RUN: %{not} %{explorer} %s | %{FileCheck-strict} %s
-// RUN: %{not} %{explorer-trace} %s | %{FileCheck-allow-unmatched} %s
+// This can't be autoupdated because the error line comes form a different file.
 // NOAUTOUPDATE
+// RUN: %{not} %{explorer-run}
+// RUN: %{not} %{explorer-run-trace}
 // CHECK:STDERR: RUNTIME ERROR: {{.*}}/explorer/data/prelude.carbon:{{.*}}: "HALLO WELT"
 
 package ExplorerTest api;

+ 3 - 3
explorer/testdata/assign/convert_rhs.carbon

@@ -2,9 +2,9 @@
 // Exceptions. See /LICENSE for license information.
 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 //
-// RUN: %{explorer} %s | %{FileCheck-strict} %s
-// RUN: %{explorer-trace} %s | %{FileCheck-allow-unmatched} %s
-// AUTOUPDATE: %{explorer} %s
+// AUTOUPDATE
+// RUN: %{explorer-run}
+// RUN: %{explorer-run-trace}
 // CHECK:STDOUT: result: 1
 
 package ExplorerTest api;

+ 3 - 3
explorer/testdata/assign/destruct_original.carbon

@@ -2,9 +2,9 @@
 // Exceptions. See /LICENSE for license information.
 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 //
-// RUN: %{explorer} %s | %{FileCheck-strict} %s
-// RUN: %{explorer-trace} %s | %{FileCheck-allow-unmatched} %s
-// AUTOUPDATE: %{explorer} %s
+// AUTOUPDATE
+// RUN: %{explorer-run}
+// RUN: %{explorer-run-trace}
 // CHECK:STDOUT: result: 0
 
 package ExplorerTest api;

+ 3 - 3
explorer/testdata/assign/reassign_original.carbon

@@ -2,9 +2,9 @@
 // Exceptions. See /LICENSE for license information.
 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 //
-// RUN: %{explorer} %s | %{FileCheck-strict} %s
-// RUN: %{explorer-trace} %s | %{FileCheck-allow-unmatched} %s
-// AUTOUPDATE: %{explorer} %s
+// AUTOUPDATE
+// RUN: %{explorer-run}
+// RUN: %{explorer-run-trace}
 // CHECK:STDOUT: result: 0
 
 package ExplorerTest api;

+ 3 - 3
explorer/testdata/assoc_const/fail_anonymous.carbon

@@ -2,9 +2,9 @@
 // Exceptions. See /LICENSE for license information.
 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 //
-// RUN: %{not} %{explorer} %s | %{FileCheck-strict} %s
-// RUN: %{not} %{explorer-trace} %s | %{FileCheck-allow-unmatched} %s
-// AUTOUPDATE: %{explorer} %s
+// AUTOUPDATE
+// RUN: %{not} %{explorer-run}
+// RUN: %{not} %{explorer-run-trace}
 
 package ExplorerTest api;
 

+ 3 - 3
explorer/testdata/assoc_const/fail_incomplete_impl_1.carbon

@@ -2,9 +2,9 @@
 // Exceptions. See /LICENSE for license information.
 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 //
-// RUN: %{not} %{explorer} %s | %{FileCheck-strict} %s
-// RUN: %{not} %{explorer-trace} %s | %{FileCheck-allow-unmatched} %s
-// AUTOUPDATE: %{explorer} %s
+// AUTOUPDATE
+// RUN: %{not} %{explorer-run}
+// RUN: %{not} %{explorer-run-trace}
 
 package ExplorerTest api;
 

+ 3 - 3
explorer/testdata/assoc_const/fail_incomplete_impl_2.carbon

@@ -2,9 +2,9 @@
 // Exceptions. See /LICENSE for license information.
 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 //
-// RUN: %{not} %{explorer} %s | %{FileCheck-strict} %s
-// RUN: %{not} %{explorer-trace} %s | %{FileCheck-allow-unmatched} %s
-// AUTOUPDATE: %{explorer} %s
+// AUTOUPDATE
+// RUN: %{not} %{explorer-run}
+// RUN: %{not} %{explorer-run-trace}
 
 package ExplorerTest api;
 

+ 3 - 3
explorer/testdata/assoc_const/fail_indirectly_equal.carbon

@@ -2,9 +2,9 @@
 // Exceptions. See /LICENSE for license information.
 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 //
-// RUN: %{not} %{explorer} %s | %{FileCheck-strict} %s
-// RUN: %{not} %{explorer-trace} %s | %{FileCheck-allow-unmatched} %s
-// AUTOUPDATE: %{explorer} %s
+// AUTOUPDATE
+// RUN: %{not} %{explorer-run}
+// RUN: %{not} %{explorer-run-trace}
 
 package ExplorerTest api;
 

+ 3 - 3
explorer/testdata/assoc_const/fail_match_in_deduction.carbon

@@ -2,9 +2,9 @@
 // Exceptions. See /LICENSE for license information.
 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 //
-// RUN: %{not} %{explorer} %s | %{FileCheck-strict} %s
-// RUN: %{not} %{explorer-trace} %s | %{FileCheck-allow-unmatched} %s
-// AUTOUPDATE: %{explorer} %s
+// AUTOUPDATE
+// RUN: %{not} %{explorer-run}
+// RUN: %{not} %{explorer-run-trace}
 
 // TODO: Should this work?
 

+ 3 - 3
explorer/testdata/assoc_const/fail_multi_impl_scoping.carbon

@@ -2,9 +2,9 @@
 // Exceptions. See /LICENSE for license information.
 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 //
-// RUN: %{not} %{explorer} %s | %{FileCheck-strict} %s
-// RUN: %{not} %{explorer-trace} %s | %{FileCheck-allow-unmatched} %s
-// AUTOUPDATE: %{explorer} %s
+// AUTOUPDATE
+// RUN: %{not} %{explorer-run}
+// RUN: %{not} %{explorer-run-trace}
 
 package ExplorerTest api;
 

+ 3 - 3
explorer/testdata/assoc_const/fail_multiple_deduction.carbon

@@ -2,9 +2,9 @@
 // Exceptions. See /LICENSE for license information.
 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 //
-// RUN: %{not} %{explorer} %s | %{FileCheck-strict} %s
-// RUN: %{not} %{explorer-trace} %s | %{FileCheck-allow-unmatched} %s
-// AUTOUPDATE: %{explorer} %s
+// AUTOUPDATE
+// RUN: %{not} %{explorer-run}
+// RUN: %{not} %{explorer-run-trace}
 
 package ExplorerTest api;
 

+ 3 - 3
explorer/testdata/assoc_const/fail_overspecified_impl.carbon

@@ -2,9 +2,9 @@
 // Exceptions. See /LICENSE for license information.
 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 //
-// RUN: %{not} %{explorer} %s | %{FileCheck-strict} %s
-// RUN: %{not} %{explorer-trace} %s | %{FileCheck-allow-unmatched} %s
-// AUTOUPDATE: %{explorer} %s
+// AUTOUPDATE
+// RUN: %{not} %{explorer-run}
+// RUN: %{not} %{explorer-run-trace}
 
 package ExplorerTest api;
 

+ 3 - 3
explorer/testdata/assoc_const/fail_redefined.carbon

@@ -2,9 +2,9 @@
 // Exceptions. See /LICENSE for license information.
 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 //
-// RUN: %{not} %{explorer} %s | %{FileCheck-strict} %s
-// RUN: %{not} %{explorer-trace} %s | %{FileCheck-allow-unmatched} %s
-// AUTOUPDATE: %{explorer} %s
+// AUTOUPDATE
+// RUN: %{not} %{explorer-run}
+// RUN: %{not} %{explorer-run-trace}
 
 package ExplorerTest api;
 

+ 3 - 3
explorer/testdata/assoc_const/fail_unknown_value.carbon

@@ -2,9 +2,9 @@
 // Exceptions. See /LICENSE for license information.
 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 //
-// RUN: %{not} %{explorer} %s | %{FileCheck-strict} %s
-// RUN: %{not} %{explorer-trace} %s | %{FileCheck-allow-unmatched} %s
-// AUTOUPDATE: %{explorer} %s
+// AUTOUPDATE
+// RUN: %{not} %{explorer-run}
+// RUN: %{not} %{explorer-run-trace}
 
 package ExplorerTest api;
 

+ 3 - 3
explorer/testdata/assoc_const/fail_unknown_value_specified_in_constraint.carbon

@@ -2,9 +2,9 @@
 // Exceptions. See /LICENSE for license information.
 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 //
-// RUN: %{not} %{explorer} %s | %{FileCheck-strict} %s
-// RUN: %{not} %{explorer-trace} %s | %{FileCheck-allow-unmatched} %s
-// AUTOUPDATE: %{explorer} %s
+// AUTOUPDATE
+// RUN: %{not} %{explorer-run}
+// RUN: %{not} %{explorer-run-trace}
 
 package ExplorerTest api;
 

+ 3 - 3
explorer/testdata/assoc_const/impl_lookup.carbon

@@ -2,9 +2,9 @@
 // Exceptions. See /LICENSE for license information.
 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 //
-// RUN: %{explorer} %s | %{FileCheck-strict} %s
-// RUN: %{explorer-trace} %s | %{FileCheck-allow-unmatched} %s
-// AUTOUPDATE: %{explorer} %s
+// AUTOUPDATE
+// RUN: %{explorer-run}
+// RUN: %{explorer-run-trace}
 // CHECK:STDOUT: result: 1
 
 package ExplorerTest api;

+ 3 - 3
explorer/testdata/assoc_const/implement.carbon

@@ -2,9 +2,9 @@
 // Exceptions. See /LICENSE for license information.
 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 //
-// RUN: %{explorer} %s | %{FileCheck-strict} %s
-// RUN: %{explorer-trace} %s | %{FileCheck-allow-unmatched} %s
-// AUTOUPDATE: %{explorer} %s
+// AUTOUPDATE
+// RUN: %{explorer-run}
+// RUN: %{explorer-run-trace}
 // CHECK:STDOUT: result: 2
 
 package ExplorerTest api;

+ 3 - 3
explorer/testdata/assoc_const/lookup_in_rewrite.carbon

@@ -2,9 +2,9 @@
 // Exceptions. See /LICENSE for license information.
 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 //
-// RUN: %{explorer} %s | %{FileCheck-strict} %s
-// RUN: %{explorer-trace} %s | %{FileCheck-allow-unmatched} %s
-// AUTOUPDATE: %{explorer} %s
+// AUTOUPDATE
+// RUN: %{explorer-run}
+// RUN: %{explorer-run-trace}
 // CHECK:STDOUT: 1
 // CHECK:STDOUT: i32.Hash
 // CHECK:STDOUT: 0

+ 3 - 3
explorer/testdata/assoc_const/member_of_value.carbon

@@ -2,9 +2,9 @@
 // Exceptions. See /LICENSE for license information.
 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 //
-// RUN: %{explorer} %s | %{FileCheck-strict} %s
-// RUN: %{explorer-trace} %s | %{FileCheck-allow-unmatched} %s
-// AUTOUPDATE: %{explorer} %s
+// AUTOUPDATE
+// RUN: %{explorer-run}
+// RUN: %{explorer-run-trace}
 // CHECK:STDOUT: result: 2
 
 package ExplorerTest api;

+ 3 - 3
explorer/testdata/assoc_const/simple_constraint.carbon

@@ -2,9 +2,9 @@
 // Exceptions. See /LICENSE for license information.
 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 //
-// RUN: %{explorer} %s | %{FileCheck-strict} %s
-// RUN: %{explorer-trace} %s | %{FileCheck-allow-unmatched} %s
-// AUTOUPDATE: %{explorer} %s
+// AUTOUPDATE
+// RUN: %{explorer-run}
+// RUN: %{explorer-run-trace}
 // CHECK:STDOUT: result: 3
 
 package ExplorerTest api;

+ 3 - 3
explorer/testdata/assoc_const/simple_equality.carbon

@@ -2,9 +2,9 @@
 // Exceptions. See /LICENSE for license information.
 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 //
-// RUN: %{explorer} %s | %{FileCheck-strict} %s
-// RUN: %{explorer-trace} %s | %{FileCheck-allow-unmatched} %s
-// AUTOUPDATE: %{explorer} %s
+// AUTOUPDATE
+// RUN: %{explorer-run}
+// RUN: %{explorer-run-trace}
 // CHECK:STDOUT: result: 0
 
 package ExplorerTest api;

+ 3 - 3
explorer/testdata/auto/fail_use_in_init.carbon

@@ -2,9 +2,9 @@
 // Exceptions. See /LICENSE for license information.
 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 //
-// RUN: %{not} %{explorer} %s 2>&1 | %{FileCheck-strict} %s
-// RUN: %{not} %{explorer-trace} %s 2>&1 | %{FileCheck-allow-unmatched} %s
-// AUTOUPDATE: %{explorer} %s
+// AUTOUPDATE
+// RUN: %{not} %{explorer-run}
+// RUN: %{not} %{explorer-run-trace}
 
 package ExplorerTest api;
 

+ 3 - 3
explorer/testdata/basic_syntax/addition.carbon

@@ -2,9 +2,9 @@
 // Exceptions. See /LICENSE for license information.
 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 //
-// RUN: %{explorer} %s | %{FileCheck-strict} %s
-// RUN: %{explorer-trace} %s | %{FileCheck-allow-unmatched} %s
-// AUTOUPDATE: %{explorer} %s
+// AUTOUPDATE
+// RUN: %{explorer-run}
+// RUN: %{explorer-run-trace}
 // CHECK:STDOUT: result: 7
 
 package ExplorerTest api;

+ 3 - 3
explorer/testdata/basic_syntax/choice.carbon

@@ -2,9 +2,9 @@
 // Exceptions. See /LICENSE for license information.
 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 //
-// RUN: %{explorer} %s | %{FileCheck-strict} %s
-// RUN: %{explorer-trace} %s | %{FileCheck-allow-unmatched} %s
-// AUTOUPDATE: %{explorer} %s
+// AUTOUPDATE
+// RUN: %{explorer-run}
+// RUN: %{explorer-run-trace}
 // CHECK:STDOUT: result: 0
 
 package ExplorerTest api;

+ 3 - 3
explorer/testdata/basic_syntax/fail_alternative_not_type.carbon

@@ -2,9 +2,9 @@
 // Exceptions. See /LICENSE for license information.
 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 //
-// RUN: %{not} %{explorer} %s | %{FileCheck-strict} %s
-// RUN: %{not} %{explorer-trace} %s | %{FileCheck-allow-unmatched} %s
-// AUTOUPDATE: %{explorer} %s
+// AUTOUPDATE
+// RUN: %{not} %{explorer-run}
+// RUN: %{not} %{explorer-run-trace}
 
 package ExplorerTest api;
 

+ 3 - 3
explorer/testdata/basic_syntax/fail_alternative_uses_choice.carbon

@@ -2,9 +2,9 @@
 // Exceptions. See /LICENSE for license information.
 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 //
-// RUN: %{not} %{explorer} %s | %{FileCheck-strict} %s
-// RUN: %{not} %{explorer-trace} %s | %{FileCheck-allow-unmatched} %s
-// AUTOUPDATE: %{explorer} %s
+// AUTOUPDATE
+// RUN: %{not} %{explorer-run}
+// RUN: %{not} %{explorer-run-trace}
 
 package ExplorerTest api;
 

+ 3 - 3
explorer/testdata/basic_syntax/fail_assign_to_function.carbon

@@ -2,9 +2,9 @@
 // Exceptions. See /LICENSE for license information.
 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 //
-// RUN: %{not} %{explorer} %s | %{FileCheck-strict} %s
-// RUN: %{not} %{explorer-trace} %s | %{FileCheck-allow-unmatched} %s
-// AUTOUPDATE: %{explorer} %s
+// AUTOUPDATE
+// RUN: %{not} %{explorer-run}
+// RUN: %{not} %{explorer-run-trace}
 
 package ExplorerTest api;
 

+ 3 - 3
explorer/testdata/basic_syntax/fail_assign_to_rval.carbon

@@ -2,9 +2,9 @@
 // Exceptions. See /LICENSE for license information.
 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 //
-// RUN: %{not} %{explorer} %s | %{FileCheck-strict} %s
-// RUN: %{not} %{explorer-trace} %s | %{FileCheck-allow-unmatched} %s
-// AUTOUPDATE: %{explorer} %s
+// AUTOUPDATE
+// RUN: %{not} %{explorer-run}
+// RUN: %{not} %{explorer-run-trace}
 
 package ExplorerTest api;
 

+ 3 - 3
explorer/testdata/basic_syntax/fail_block.carbon

@@ -2,9 +2,9 @@
 // Exceptions. See /LICENSE for license information.
 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 //
-// RUN: %{not} %{explorer} %s | %{FileCheck-strict} %s
-// RUN: %{not} %{explorer-trace} %s | %{FileCheck-allow-unmatched} %s
-// AUTOUPDATE: %{explorer} %s
+// AUTOUPDATE
+// RUN: %{not} %{explorer-run}
+// RUN: %{not} %{explorer-run-trace}
 
 package ExplorerTest api;
 

+ 3 - 3
explorer/testdata/basic_syntax/fail_choice_no_parens.carbon

@@ -2,9 +2,9 @@
 // Exceptions. See /LICENSE for license information.
 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 //
-// RUN: %{not} %{explorer} %s | %{FileCheck-strict} %s
-// RUN: %{not} %{explorer-trace} %s | %{FileCheck-allow-unmatched} %s
-// AUTOUPDATE: %{explorer} %s
+// AUTOUPDATE
+// RUN: %{not} %{explorer-run}
+// RUN: %{not} %{explorer-run-trace}
 
 package ExplorerTest api;
 

+ 4 - 4
explorer/testdata/basic_syntax/not_compare_precedence.carbon → explorer/testdata/basic_syntax/fail_compare_precedence.carbon

@@ -2,13 +2,13 @@
 // Exceptions. See /LICENSE for license information.
 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 //
-// RUN: %{not} %{explorer} %s | %{FileCheck-strict} %s
-// RUN: %{not} %{explorer-trace} %s | %{FileCheck-allow-unmatched} %s
-// AUTOUPDATE: %{explorer} %s
+// AUTOUPDATE
+// RUN: %{not} %{explorer-run}
+// RUN: %{not} %{explorer-run-trace}
 
 package ExplorerTest api;
 
 fn CompareBools(a: bool, b: bool) -> bool {
-  // CHECK:STDERR: SYNTAX ERROR: {{.*}}/explorer/testdata/basic_syntax/not_compare_precedence.carbon:[[@LINE+1]]: syntax error, unexpected EQUAL_EQUAL, expecting SEMICOLON
+  // CHECK:STDERR: SYNTAX ERROR: {{.*}}/explorer/testdata/basic_syntax/fail_compare_precedence.carbon:[[@LINE+1]]: syntax error, unexpected EQUAL_EQUAL, expecting SEMICOLON
   return not a == b;
 }

+ 3 - 3
explorer/testdata/basic_syntax/fail_invalid_char.carbon

@@ -2,9 +2,9 @@
 // Exceptions. See /LICENSE for license information.
 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 //
-// RUN: %{not} %{explorer} %s | %{FileCheck-strict} %s
-// RUN: %{not} %{explorer-trace} %s | %{FileCheck-allow-unmatched} %s
-// AUTOUPDATE: %{explorer} %s
+// AUTOUPDATE
+// RUN: %{not} %{explorer-run}
+// RUN: %{not} %{explorer-run-trace}
 
 // CHECK:STDERR: SYNTAX ERROR: {{.*}}/explorer/testdata/basic_syntax/fail_invalid_char.carbon:[[@LINE+1]]: invalid character '\xEF' in source file.

+ 3 - 3
explorer/testdata/basic_syntax/fail_invalid_integer.carbon

@@ -2,9 +2,9 @@
 // Exceptions. See /LICENSE for license information.
 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 //
-// RUN: %{not} %{explorer} %s | %{FileCheck-strict} %s
-// RUN: %{not} %{explorer-trace} %s | %{FileCheck-allow-unmatched} %s
-// AUTOUPDATE: %{explorer} %s
+// AUTOUPDATE
+// RUN: %{not} %{explorer-run}
+// RUN: %{not} %{explorer-run-trace}
 
 package ExplorerTest api;
 

+ 3 - 3
explorer/testdata/basic_syntax/fail_invalid_integer_type.carbon

@@ -2,9 +2,9 @@
 // Exceptions. See /LICENSE for license information.
 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 //
-// RUN: %{not} %{explorer} %s | %{FileCheck-strict} %s
-// RUN: %{not} %{explorer-trace} %s | %{FileCheck-allow-unmatched} %s
-// AUTOUPDATE: %{explorer} %s
+// AUTOUPDATE
+// RUN: %{not} %{explorer-run}
+// RUN: %{not} %{explorer-run-trace}
 
 package ExplorerTest api;
 

+ 3 - 3
explorer/testdata/basic_syntax/fail_invalid_var_expression.carbon

@@ -2,9 +2,9 @@
 // Exceptions. See /LICENSE for license information.
 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 //
-// RUN: %{not} %{explorer} %s | %{FileCheck-strict} %s
-// RUN: %{not} %{explorer-trace} %s | %{FileCheck-allow-unmatched} %s
-// AUTOUPDATE: %{explorer} %s
+// AUTOUPDATE
+// RUN: %{not} %{explorer-run}
+// RUN: %{not} %{explorer-run-trace}
 
 package ExplorerTest api;
 

+ 3 - 3
explorer/testdata/basic_syntax/fail_missing_var.carbon

@@ -2,9 +2,9 @@
 // Exceptions. See /LICENSE for license information.
 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 //
-// RUN: %{not} %{explorer} %s | %{FileCheck-strict} %s
-// RUN: %{not} %{explorer-trace} %s | %{FileCheck-allow-unmatched} %s
-// AUTOUPDATE: %{explorer} %s
+// AUTOUPDATE
+// RUN: %{not} %{explorer-run}
+// RUN: %{not} %{explorer-run-trace}
 
 package ExplorerTest api;
 

+ 3 - 3
explorer/testdata/basic_syntax/fail_nested_binding.carbon

@@ -2,9 +2,9 @@
 // Exceptions. See /LICENSE for license information.
 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 //
-// RUN: %{not} %{explorer} %s | %{FileCheck-strict} %s
-// RUN: %{not} %{explorer-trace} %s | %{FileCheck-allow-unmatched} %s
-// AUTOUPDATE: %{explorer} %s
+// AUTOUPDATE
+// RUN: %{not} %{explorer-run}
+// RUN: %{not} %{explorer-run-trace}
 
 package ExplorerTest api;
 

+ 3 - 3
explorer/testdata/basic_syntax/fail_unimplemented_example.carbon

@@ -2,9 +2,9 @@
 // Exceptions. See /LICENSE for license information.
 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 //
-// RUN: %{not} %{explorer} %s | %{FileCheck-strict} %s
-// RUN: %{not} %{explorer-trace} %s | %{FileCheck-allow-unmatched} %s
-// AUTOUPDATE: %{explorer} %s
+// AUTOUPDATE
+// RUN: %{not} %{explorer-run}
+// RUN: %{not} %{explorer-run-trace}
 
 package ExplorerTest api;
 

+ 3 - 3
explorer/testdata/basic_syntax/fail_unknown_intrinsic.carbon

@@ -2,9 +2,9 @@
 // Exceptions. See /LICENSE for license information.
 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 //
-// RUN: %{not} %{explorer} %s | %{FileCheck-strict} %s
-// RUN: %{not} %{explorer-trace} %s | %{FileCheck-allow-unmatched} %s
-// AUTOUPDATE: %{explorer} %s
+// AUTOUPDATE
+// RUN: %{not} %{explorer-run}
+// RUN: %{not} %{explorer-run-trace}
 
 package ExplorerTest api;
 

+ 3 - 3
explorer/testdata/basic_syntax/fail_unsupported_integer_type.carbon

@@ -2,9 +2,9 @@
 // Exceptions. See /LICENSE for license information.
 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 //
-// RUN: %{not} %{explorer} %s | %{FileCheck-strict} %s
-// RUN: %{not} %{explorer-trace} %s | %{FileCheck-allow-unmatched} %s
-// AUTOUPDATE: %{explorer} %s
+// AUTOUPDATE
+// RUN: %{not} %{explorer-run}
+// RUN: %{not} %{explorer-run-trace}
 
 package ExplorerTest api;
 

+ 3 - 3
explorer/testdata/basic_syntax/fail_var_named_self.carbon

@@ -2,9 +2,9 @@
 // Exceptions. See /LICENSE for license information.
 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 //
-// RUN: %{not} %{explorer} %s | %{FileCheck-strict} %s
-// RUN: %{not} %{explorer-trace} %s | %{FileCheck-allow-unmatched} %s
-// AUTOUPDATE: %{explorer} %s
+// AUTOUPDATE
+// RUN: %{not} %{explorer-run}
+// RUN: %{not} %{explorer-run-trace}
 
 package ExplorerTest api;
 

+ 3 - 3
explorer/testdata/basic_syntax/fail_var_type.carbon

@@ -2,9 +2,9 @@
 // Exceptions. See /LICENSE for license information.
 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 //
-// RUN: %{not} %{explorer} %s | %{FileCheck-strict} %s
-// RUN: %{not} %{explorer-trace} %s | %{FileCheck-allow-unmatched} %s
-// AUTOUPDATE: %{explorer} %s
+// AUTOUPDATE
+// RUN: %{not} %{explorer-run}
+// RUN: %{not} %{explorer-run-trace}
 
 package ExplorerTest api;
 

+ 3 - 3
explorer/testdata/basic_syntax/next.carbon

@@ -2,9 +2,9 @@
 // Exceptions. See /LICENSE for license information.
 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 //
-// RUN: %{explorer} %s | %{FileCheck-strict} %s
-// RUN: %{explorer-trace} %s | %{FileCheck-allow-unmatched} %s
-// AUTOUPDATE: %{explorer} %s
+// AUTOUPDATE
+// RUN: %{explorer-run}
+// RUN: %{explorer-run-trace}
 // CHECK:STDOUT: result: 0
 
 package ExplorerTest api;

+ 3 - 3
explorer/testdata/basic_syntax/placeholder_variable.carbon

@@ -2,9 +2,9 @@
 // Exceptions. See /LICENSE for license information.
 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 //
-// RUN: %{explorer} %s | %{FileCheck-strict} %s
-// RUN: %{explorer-trace} %s | %{FileCheck-allow-unmatched} %s
-// AUTOUPDATE: %{explorer} %s
+// AUTOUPDATE
+// RUN: %{explorer-run}
+// RUN: %{explorer-run-trace}
 // CHECK:STDOUT: result: 0
 
 package ExplorerTest api;

+ 3 - 3
explorer/testdata/basic_syntax/record.carbon

@@ -2,9 +2,9 @@
 // Exceptions. See /LICENSE for license information.
 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 //
-// RUN: %{explorer} %s | %{FileCheck-strict} %s
-// RUN: %{explorer-trace} %s | %{FileCheck-allow-unmatched} %s
-// AUTOUPDATE: %{explorer} %s
+// AUTOUPDATE
+// RUN: %{explorer-run}
+// RUN: %{explorer-run-trace}
 // CHECK:STDOUT: result: 0
 
 package ExplorerTest api;

+ 3 - 3
explorer/testdata/basic_syntax/star.carbon

@@ -2,9 +2,9 @@
 // Exceptions. See /LICENSE for license information.
 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 //
-// RUN: %{explorer} %s | %{FileCheck-strict} %s
-// RUN: %{explorer-trace} %s | %{FileCheck-allow-unmatched} %s
-// AUTOUPDATE: %{explorer} %s
+// AUTOUPDATE
+// RUN: %{explorer-run}
+// RUN: %{explorer-run-trace}
 // CHECK:STDOUT: result: 0
 
 package ExplorerTest api;

+ 1 - 2
explorer/testdata/basic_syntax/trace.carbon

@@ -2,12 +2,11 @@
 // Exceptions. See /LICENSE for license information.
 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 //
-// RUN: %{explorer-trace} %s | %{FileCheck-allow-unmatched} %s
-//
 // A lot of output is elided: this is only checking for a few things for simple
 // sanity checking on --parser_debug --trace_file=- output.
 //
 // NOAUTOUPDATE
+// RUN: %{explorer-run-trace}
 // CHECK:STDOUT: ********** source program **********
 // CHECK:STDOUT: interface ImplicitAs {
 // CHECK:STDOUT: ********** type checking **********

+ 3 - 3
explorer/testdata/basic_syntax/var_tuple.carbon

@@ -2,9 +2,9 @@
 // Exceptions. See /LICENSE for license information.
 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 //
-// RUN: %{explorer} %s | %{FileCheck-strict} %s
-// RUN: %{explorer-trace} %s | %{FileCheck-allow-unmatched} %s
-// AUTOUPDATE: %{explorer} %s
+// AUTOUPDATE
+// RUN: %{explorer-run}
+// RUN: %{explorer-run-trace}
 // CHECK:STDOUT: result: 0
 
 package ExplorerTest api;

+ 3 - 3
explorer/testdata/basic_syntax/zero.carbon

@@ -2,9 +2,9 @@
 // Exceptions. See /LICENSE for license information.
 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 //
-// RUN: %{explorer} %s | %{FileCheck-strict} %s
-// RUN: %{explorer-trace} %s | %{FileCheck-allow-unmatched} %s
-// AUTOUPDATE: %{explorer} %s
+// AUTOUPDATE
+// RUN: %{explorer-run}
+// RUN: %{explorer-run-trace}
 // CHECK:STDOUT: result: 0
 
 package ExplorerTest api;

+ 3 - 3
explorer/testdata/block/empty.carbon

@@ -2,9 +2,9 @@
 // Exceptions. See /LICENSE for license information.
 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 //
-// RUN: %{explorer} %s | %{FileCheck-strict} %s
-// RUN: %{explorer-trace} %s | %{FileCheck-allow-unmatched} %s
-// AUTOUPDATE: %{explorer} %s
+// AUTOUPDATE
+// RUN: %{explorer-run}
+// RUN: %{explorer-run-trace}
 // CHECK:STDOUT: result: 0
 
 package ExplorerTest api;

+ 3 - 3
explorer/testdata/block/shadowing.carbon

@@ -2,9 +2,9 @@
 // Exceptions. See /LICENSE for license information.
 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 //
-// RUN: %{explorer} %s | %{FileCheck-strict} %s
-// RUN: %{explorer-trace} %s | %{FileCheck-allow-unmatched} %s
-// AUTOUPDATE: %{explorer} %s
+// AUTOUPDATE
+// RUN: %{explorer-run}
+// RUN: %{explorer-run-trace}
 // CHECK:STDOUT: result: 0
 
 package ExplorerTest api;

+ 3 - 3
explorer/testdata/choice/fail_recursive_use.carbon

@@ -2,9 +2,9 @@
 // Exceptions. See /LICENSE for license information.
 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 //
-// RUN: %{not} %{explorer} %s 2>&1 | %{FileCheck-strict} %s
-// RUN: %{not} %{explorer-trace} %s 2>&1 | %{FileCheck-allow-unmatched} %s
-// AUTOUPDATE: %{explorer} %s
+// AUTOUPDATE
+// RUN: %{not} %{explorer-run}
+// RUN: %{not} %{explorer-run-trace}
 
 package ExplorerTest api;
 

+ 3 - 3
explorer/testdata/choice/generic_choice_multiple_template_arguments.carbon

@@ -2,9 +2,9 @@
 // Exceptions. See /LICENSE for license information.
 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 //
-// RUN: %{explorer} %s | %{FileCheck-strict} %s
-// RUN: %{explorer-trace} %s | %{FileCheck-allow-unmatched} %s
-// AUTOUPDATE: %{explorer} %s
+// AUTOUPDATE
+// RUN: %{explorer-run}
+// RUN: %{explorer-run-trace}
 // CHECK:STDOUT: result: 22
 
 package ExplorerTest api;

+ 3 - 3
explorer/testdata/choice/generic_choice_nested_in_template_class.carbon

@@ -2,9 +2,9 @@
 // Exceptions. See /LICENSE for license information.
 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 //
-// RUN: %{explorer} %s | %{FileCheck-strict} %s
-// RUN: %{explorer-trace} %s | %{FileCheck-allow-unmatched} %s
-// AUTOUPDATE: %{explorer} %s
+// AUTOUPDATE
+// RUN: %{explorer-run}
+// RUN: %{explorer-run-trace}
 // CHECK:STDOUT: H 22
 // CHECK:STDOUT: result: 0
 

+ 3 - 3
explorer/testdata/choice/generic_choice_simple_assignment.carbon

@@ -2,9 +2,9 @@
 // Exceptions. See /LICENSE for license information.
 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 //
-// RUN: %{explorer} %s | %{FileCheck-strict} %s
-// RUN: %{explorer-trace} %s | %{FileCheck-allow-unmatched} %s
-// AUTOUPDATE: %{explorer} %s
+// AUTOUPDATE
+// RUN: %{explorer-run}
+// RUN: %{explorer-run-trace}
 // CHECK:STDOUT: result: 22
 
 package ExplorerTest api;

+ 3 - 3
explorer/testdata/class/assign.carbon

@@ -2,9 +2,9 @@
 // Exceptions. See /LICENSE for license information.
 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 //
-// RUN: %{explorer} %s | %{FileCheck-strict} %s
-// RUN: %{explorer-trace} %s | %{FileCheck-allow-unmatched} %s
-// AUTOUPDATE: %{explorer} %s
+// AUTOUPDATE
+// RUN: %{explorer-run}
+// RUN: %{explorer-run-trace}
 // CHECK:STDOUT: result: 0
 
 package ExplorerTest api;

+ 3 - 3
explorer/testdata/class/assign_member.carbon

@@ -2,9 +2,9 @@
 // Exceptions. See /LICENSE for license information.
 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 //
-// RUN: %{explorer} %s | %{FileCheck-strict} %s
-// RUN: %{explorer-trace} %s | %{FileCheck-allow-unmatched} %s
-// AUTOUPDATE: %{explorer} %s
+// AUTOUPDATE
+// RUN: %{explorer-run}
+// RUN: %{explorer-run-trace}
 // CHECK:STDOUT: result: 0
 
 package ExplorerTest api;

+ 3 - 3
explorer/testdata/class/bound_method.carbon

@@ -2,9 +2,9 @@
 // Exceptions. See /LICENSE for license information.
 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 //
-// RUN: %{explorer} %s | %{FileCheck-strict} %s
-// RUN: %{explorer-trace} %s | %{FileCheck-allow-unmatched} %s
-// AUTOUPDATE: %{explorer} %s
+// AUTOUPDATE
+// RUN: %{explorer-run}
+// RUN: %{explorer-run-trace}
 // CHECK:STDOUT: result: 0
 
 package ExplorerTest api;

+ 3 - 3
explorer/testdata/class/class_function.carbon

@@ -2,9 +2,9 @@
 // Exceptions. See /LICENSE for license information.
 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 //
-// RUN: %{explorer} %s | %{FileCheck-strict} %s
-// RUN: %{explorer-trace} %s | %{FileCheck-allow-unmatched} %s
-// AUTOUPDATE: %{explorer} %s
+// AUTOUPDATE
+// RUN: %{explorer-run}
+// RUN: %{explorer-run-trace}
 // CHECK:STDOUT: result: 0
 
 package ExplorerTest api;

+ 3 - 3
explorer/testdata/class/class_function_from_instance.carbon

@@ -2,9 +2,9 @@
 // Exceptions. See /LICENSE for license information.
 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 //
-// RUN: %{explorer} %s | %{FileCheck-strict} %s
-// RUN: %{explorer-trace} %s | %{FileCheck-allow-unmatched} %s
-// AUTOUPDATE: %{explorer} %s
+// AUTOUPDATE
+// RUN: %{explorer-run}
+// RUN: %{explorer-run-trace}
 // CHECK:STDOUT: result: 0
 
 package ExplorerTest api;

+ 3 - 3
explorer/testdata/class/class_function_self.carbon

@@ -2,9 +2,9 @@
 // Exceptions. See /LICENSE for license information.
 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 //
-// RUN: %{explorer} %s | %{FileCheck-strict} %s
-// RUN: %{explorer-trace} %s | %{FileCheck-allow-unmatched} %s
-// AUTOUPDATE: %{explorer} %s
+// AUTOUPDATE
+// RUN: %{explorer-run}
+// RUN: %{explorer-run-trace}
 // CHECK:STDOUT: result: 0
 
 package ExplorerTest api;

+ 3 - 3
explorer/testdata/class/class_function_value.carbon

@@ -2,9 +2,9 @@
 // Exceptions. See /LICENSE for license information.
 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 //
-// RUN: %{explorer} %s | %{FileCheck-strict} %s
-// RUN: %{explorer-trace} %s | %{FileCheck-allow-unmatched} %s
-// AUTOUPDATE: %{explorer} %s
+// AUTOUPDATE
+// RUN: %{explorer-run}
+// RUN: %{explorer-run-trace}
 // CHECK:STDOUT: result: 0
 
 package ExplorerTest api;

+ 3 - 3
explorer/testdata/class/empty_class.carbon

@@ -2,9 +2,9 @@
 // Exceptions. See /LICENSE for license information.
 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 //
-// RUN: %{explorer} %s | %{FileCheck-strict} %s
-// RUN: %{explorer-trace} %s | %{FileCheck-allow-unmatched} %s
-// AUTOUPDATE: %{explorer} %s
+// AUTOUPDATE
+// RUN: %{explorer-run}
+// RUN: %{explorer-run-trace}
 // CHECK:STDOUT: result: 0
 
 package ExplorerTest api;

+ 3 - 3
explorer/testdata/class/fail_abstract_class.carbon

@@ -2,9 +2,9 @@
 // Exceptions. See /LICENSE for license information.
 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 //
-// RUN: %{not} %{explorer} %s | %{FileCheck-strict} %s
-// RUN: %{not} %{explorer-trace} %s | %{FileCheck-allow-unmatched} %s
-// AUTOUPDATE: %{explorer} %s
+// AUTOUPDATE
+// RUN: %{not} %{explorer-run}
+// RUN: %{not} %{explorer-run-trace}
 
 package ExplorerTest api;
 

+ 3 - 3
explorer/testdata/class/fail_base_class.carbon

@@ -2,9 +2,9 @@
 // Exceptions. See /LICENSE for license information.
 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 //
-// RUN: %{not} %{explorer} %s | %{FileCheck-strict} %s
-// RUN: %{not} %{explorer-trace} %s | %{FileCheck-allow-unmatched} %s
-// AUTOUPDATE: %{explorer} %s
+// AUTOUPDATE
+// RUN: %{not} %{explorer-run}
+// RUN: %{not} %{explorer-run-trace}
 
 package ExplorerTest api;
 

+ 3 - 3
explorer/testdata/class/fail_class_extends.carbon

@@ -2,9 +2,9 @@
 // Exceptions. See /LICENSE for license information.
 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 //
-// RUN: %{not} %{explorer} %s | %{FileCheck-strict} %s
-// RUN: %{not} %{explorer-trace} %s | %{FileCheck-allow-unmatched} %s
-// AUTOUPDATE: %{explorer} %s
+// AUTOUPDATE
+// RUN: %{not} %{explorer-run}
+// RUN: %{not} %{explorer-run-trace}
 
 package ExplorerTest api;
 

+ 3 - 3
explorer/testdata/class/fail_class_named_self.carbon

@@ -2,9 +2,9 @@
 // Exceptions. See /LICENSE for license information.
 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 //
-// RUN: %{not} %{explorer} %s | %{FileCheck-strict} %s
-// RUN: %{not} %{explorer-trace} %s | %{FileCheck-allow-unmatched} %s
-// AUTOUPDATE: %{explorer} %s
+// AUTOUPDATE
+// RUN: %{not} %{explorer-run}
+// RUN: %{not} %{explorer-run-trace}
 
 package ExplorerTest api;
 

+ 3 - 3
explorer/testdata/class/fail_field_access_mismatch.carbon

@@ -2,9 +2,9 @@
 // Exceptions. See /LICENSE for license information.
 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 //
-// RUN: %{not} %{explorer} %s | %{FileCheck-strict} %s
-// RUN: %{not} %{explorer-trace} %s | %{FileCheck-allow-unmatched} %s
-// AUTOUPDATE: %{explorer} %s
+// AUTOUPDATE
+// RUN: %{not} %{explorer-run}
+// RUN: %{not} %{explorer-run-trace}
 
 package ExplorerTest api;
 

+ 3 - 3
explorer/testdata/class/fail_field_mismatch.carbon

@@ -2,9 +2,9 @@
 // Exceptions. See /LICENSE for license information.
 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 //
-// RUN: %{not} %{explorer} %s | %{FileCheck-strict} %s
-// RUN: %{not} %{explorer-trace} %s | %{FileCheck-allow-unmatched} %s
-// AUTOUPDATE: %{explorer} %s
+// AUTOUPDATE
+// RUN: %{not} %{explorer-run}
+// RUN: %{not} %{explorer-run-trace}
 
 package ExplorerTest api;
 

+ 3 - 3
explorer/testdata/class/fail_field_missing.carbon

@@ -2,9 +2,9 @@
 // Exceptions. See /LICENSE for license information.
 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 //
-// RUN: %{not} %{explorer} %s | %{FileCheck-strict} %s
-// RUN: %{not} %{explorer-trace} %s | %{FileCheck-allow-unmatched} %s
-// AUTOUPDATE: %{explorer} %s
+// AUTOUPDATE
+// RUN: %{not} %{explorer-run}
+// RUN: %{not} %{explorer-run-trace}
 
 package ExplorerTest api;
 

+ 3 - 3
explorer/testdata/class/fail_member_call_before_typecheck.carbon

@@ -2,9 +2,9 @@
 // Exceptions. See /LICENSE for license information.
 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 //
-// RUN: %{not} %{explorer} %s 2>&1 | %{FileCheck-strict} %s
-// RUN: %{not} %{explorer-trace} %s 2>&1 | %{FileCheck-allow-unmatched} %s
-// AUTOUPDATE: %{explorer} %s
+// AUTOUPDATE
+// RUN: %{not} %{explorer-run}
+// RUN: %{not} %{explorer-run-trace}
 
 package ExplorerTest api;
 

+ 3 - 3
explorer/testdata/class/fail_member_of_self.carbon

@@ -2,9 +2,9 @@
 // Exceptions. See /LICENSE for license information.
 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 //
-// RUN: %{not} %{explorer} %s 2>&1 | %{FileCheck-strict} %s
-// RUN: %{not} %{explorer-trace} %s 2>&1 | %{FileCheck-allow-unmatched} %s
-// AUTOUPDATE: %{explorer} %s
+// AUTOUPDATE
+// RUN: %{not} %{explorer-run}
+// RUN: %{not} %{explorer-run-trace}
 
 package ExplorerTest api;
 

Vissa filer visades inte eftersom för många filer har ändrats