Files
carbon-lang/testing/file_test/run_test.h
T
Jon Ross-Perkins 3d6f14fca5 Refactor FileTestBase to split logic between multiple files (#4968)
I'm refactoring logic to try to make these files more manageable,
particularly as I'm looking at ways to use more threads. I'm renaming
FileTestBase::TestContext to TestFile and FileTestBase::TestFile to
TestFile::Split to try to be more consistent in how we talk about test
files and file splits in general. This change is not expected to change
any behavior, it's just refactoring.

This PR has two commits:

- Copying files for viewing deltas in GH
- Moving logic

The delta of the two commits is the main PR. The second commit can be
viewed on its own to see the delta versus file_test_base.* files where
the logic currently rests (there's still a reordering in run_test.cpp as
part of making one function static).
2025-02-18 17:10:23 +00:00

23 lines
774 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 {
// Processes the test file and runs the test. Returns an error if something
// went wrong.
auto ProcessTestFileAndRun(FileTestBase* test_base, std::mutex* output_mutex,
bool dump_output, bool running_autoupdate)
-> ErrorOr<TestFile>;
} // namespace Carbon::Testing
#endif // CARBON_TESTING_FILE_TEST_RUN_TEST_H_