qiBuild documentation

qitest.test_queue – Coordinating test launchers

QiBuild

TestQueue

class qitest.test_queue.TestQueue(tests)

A class able to run tests in parallel

run(num_jobs=1, repeat_until_fail=0)

Run all the tests

summary()

Display the tests results. Called at the end of self.run() Sets self.ok

sigint_handler(*_args)

Called when user press ctr+c during the test suite * Tell qisys.command to kill every process still running * Tell the tests_queue that is has been interrupted, and

stop all the test workers
  • Setup a second sigint for when killing process failed
write_failures(failures)

Write Failures

TestWorker

class qitest.test_queue.TestWorker(queue, worker_index)

Implementation of a ‘worker’ thread. It will consume the test queue, running the tests and logging the results

stop()

Tell the worker it should stop trying to read items from the queue

run()

Run

static message_for_exception(exception)

Message For Exception

TestLogger

class qitest.test_queue.TestLogger(tests)

Small class used to print what is going on during tests, using a mutex so that outputs are not mixed up

on_start(test, index)

Called when a test starts

on_completed(test, index, message)

Called when a test is over