Skip to content

pcov.directory autodetection#1499

Merged
sanmai merged 3 commits intoinfection:masterfrom
sanmai:pr/pcov-directory-auto
Mar 21, 2021
Merged

pcov.directory autodetection#1499
sanmai merged 3 commits intoinfection:masterfrom
sanmai:pr/pcov-directory-auto

Conversation

@sanmai
Copy link
Member

@sanmai sanmai commented Mar 19, 2021

This PR:

Note an E2E tests that files on current Infection: f25532a

When pcov.directory is left unset, PCOV will attempt to find src, lib or, app in the current working directory, in that order.

If PCOV sees any of the directories, and if it wasn't told otherwise, it would just use first of them.

E.g. if a project has both lib a and app, only the first fill be used for coverage, and the other will have 0% coverage. We work around this by forcing not-so-clever default value of . i.e. current working directory if we don't see pcov.directory set to something more specific.

Future step would be to set pcov.directory to a specific value inferred from the configuration.

@sanmai sanmai force-pushed the pr/pcov-directory-auto branch from 9b8400a to 28e0f5f Compare March 19, 2021 12:06
@sanmai sanmai force-pushed the pr/pcov-directory-auto branch from 28e0f5f to f25532a Compare March 19, 2021 12:13
@sanmai sanmai force-pushed the pr/pcov-directory-auto branch 3 times, most recently from c07c7cb to 7f9e028 Compare March 19, 2021 17:10
@sanmai sanmai enabled auto-merge (squash) March 19, 2021 17:16
@sanmai sanmai requested a review from maks-rafalko March 19, 2021 17:21
@sanmai sanmai changed the title Test case for missing pcov.directory pcov.directory autodetection Mar 19, 2021
Copy link
Member

@maks-rafalko maks-rafalko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👌

@sanmai sanmai merged commit 4a222a2 into infection:master Mar 21, 2021
@maks-rafalko maks-rafalko added this to the 0.22.0 milestone Mar 21, 2021
@sanmai sanmai deleted the pr/pcov-directory-auto branch March 21, 2021 22:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

It would be nice if Infection warned that none of the set up directories are covered by the configured pcov

2 participants

Comments