qiBuild documentation

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

Test Runner

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.

test_results_dir

Tets Result Dir

perf_results_dir

Perf Result Dir

num_cpus

Number of CPUs

valgrind

Valgrind

coverage

Coverage

ProcessTestLauncher

class qibuild.test_runner.ProcessTestLauncher(project_runner)

Implements TestLauncher using qisys.command.Process.

valgrind_log(test)

Valgind Log

test_out(test)

Test Out

perf_out(test)

Perf Out

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.

static get_message(process, timeout=None)

Human readable string describing the state of the process.