qibuild.test_runner – Running tests from a C++ project

ProjectTestRunner

class qibuild.test_runner.ProjectTestRunner(project)

Implements TestSuiteRunner for a qibuild/cmake project

perf

Whether we should run performance tests

nightly

Whether we should run nightly tests

nightmare

Sets GTEST_REPEAT=20 and GTEST_SHUFFLE=1

valgrind

Run with valgrind and make the tests fail if there are memory leaks or file descriptor leaks

num_cpus

Assigns the given number of CPUS for each test. Useful to trigger race conditions. For instance, with a machine with 8 CPUs you could run

qitest run --ncpu=2 -j4
launcher

Implements TestSuiteRunner.launcher

ProcessTestLauncher

class qibuild.test_runner.ProcessTestLauncher(project_runner)

Implements TestLauncher using qisys.command.Process

launch(test)

Implements qitest.runner.TestLauncher.launch()

Also make sure a Junit-like XML file is always written, even if the test did not produce any XML file on its own or crashed before being able to write one.

get_message(process, timeout=None)

Human readable string describing the state of the process