소스 검색

Shift from ARGS to EXTRA-ARGS where possible (#5602)

Adds minimal defaults for codegen so that those tests don't need to
specify the full command line.

Moves driver/testdata/compile to check/testdata/basics/raw_sem_ir, which
seems like it better reflects the focus. Removes the textual IR test
because we have plenty of those now.

Moves a multiline token diagnostic test to parse because (a) diagnostics
doesn't have other tests and (b) this is really testing the way that
parse structures the location.

Drops `--include-diagnostic-kind` from some driver tests that aren't
testing a diagnostic, so the flag felt a bit like noise (even before
this change, there are a few tests that don't specify it because they're
not intended to test an emitted diagnostic, just high-level diagnostic
behaviors).

Adds some comments to reflect my understanding of why a test exists,
when I was pausing to think about it.

Modifies the stdin test to do more dumps; which happens to expose we
currently misbehave.
Jon Ross-Perkins 11 달 전
부모
커밋
806bee1063

+ 5 - 4
toolchain/check/testdata/basics/no_prelude/dump_raw_builtins.carbon → toolchain/check/testdata/basics/raw_sem_ir/builtins.carbon

@@ -2,16 +2,16 @@
 // Exceptions. See /LICENSE for license information.
 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 //
-// ARGS: --include-diagnostic-kind compile --no-prelude-import --phase=check --dump-raw-sem-ir --builtin-sem-ir %s
+// EXTRA-ARGS: --no-prelude-import --dump-raw-sem-ir --builtin-sem-ir
 //
 // AUTOUPDATE
 // TIP: To test this file alone, run:
-// TIP:   bazel test //toolchain/testing:file_test --test_arg=--file_tests=toolchain/check/testdata/basics/no_prelude/dump_raw_builtins.carbon
+// TIP:   bazel test //toolchain/testing:file_test --test_arg=--file_tests=toolchain/check/testdata/basics/raw_sem_ir/builtins.carbon
 // TIP: To dump output, run:
-// TIP:   bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/basics/no_prelude/dump_raw_builtins.carbon
+// TIP:   bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/basics/raw_sem_ir/builtins.carbon
 
 // CHECK:STDOUT: ---
-// CHECK:STDOUT: filename:        dump_raw_builtins.carbon
+// CHECK:STDOUT: filename:        builtins.carbon
 // CHECK:STDOUT: sem_ir:
 // CHECK:STDOUT:   import_irs:
 // CHECK:STDOUT:     ir0:             {decl_id: inst<none>, is_export: false}
@@ -74,3 +74,4 @@
 // CHECK:STDOUT:     inst_block4:
 // CHECK:STDOUT:       0:               inst14
 // CHECK:STDOUT: ...
+// CHECK:STDOUT:

+ 3 - 3
toolchain/driver/testdata/compile/multifile_raw_ir.carbon → toolchain/check/testdata/basics/raw_sem_ir/multifile.carbon

@@ -2,15 +2,15 @@
 // Exceptions. See /LICENSE for license information.
 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 //
-// ARGS: --include-diagnostic-kind compile --no-prelude-import  --phase=check --dump-raw-sem-ir %s
+// EXTRA-ARGS: --no-prelude-import --dump-raw-sem-ir --no-dump-sem-ir
 //
 // Check that raw IR dumping works as expected.
 //
 // AUTOUPDATE
 // TIP: To test this file alone, run:
-// TIP:   bazel test //toolchain/testing:file_test --test_arg=--file_tests=toolchain/driver/testdata/compile/multifile_raw_ir.carbon
+// TIP:   bazel test //toolchain/testing:file_test --test_arg=--file_tests=toolchain/check/testdata/basics/raw_sem_ir/multifile.carbon
 // TIP: To dump output, run:
-// TIP:   bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/driver/testdata/compile/multifile_raw_ir.carbon
+// TIP:   bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/basics/raw_sem_ir/multifile.carbon
 
 // --- a.carbon
 package A;

+ 3 - 3
toolchain/driver/testdata/compile/multifile_raw_and_textual_ir.carbon → toolchain/check/testdata/basics/raw_sem_ir/multifile_with_textual_ir.carbon

@@ -2,15 +2,15 @@
 // Exceptions. See /LICENSE for license information.
 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 //
-// ARGS: --include-diagnostic-kind compile --no-prelude-import --phase=check --dump-sem-ir --dump-raw-sem-ir %s
+// EXTRA-ARGS: --no-prelude-import --dump-raw-sem-ir --dump-sem-ir-ranges=if-present
 //
 // Check that we can combine textual IR and raw IR dumping in one compile.
 //
 // AUTOUPDATE
 // TIP: To test this file alone, run:
-// TIP:   bazel test //toolchain/testing:file_test --test_arg=--file_tests=toolchain/driver/testdata/compile/multifile_raw_and_textual_ir.carbon
+// TIP:   bazel test //toolchain/testing:file_test --test_arg=--file_tests=toolchain/check/testdata/basics/raw_sem_ir/multifile_with_textual_ir.carbon
 // TIP: To dump output, run:
-// TIP:   bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/driver/testdata/compile/multifile_raw_and_textual_ir.carbon
+// TIP:   bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/basics/raw_sem_ir/multifile_with_textual_ir.carbon
 
 // --- a.carbon
 package A;

+ 4 - 4
toolchain/driver/testdata/compile/raw_ir.carbon → toolchain/check/testdata/basics/raw_sem_ir/one_file.carbon

@@ -2,22 +2,22 @@
 // Exceptions. See /LICENSE for license information.
 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 //
-// ARGS: --include-diagnostic-kind compile --no-prelude-import --phase=check --dump-raw-sem-ir %s
+// EXTRA-ARGS: --no-prelude-import --dump-raw-sem-ir --no-dump-sem-ir
 //
 // Check that raw IR dumping works as expected.
 //
 // AUTOUPDATE
 // TIP: To test this file alone, run:
-// TIP:   bazel test //toolchain/testing:file_test --test_arg=--file_tests=toolchain/driver/testdata/compile/raw_ir.carbon
+// TIP:   bazel test //toolchain/testing:file_test --test_arg=--file_tests=toolchain/check/testdata/basics/raw_sem_ir/one_file.carbon
 // TIP: To dump output, run:
-// TIP:   bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/driver/testdata/compile/raw_ir.carbon
+// TIP:   bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/basics/raw_sem_ir/one_file.carbon
 
 fn Foo[T:! type](n: T) -> (T, ()) {
   return (n, ());
 }
 
 // CHECK:STDOUT: ---
-// CHECK:STDOUT: filename:        raw_ir.carbon
+// CHECK:STDOUT: filename:        one_file.carbon
 // CHECK:STDOUT: sem_ir:
 // CHECK:STDOUT:   import_irs:
 // CHECK:STDOUT:     ir0:             {decl_id: inst<none>, is_export: false}

+ 5 - 5
toolchain/driver/testdata/compile/raw_and_textual_ir.carbon → toolchain/check/testdata/basics/raw_sem_ir/one_file_with_textual_ir.carbon

@@ -2,22 +2,22 @@
 // Exceptions. See /LICENSE for license information.
 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 //
-// ARGS: --include-diagnostic-kind compile --no-prelude-import --phase=check --dump-sem-ir --dump-raw-sem-ir %s
+// EXTRA-ARGS: --no-prelude-import --dump-raw-sem-ir --dump-sem-ir-ranges=if-present
 //
 // Check that we can combine textual IR and raw IR dumping in one compile.
 //
 // AUTOUPDATE
 // TIP: To test this file alone, run:
-// TIP:   bazel test //toolchain/testing:file_test --test_arg=--file_tests=toolchain/driver/testdata/compile/raw_and_textual_ir.carbon
+// TIP:   bazel test //toolchain/testing:file_test --test_arg=--file_tests=toolchain/check/testdata/basics/raw_sem_ir/one_file_with_textual_ir.carbon
 // TIP: To dump output, run:
-// TIP:   bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/driver/testdata/compile/raw_and_textual_ir.carbon
+// TIP:   bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/basics/raw_sem_ir/one_file_with_textual_ir.carbon
 
 fn Foo(n: ()) -> ((), ()) {
   return (n, ());
 }
 
 // CHECK:STDOUT: ---
-// CHECK:STDOUT: filename:        raw_and_textual_ir.carbon
+// CHECK:STDOUT: filename:        one_file_with_textual_ir.carbon
 // CHECK:STDOUT: sem_ir:
 // CHECK:STDOUT:   import_irs:
 // CHECK:STDOUT:     ir0:             {decl_id: inst<none>, is_export: false}
@@ -186,7 +186,7 @@ fn Foo(n: ()) -> ((), ()) {
 // CHECK:STDOUT:       1:               inst36
 // CHECK:STDOUT: ...
 // CHECK:STDOUT:
-// CHECK:STDOUT: --- raw_and_textual_ir.carbon
+// CHECK:STDOUT: --- one_file_with_textual_ir.carbon
 // CHECK:STDOUT:
 // CHECK:STDOUT: constants {
 // CHECK:STDOUT:   %empty_tuple.type: type = tuple_type () [concrete]

+ 1 - 1
toolchain/codegen/testdata/assembly/basic.carbon

@@ -2,7 +2,7 @@
 // Exceptions. See /LICENSE for license information.
 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 //
-// ARGS: --include-diagnostic-kind compile --no-prelude-import --target=x86_64-unknown-linux-gnu --output=- %s
+// EXTRA-ARGS: --no-prelude-import --target=x86_64-unknown-linux-gnu --output=-
 //
 // To test this file alone, run:
 //   bazel test //toolchain/testing:file_test --test_arg=--file_tests=toolchain/codegen/testdata/assembly/basic.carbon

+ 2 - 1
toolchain/codegen/testdata/fail_target_triple.carbon

@@ -2,7 +2,8 @@
 // Exceptions. See /LICENSE for license information.
 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 //
-// ARGS: --include-diagnostic-kind compile --no-prelude-import --target=x86_687-unknown-linux-gnu --output=- %s
+// EXTRA-ARGS: --no-prelude-import --target=x86_687-unknown-linux-gnu --output=-
+//
 // No autoupdate because the message comes from LLVM.
 // To test this file alone, run:
 //   bazel test //toolchain/testing:file_test --test_arg=--file_tests=toolchain/codegen/testdata/fail_target_triple.carbon

+ 1 - 1
toolchain/codegen/testdata/objcode/basic.carbon

@@ -2,7 +2,7 @@
 // Exceptions. See /LICENSE for license information.
 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 //
-// ARGS: --include-diagnostic-kind compile --no-prelude-import --target=x86_64-unknown-linux-gnu --output=%t %s
+// EXTRA-ARGS: --no-prelude-import --target=x86_64-unknown-linux-gnu --output=%t
 //
 // TODO: Add a way to write some basic tests for object file outputs.
 // AUTOUPDATE

+ 0 - 5
toolchain/diagnostics/BUILD

@@ -7,11 +7,6 @@ load("//bazel/manifest:defs.bzl", "manifest")
 
 package(default_visibility = ["//visibility:public"])
 
-filegroup(
-    name = "testdata",
-    srcs = glob(["testdata/**/*.carbon"]),
-)
-
 cc_library(
     name = "diagnostic_emitter",
     srcs = [

+ 0 - 19
toolchain/diagnostics/testdata/fail_multiline_token.carbon

@@ -1,19 +0,0 @@
-// Part of the Carbon Language project, under the Apache License v2.0 with LLVM
-// Exceptions. See /LICENSE for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-// ARGS: --include-diagnostic-kind compile --phase=parse %s
-//
-// AUTOUPDATE
-// TIP: To test this file alone, run:
-// TIP:   bazel test //toolchain/testing:file_test --test_arg=--file_tests=toolchain/diagnostics/testdata/fail_multiline_token.carbon
-// TIP: To dump output, run:
-// TIP:   bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/diagnostics/testdata/fail_multiline_token.carbon
-
-// CHECK:STDERR: fail_multiline_token.carbon:[[@LINE+4]]:1: error: unrecognized declaration introducer [UnrecognizedDecl]
-// CHECK:STDERR: '''
-// CHECK:STDERR: ^~~
-// CHECK:STDERR:
-'''
-hello
-'''

+ 0 - 74
toolchain/driver/testdata/compile/textual_ir.carbon

@@ -1,74 +0,0 @@
-// Part of the Carbon Language project, under the Apache License v2.0 with LLVM
-// Exceptions. See /LICENSE for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-// ARGS: --include-diagnostic-kind compile --no-prelude-import --phase=check --dump-sem-ir %s
-//
-// Check that the command-line flag to dump textual IR works.
-//
-// AUTOUPDATE
-// TIP: To test this file alone, run:
-// TIP:   bazel test //toolchain/testing:file_test --test_arg=--file_tests=toolchain/driver/testdata/compile/textual_ir.carbon
-// TIP: To dump output, run:
-// TIP:   bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/driver/testdata/compile/textual_ir.carbon
-
-fn Foo(n: ()) -> ((), ()) {
-  return (n, ());
-}
-
-// CHECK:STDOUT: --- textual_ir.carbon
-// CHECK:STDOUT:
-// CHECK:STDOUT: constants {
-// CHECK:STDOUT:   %empty_tuple.type: type = tuple_type () [concrete]
-// CHECK:STDOUT:   %pattern_type.cb1: type = pattern_type %empty_tuple.type [concrete]
-// CHECK:STDOUT:   %tuple.type: type = tuple_type (%empty_tuple.type, %empty_tuple.type) [concrete]
-// CHECK:STDOUT:   %pattern_type.5b8: type = pattern_type %tuple.type [concrete]
-// CHECK:STDOUT:   %Foo.type: type = fn_type @Foo [concrete]
-// CHECK:STDOUT:   %Foo: %Foo.type = struct_value () [concrete]
-// CHECK:STDOUT:   %empty_tuple: %empty_tuple.type = tuple_value () [concrete]
-// CHECK:STDOUT:   %tuple: %tuple.type = tuple_value (%empty_tuple, %empty_tuple) [concrete]
-// CHECK:STDOUT: }
-// CHECK:STDOUT:
-// CHECK:STDOUT: file {
-// CHECK:STDOUT:   package: <namespace> = namespace [concrete] {
-// CHECK:STDOUT:     .Foo = %Foo.decl
-// CHECK:STDOUT:   }
-// CHECK:STDOUT:   %Foo.decl: %Foo.type = fn_decl @Foo [concrete = constants.%Foo] {
-// CHECK:STDOUT:     %n.patt: %pattern_type.cb1 = binding_pattern n [concrete]
-// CHECK:STDOUT:     %n.param_patt: %pattern_type.cb1 = value_param_pattern %n.patt, call_param0 [concrete]
-// CHECK:STDOUT:     %return.patt: %pattern_type.5b8 = return_slot_pattern [concrete]
-// CHECK:STDOUT:     %return.param_patt: %pattern_type.5b8 = out_param_pattern %return.patt, call_param1 [concrete]
-// CHECK:STDOUT:   } {
-// CHECK:STDOUT:     %.loc15_20: %empty_tuple.type = tuple_literal ()
-// CHECK:STDOUT:     %.loc15_24: %empty_tuple.type = tuple_literal ()
-// CHECK:STDOUT:     %.loc15_25.1: %tuple.type = tuple_literal (%.loc15_20, %.loc15_24)
-// CHECK:STDOUT:     %.loc15_25.2: type = converted %.loc15_20, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type]
-// CHECK:STDOUT:     %.loc15_25.3: type = converted %.loc15_24, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type]
-// CHECK:STDOUT:     %.loc15_25.4: type = converted %.loc15_25.1, constants.%tuple.type [concrete = constants.%tuple.type]
-// CHECK:STDOUT:     %n.param: %empty_tuple.type = value_param call_param0
-// CHECK:STDOUT:     %.loc15_12.1: type = splice_block %.loc15_12.3 [concrete = constants.%empty_tuple.type] {
-// CHECK:STDOUT:       %.loc15_12.2: %empty_tuple.type = tuple_literal ()
-// CHECK:STDOUT:       %.loc15_12.3: type = converted %.loc15_12.2, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type]
-// CHECK:STDOUT:     }
-// CHECK:STDOUT:     %n: %empty_tuple.type = bind_name n, %n.param
-// CHECK:STDOUT:     %return.param: ref %tuple.type = out_param call_param1
-// CHECK:STDOUT:     %return: ref %tuple.type = return_slot %return.param
-// CHECK:STDOUT:   }
-// CHECK:STDOUT: }
-// CHECK:STDOUT:
-// CHECK:STDOUT: fn @Foo(%n.param: %empty_tuple.type) -> %return.param: %tuple.type {
-// CHECK:STDOUT: !entry:
-// CHECK:STDOUT:   %n.ref: %empty_tuple.type = name_ref n, %n
-// CHECK:STDOUT:   %.loc16_15.1: %empty_tuple.type = tuple_literal ()
-// CHECK:STDOUT:   %.loc16_16.1: %tuple.type = tuple_literal (%n.ref, %.loc16_15.1)
-// CHECK:STDOUT:   %tuple.elem0: ref %empty_tuple.type = tuple_access %return, element0
-// CHECK:STDOUT:   %.loc16_11: init %empty_tuple.type = tuple_init () to %tuple.elem0 [concrete = constants.%empty_tuple]
-// CHECK:STDOUT:   %.loc16_16.2: init %empty_tuple.type = converted %n.ref, %.loc16_11 [concrete = constants.%empty_tuple]
-// CHECK:STDOUT:   %tuple.elem1: ref %empty_tuple.type = tuple_access %return, element1
-// CHECK:STDOUT:   %.loc16_15.2: init %empty_tuple.type = tuple_init () to %tuple.elem1 [concrete = constants.%empty_tuple]
-// CHECK:STDOUT:   %.loc16_16.3: init %empty_tuple.type = converted %.loc16_15.1, %.loc16_15.2 [concrete = constants.%empty_tuple]
-// CHECK:STDOUT:   %.loc16_16.4: init %tuple.type = tuple_init (%.loc16_16.2, %.loc16_16.3) to %return [concrete = constants.%tuple]
-// CHECK:STDOUT:   %.loc16_17: init %tuple.type = converted %.loc16_16.1, %.loc16_16.4 [concrete = constants.%tuple]
-// CHECK:STDOUT:   return %.loc16_17 to %return
-// CHECK:STDOUT: }
-// CHECK:STDOUT:

+ 1 - 1
toolchain/driver/testdata/dump_mem_usage.carbon

@@ -2,7 +2,7 @@
 // Exceptions. See /LICENSE for license information.
 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 //
-// ARGS: --include-diagnostic-kind compile --phase=check --dump-mem-usage %s
+// ARGS: compile --phase=check --dump-mem-usage %s
 //
 // To test this file alone, run:
 //   bazel test //toolchain/testing:file_test --test_arg=--file_tests=toolchain/driver/testdata/dump_mem_usage.carbon

+ 1 - 1
toolchain/driver/testdata/dump_shared_values.carbon

@@ -2,7 +2,7 @@
 // Exceptions. See /LICENSE for license information.
 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 //
-// ARGS: --include-diagnostic-kind compile --phase=lex --dump-shared-values %s
+// ARGS: compile --phase=lex --dump-shared-values %s
 //
 // AUTOUPDATE
 // TIP: To test this file alone, run:

+ 1 - 1
toolchain/driver/testdata/dump_timings.carbon

@@ -2,7 +2,7 @@
 // Exceptions. See /LICENSE for license information.
 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 //
-// ARGS: --include-diagnostic-kind compile --dump-timings --phase=check %s
+// ARGS: compile --phase=check --dump-timings %s
 //
 // SET-CHECK-SUBSET
 //

+ 4 - 2
toolchain/driver/testdata/fail_flush_errors.carbon

@@ -2,8 +2,10 @@
 // Exceptions. See /LICENSE for license information.
 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 //
-// INCLUDE-FILE: toolchain/testing/min_prelude/destroy.carbon
-// ARGS: --include-diagnostic-kind compile --custom-core %s
+// This test is validating that the delayed error flush doesn't break on string
+// lifetimes.
+//
+// ARGS: --include-diagnostic-kind compile --no-prelude-import %s
 //
 // AUTOUPDATE
 // TIP: To test this file alone, run:

+ 1 - 1
toolchain/driver/testdata/fail_missing_stdin_output.carbon

@@ -2,7 +2,7 @@
 // Exceptions. See /LICENSE for license information.
 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 //
-// ARGS: --include-diagnostic-kind compile --no-prelude-import -
+// ARGS: --include-diagnostic-kind compile -
 //
 // AUTOUPDATE
 // TIP: To test this file alone, run:

+ 61 - 1
toolchain/driver/testdata/stdin.carbon

@@ -2,7 +2,11 @@
 // Exceptions. See /LICENSE for license information.
 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 //
-// ARGS: --include-diagnostic-kind compile - --no-prelude-import --phase=check --dump-sem-ir
+// This is checking that the stdin filename is handled consistently across
+// dump flags.
+// TODO: Align lex/parse with check/lower.
+//
+// ARGS: compile - --phase=lower --no-prelude-import --target=x86_64-linux-gnu --dump-tokens --dump-parse-tree --dump-sem-ir --dump-raw-sem-ir --dump-llvm-ir
 //
 // AUTOUPDATE
 // TIP: To test this file alone, run:
@@ -10,9 +14,65 @@
 // TIP: To dump output, run:
 // TIP:   bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/driver/testdata/stdin.carbon
 
+// CHECK:STDOUT: - filename: <stdin>
+// CHECK:STDOUT:   tokens:
+// CHECK:STDOUT:   - { index: 0, kind: "FileStart", line: 1, column: 1, indent: 1, spelling: "" }
+// CHECK:STDOUT:   - { index: 1, kind:   "FileEnd", line: 1, column: 1, indent: 1, spelling: "", has_leading_space: true }
+// CHECK:STDOUT: - filename: <stdin>
+// CHECK:STDOUT:   parse_tree: [
+// CHECK:STDOUT:     {kind: 'FileStart', text: ''},
+// CHECK:STDOUT:     {kind: 'FileEnd', text: ''},
+// CHECK:STDOUT:   ]
+// CHECK:STDOUT: ---
+// CHECK:STDOUT: filename:        '-'
+// CHECK:STDOUT: sem_ir:
+// CHECK:STDOUT:   import_irs:
+// CHECK:STDOUT:     ir0:             {decl_id: inst<none>, is_export: false}
+// CHECK:STDOUT:     ir1:             {decl_id: inst<none>, is_export: false}
+// CHECK:STDOUT:   import_ir_insts: {}
+// CHECK:STDOUT:   name_scopes:
+// CHECK:STDOUT:     name_scope0:     {inst: inst14, parent_scope: name_scope<none>, has_error: false, extended_scopes: [], names: {}}
+// CHECK:STDOUT:   entity_names:    {}
+// CHECK:STDOUT:   functions:       {}
+// CHECK:STDOUT:   classes:         {}
+// CHECK:STDOUT:   generics:        {}
+// CHECK:STDOUT:   specifics:       {}
+// CHECK:STDOUT:   struct_type_fields:
+// CHECK:STDOUT:     struct_type_fields0: {}
+// CHECK:STDOUT:   types:
+// CHECK:STDOUT:     'type(TypeType)':
+// CHECK:STDOUT:       value_repr:      {kind: copy, type: type(TypeType)}
+// CHECK:STDOUT:     'type(Error)':
+// CHECK:STDOUT:       value_repr:      {kind: copy, type: type(Error)}
+// CHECK:STDOUT:     'type(inst(NamespaceType))':
+// CHECK:STDOUT:       value_repr:      {kind: copy, type: type(inst(NamespaceType))}
+// CHECK:STDOUT:   insts:
+// CHECK:STDOUT:     inst14:          {kind: Namespace, arg0: name_scope0, arg1: inst<none>, type: type(inst(NamespaceType))}
+// CHECK:STDOUT:   constant_values:
+// CHECK:STDOUT:     inst14:          concrete_constant(inst14)
+// CHECK:STDOUT:   symbolic_constants: {}
+// CHECK:STDOUT:   inst_blocks:
+// CHECK:STDOUT:     inst_block_empty: {}
+// CHECK:STDOUT:     exports:         {}
+// CHECK:STDOUT:     import_refs:     {}
+// CHECK:STDOUT:     global_init:     {}
+// CHECK:STDOUT:     inst_block4:
+// CHECK:STDOUT:       0:               inst14
+// CHECK:STDOUT: ...
+// CHECK:STDOUT:
 // CHECK:STDOUT: --- -
 // CHECK:STDOUT:
 // CHECK:STDOUT: file {
 // CHECK:STDOUT:   package: <namespace> = namespace [concrete] {}
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
+// CHECK:STDOUT: ; ModuleID = '-'
+// CHECK:STDOUT: source_filename = "-"
+// CHECK:STDOUT:
+// CHECK:STDOUT: !llvm.module.flags = !{!0, !1}
+// CHECK:STDOUT: !llvm.dbg.cu = !{!2}
+// CHECK:STDOUT:
+// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5}
+// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3}
+// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug)
+// CHECK:STDOUT: !3 = !DIFile(filename: "-", directory: "")

+ 1 - 1
toolchain/lower/testdata/debug/nodebug.carbon

@@ -2,7 +2,7 @@
 // Exceptions. See /LICENSE for license information.
 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 //
-// ARGS: --include-diagnostic-kind compile --no-debug-info --phase=lower --dump-llvm-ir --output=- --exclude-dump-file-prefix=%{core_package_dir} %s
+// EXTRA-ARGS: --no-debug-info
 //
 // AUTOUPDATE
 // TIP: To test this file alone, run:

+ 33 - 0
toolchain/parse/testdata/basics/multiline_token.carbon

@@ -0,0 +1,33 @@
+// Part of the Carbon Language project, under the Apache License v2.0 with LLVM
+// Exceptions. See /LICENSE for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+// This is validating that the multi-line token's hint prints correctly.
+//
+// AUTOUPDATE
+// TIP: To test this file alone, run:
+// TIP:   bazel test //toolchain/testing:file_test --test_arg=--file_tests=toolchain/parse/testdata/basics/multiline_token.carbon
+// TIP: To dump output, run:
+// TIP:   bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/parse/testdata/basics/multiline_token.carbon
+
+// --- fail_multiline_token.carbon
+
+// CHECK:STDERR: fail_multiline_token.carbon:[[@LINE+4]]:1: error: unrecognized declaration introducer [UnrecognizedDecl]
+// CHECK:STDERR: '''
+// CHECK:STDERR: ^~~
+// CHECK:STDERR:
+'''
+hello
+'''
+
+// CHECK:STDOUT: - filename: fail_multiline_token.carbon
+// CHECK:STDOUT:   parse_tree: [
+// CHECK:STDOUT:     {kind: 'FileStart', text: ''},
+// CHECK:STDOUT:       {kind: 'InvalidParseStart', text: ''''
+// CHECK:STDOUT: hello
+// CHECK:STDOUT: '''', has_error: yes},
+// CHECK:STDOUT:     {kind: 'InvalidParseSubtree', text: ''''
+// CHECK:STDOUT: hello
+// CHECK:STDOUT: '''', has_error: yes, subtree_size: 2},
+// CHECK:STDOUT:     {kind: 'FileEnd', text: ''},
+// CHECK:STDOUT:   ]

+ 0 - 1
toolchain/testing/BUILD

@@ -12,7 +12,6 @@ filegroup(
     srcs = [
         "//toolchain/check:testdata",
         "//toolchain/codegen:testdata",
-        "//toolchain/diagnostics:testdata",
         "//toolchain/driver:testdata",
         "//toolchain/format:testdata",
         "//toolchain/language_server:testdata",

+ 2 - 0
toolchain/testing/file_test.cpp

@@ -195,6 +195,8 @@ auto ToolchainFileTest::GetDefaultArgs() const
     args.insert(args.end(), {"--dump-sem-ir", "--dump-sem-ir-ranges=only"});
   } else if (component_ == "lower") {
     args.insert(args.end(), {"--dump-llvm-ir", "--target=x86_64-linux-gnu"});
+  } else if (component_ == "codegen") {
+    // codegen tests specify flags as needed.
   } else {
     CARBON_FATAL("Unexpected test component {0}: {1}", component_, test_name());
   }