mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-05 22:02:55 +01:00
If a test would still fail post-autoupdate due to either mismatched `fail_` prefix or due to being NOAUTOUPDATE, the test is reported as `?` instead of `.` in the incremental progress output, and a message is listed after the progress output describing the problem. For example: ```console Problems that require manual fixes: - `toolchain/check/testdata/basics/zz_prefix_probe.carbon` split `bad_missing_prefix.carbon` failed; if failure is expected, add the `fail_` prefix. - `toolchain/driver/testdata/fail_config.carbon` succeeded; if success is expected, remove the `fail_` prefix. ``` This change caused the `NOAUTOUPDATE` test `toolchain/driver/testdata/fail_config.carbon` to fail, because when run under autoupdate (or with `bazel run`), the install manifest would be present, and the test is checking that it's not. Fixed by using the VFS to look for the manifest, which then required fixing toolchain/driver:driver_test to set up a real filesystem VFS so that it *could* find the manifest. With this change, there should no longer be a reason to manually run file_test in addition to running autoupdate. Assisted-by: Claude via Antigravity
30 lines
1.4 KiB
Plaintext
30 lines
1.4 KiB
Plaintext
// 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: config --target=x86_64-unknown-linux-gnu
|
|
//
|
|
// NOAUTOUPDATE
|
|
// TIP: To test this file alone, run:
|
|
// TIP: bazel test //toolchain/testing:file_test --test_arg=--file_tests=toolchain/driver/testdata/fail_config.carbon
|
|
// TIP: To dump output, run:
|
|
// TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/driver/testdata/fail_config.carbon
|
|
|
|
// We don't include the digest in `file_test` to avoid unnecessary dependencies.
|
|
// CHECK:STDERR: error: unable to read the installation's digest file: {{.+}}
|
|
// CHECK:STDERR:
|
|
|
|
// The rest of the config should still be displayed.
|
|
//
|
|
// Note that the results here are not "portable", and depend on the `--target`
|
|
// argument above. We pass explicit targets to get predictable results in Bazel
|
|
// tests.
|
|
//
|
|
// CHECK:STDOUT: CLANG_INCLUDE_DIRS:
|
|
// CHECK:STDOUT: {{.*}}/toolchain/install/llvm/lib/clang/{{[^/]+}}/include
|
|
// CHECK:STDOUT: CLANG_RESOURCE_DIR: {{.*}}/toolchain/install/llvm/lib/clang/{{[^/]+}}
|
|
// CHECK:STDOUT: CLANG_SYSROOT: /
|
|
// CHECK:STDOUT: INSTALL_ROOT: {{.*}}/toolchain/install/
|
|
// CHECK:STDOUT: LLVM_BINDIR: {{.*}}/toolchain/install/llvm/bin
|
|
// CHECK:STDOUT: VERSION: {{[0-9]+}}.{{[0-9]+}}.{{[0-9]+}}-{{.+}}
|