mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-05 11:21:05 +01:00
Allow args, includes, and splits in file_test includes (#5610)
This builds a mechanism for the toolchain to construct more complex
min_prelude files, which in turn should allow the toolchain to stop
special-casing the min_prelude directory. For example, instead of:
```
args.insert(args.end(), {"--custom-core",
"--exclude-dump-file-prefix=include_files/"});
```
This should allow (in a `min_prelude` file):
```
// EXTRA-ARGS: --custom-core --exclude-dump-file-prefix=include_files/
```
Then when that min_prelude is included, it'd be used.
But also, this should allow sharing between min_prelude files with use
of `INCLUDE-FILE`, which as we make progressively more complex
min_preludes might become useful.
This commit is contained in:
@@ -102,8 +102,8 @@ auto RunTestFile(const FileTestBase& test_base, bool dump_output,
|
||||
// Process arguments.
|
||||
if (test_file.test_args.empty()) {
|
||||
test_file.test_args = test_base.GetDefaultArgs();
|
||||
test_file.test_args.append(test_file.extra_args);
|
||||
}
|
||||
test_file.test_args.append(test_file.extra_args);
|
||||
CARBON_RETURN_IF_ERROR(DoArgReplacements(
|
||||
test_file.test_args, test_base.GetArgReplacements(), all_splits));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user