qibuild.ctest – Implementation of CTest in Python

Re-implementation of CTest in Python.

Necessary to by-pass some small ctest shortcomings.

qibuild.ctest.run_tests

qibuild.ctest.run_tests(project, build_env, test_name=None)

Called by qibuild.toc.Toc.test_project()

Parameters:test_name – If given, only run this test

Always write some XML files in build-test/results (even if they were no tests to run at all)

Returns:(ok, summary) where ok is True if all test passed, and summary is a nice summary of what happened:
ran 10 tests, 2 failures:
    * test_foo
    * test_bar

qibuild.ctest.run_test

qibuild.ctest.run_test(build_dir, test_name, cmd, properties, build_env)

Run a test.

Returns:(res, output) where res is a string describing wether the test was sucessul, and output is the output of the test