class Runner
Defined at line 125 of file ../../zircon/system/ulib/zxtest/include/zxtest/base/runner.h
This class is the entry point for test and constructs registration.
Public Members
static Options kDefaultOptions
Public Methods
void Runner (Reporter && reporter)
Defined at line 63 of file ../../zircon/system/ulib/zxtest/runner.cc
void ~Runner ()
Defined at line 67 of file ../../zircon/system/ulib/zxtest/runner.cc
int Run (const Options & options)
Runs the registered tests with the specified |options|.
Defined at line 103 of file ../../zircon/system/ulib/zxtest/runner.cc
void List (const Options & options)
List tests according to options.
Defined at line 155 of file ../../zircon/system/ulib/zxtest/runner.cc
void Runner ()
Defined at line 170 of file ../../zircon/system/ulib/zxtest/include/zxtest/base/runner.h
void Runner (const Runner & )
Defined at line 172 of file ../../zircon/system/ulib/zxtest/include/zxtest/base/runner.h
void Runner (Runner && )
Defined at line 173 of file ../../zircon/system/ulib/zxtest/include/zxtest/base/runner.h
Runner & operator= (const Runner & )
Defined at line 176 of file ../../zircon/system/ulib/zxtest/include/zxtest/base/runner.h
Runner & operator= (Runner && )
Defined at line 177 of file ../../zircon/system/ulib/zxtest/include/zxtest/base/runner.h
template <typename TestBase, typename TestImpl>
TestRef RegisterTest (std::string_viewtest_case_name,std::string_viewtest_name,const char *filename,intline)
Register a test for execution with the default factory.
Defined at line 181 of file ../../zircon/system/ulib/zxtest/include/zxtest/base/runner.h
template <typename TestBase, typename TestImpl>
TestRef RegisterTest (std::string_viewtest_case_name,std::string_viewtest_name,const char *filename,intline,internal::TestFactoryfactory)
Register a test for execution with a customized factory.
Defined at line 189 of file ../../zircon/system/ulib/zxtest/include/zxtest/base/runner.h
template <typename SuiteClass>
bool AddParameterizedTest (std::unique_ptr<internal::AddTestDelegate>delegate,std::string_viewsuite_name,std::string_viewtest_name,const SourceLocation &location)
Defined at line 199 of file ../../zircon/system/ulib/zxtest/include/zxtest/base/runner.h
template <typename SuiteClass, typename ParamType>
bool AddInstantiation (std::unique_ptr<internal::AddInstantiationDelegate<ParamType>>delegate,std::string_viewinstantiation_name,const SourceLocation &location,zxtest::internal::ValueProvider<ParamType> &provider,std::function<std::string (zxtest::TestParamInfo<ParamType>)>name_fn)
Defined at line 221 of file ../../zircon/system/ulib/zxtest/include/zxtest/base/runner.h
Runner * GetInstance ()
Returns process shared |Runner| instance.
Defined at line 237 of file ../../zircon/system/ulib/zxtest/runner.cc
void NotifyAssertion (const Assertion & assertion)
Provides an entry point for assertions. The runner will propagate the assertion to the
interested parties. This is needed in a global scope, because helper methods do not have
access to a |Test| instance and legacy tests are not part of a Fixture, but wrapped by one.
If this is called without any test running, it will have no effect.
Defined at line 228 of file ../../zircon/system/ulib/zxtest/runner.cc
void SkipCurrent (const Message & message)
Tells the runner to skip the current test. The runner will propagate the message to
interested parties. See NotifyAssertion above for more explanation as to why this is in
global scope.
Defined at line 232 of file ../../zircon/system/ulib/zxtest/runner.cc
const RunnerSummary & summary ()
Defined at line 247 of file ../../zircon/system/ulib/zxtest/include/zxtest/base/runner.h
const TestInfo & GetTestInfo (const TestRef & test_ref)
Defined at line 249 of file ../../zircon/system/ulib/zxtest/include/zxtest/base/runner.h
void AddGlobalTestEnvironment (std::unique_ptr<Environment> environment)
Adds an environment to be set up and tear down for each iteration.
Defined at line 254 of file ../../zircon/system/ulib/zxtest/include/zxtest/base/runner.h
bool IsSkipped ()
Returns true if the current test is skipped.
Defined at line 270 of file ../../zircon/system/ulib/zxtest/include/zxtest/base/runner.h
bool CurrentTestHasFatalFailures ()
Returns true if the current test should be aborted. This happens as a result of a fatal
failure.
Defined at line 274 of file ../../zircon/system/ulib/zxtest/include/zxtest/base/runner.h
bool CurrentTestHasFailures ()
Returns whether the current test has experienced any type of failure.
Defined at line 277 of file ../../zircon/system/ulib/zxtest/include/zxtest/base/runner.h
int random_seed ()
Defined at line 279 of file ../../zircon/system/ulib/zxtest/include/zxtest/base/runner.h
void AddObserver (LifecycleObserver * observer)
Defined at line 281 of file ../../zircon/system/ulib/zxtest/include/zxtest/base/runner.h
const Options & options ()
Set of options currently in use. By default |Runner::kDefaultOptions| will be returned.
Defined at line 284 of file ../../zircon/system/ulib/zxtest/include/zxtest/base/runner.h
void NotifyFatalError ()
Notify the runner that the test is in a bad state, and should attempt to exit. This means
end test execution.
Defined at line 288 of file ../../zircon/system/ulib/zxtest/include/zxtest/base/runner.h
Reporter * mutable_reporter ()
Returns a pointer to the |LogSink| where the |reporter_| is running to.
Defined at line 291 of file ../../zircon/system/ulib/zxtest/include/zxtest/base/runner.h
bool IsRunning ()
Returns true if the runner is currently executing tests.
Defined at line 294 of file ../../zircon/system/ulib/zxtest/include/zxtest/base/runner.h
void EnableAsserts ()
Defined at line 296 of file ../../zircon/system/ulib/zxtest/include/zxtest/base/runner.h
void DisableAsserts ()
Defined at line 297 of file ../../zircon/system/ulib/zxtest/include/zxtest/base/runner.h
void PushTrace (zxtest::Message * trace)
Defined at line 299 of file ../../zircon/system/ulib/zxtest/include/zxtest/base/runner.h
void PopTrace ()
Defined at line 300 of file ../../zircon/system/ulib/zxtest/include/zxtest/base/runner.h
std::span<zxtest::Message *> GetScopedTraces ()
Defined at line 302 of file ../../zircon/system/ulib/zxtest/include/zxtest/base/runner.h
Records
Friends
class RunnerTestPeer