Skip to content

Ensure that the coverage module is installed if coverage is enabled - #4790

Merged
blag merged 2 commits into
masterfrom
ci-install-coverage
Sep 13, 2019
Merged

Ensure that the coverage module is installed if coverage is enabled#4790
blag merged 2 commits into
masterfrom
ci-install-coverage

Conversation

@blag

@blag blag commented Sep 13, 2019

Copy link
Copy Markdown
Contributor

The pack CI Makefile runs the st2-run-pack-tests script install the coverage module if the coverage flag is passed.

Previously, if the script was run with the -c and -j flags (with coverage and just run the tests), the script would skip the section that installs the coverage module. Luckily, nose is smart enough to still run tests without coverage, but when it reports that the coverage module isn't installed, it logs it as an error:

nose.plugins.cover: ERROR: Coverage not available: unable to import coverage module

This erroneous reporting can become a troubleshooting rabbit hole when pack CIs fail.

This PR ensures that at least the coverage module is installed if the -c (run tests with coverage) flag is passed into the script, whether or not the -j (just tests) flag is passed in.

@pull-request-size pull-request-size Bot added the size/S PR that changes 10-29 lines. Very easy to review. label Sep 13, 2019
@blag
blag requested a review from Kami September 13, 2019 03:26
@blag blag modified the milestones: 3.1.1, 3.2.0 Sep 13, 2019
@blag
blag merged commit 27e6246 into master Sep 13, 2019
@blag
blag deleted the ci-install-coverage branch September 13, 2019 21:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

complexity:easy infrastructure: ci/cd packs size/S PR that changes 10-29 lines. Very easy to review. tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants