mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-09-28 08:10:10 +01:00
This narrows the scope of the CRC to try to get better behavior around mutex lock releasing on crash. Closes #5042. This breaks apart `ProcessTestFileAndRun` because we need to process the test file for `SET-CAPTURE-CONSOLE-OUTPUT`. The test file processing should more reliably not crash than the core `Run` logic though, so should be reasonably safe to put outside the CRC. Also support --threads=1 for disabling threading. This is the flipside for me of reducing how much is in the CRC: make it easier to run on a single thread if the CRC gets in the way of debugging. This also means a typical copy-paste execution of a single test will be single-threaded. --------- Co-authored-by: Geoff Romer <gromer@google.com>
21 lines
674 B
C++
21 lines
674 B
C++
// 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
|
|
|
|
#ifndef CARBON_TESTING_FILE_TEST_RUN_TEST_H_
|
|
#define CARBON_TESTING_FILE_TEST_RUN_TEST_H_
|
|
|
|
#include "common/error.h"
|
|
#include "testing/file_test/file_test_base.h"
|
|
#include "testing/file_test/test_file.h"
|
|
|
|
namespace Carbon::Testing {
|
|
|
|
// Runs the test, updating `test_file`.
|
|
auto RunTestFile(const FileTestBase& test_base, bool dump_output,
|
|
TestFile& test_file) -> ErrorOr<Success>;
|
|
|
|
} // namespace Carbon::Testing
|
|
|
|
#endif // CARBON_TESTING_FILE_TEST_RUN_TEST_H_
|