baf3ced0c3
There's a few things going on here Firstly, we need to install coverage tool in test-requirements Secondly, .testr.conf has to use PYTHON because the coverage report works by resetting PYTHON='coverage run ...' Thirdly, because we call ourselves diskimage-builder but the python module is diskimage_builder that seems to confuse things. We need to use "setup.py test" (note, that is different to "setup.py testr"!) to use the PBR testr wrapper. That exposes a --coverage-package-name argument that calls the coverage tool with the right argument. With this I got a coverage report for our unit tests Change-Id: I9012e18eb7d01bee035140e70afa76c47c27eb01
11 lines
404 B
Plaintext
11 lines
404 B
Plaintext
[DEFAULT]
|
|
test_command=OS_STDOUT_CAPTURE=${OS_STDOUT_CAPTURE:-1} \
|
|
OS_STDERR_CAPTURE=${OS_STDERR_CAPTURE:-1} \
|
|
OS_LOG_CAPTURE=${OS_LOG_CAPTURE:-1} \
|
|
OS_TEST_TIMEOUT=${OS_TEST_TIMEOUT:-60} \
|
|
OS_DEBUG=${OS_DEBUG:-0} \
|
|
${PYTHON:-python} -m subunit.run discover . $LISTOPT $IDOPTION
|
|
test_id_option=--load-list $IDFILE
|
|
test_list_option=--list
|
|
|