Repository navigation
feat(ct,eunit): collect coverage on Windows and only when coverage is enabled - #21
Open
TrapsterDK wants to merge 1 commit into
Open
TrapsterDK wants to merge 1 commit into
TrapsterDK wants to merge 1 commit into
Conversation
… enabled Assisted-by: Claude
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #20
The bash scripts of
ct_testandeunitstart cover when theCOVERAGEenvironment variable is set. They now also checkctx.configuration.coverage_enabled, which is rendered into the script as{coverage}. A strayCOVERAGEin the environment no longer starts cover or callscoverdata_to_lcov, whose runfiles are only added when coverage is on.The Windows scripts get the same cover steps as the bash ones:
eunit: when coverage is on, cover-compiles the app ebin dirs beforeeunit:test, exports cover data toCOVERAGE_OUTPUT_FILEafterwards, then runscoverdata_to_lcov. The dirs and the output path are passed as-cover_dirsand-cover_outand read back withinit:get_argument.ct_test: writes act.cover.spec(incl_app,incl_dirs,export) intoTEST_UNDECLARED_OUTPUTS_DIR, passes it with-cover, and runscoverdata_to_lcovafterct_runsucceeds. Paths inside the spec use forward slashes. A failingct_runstill returns its exit code first.Without coverage, the generated Windows scripts run the same commands as before.
Tests: the repo's CI is Linux only and has no coverage test, so there is none for this. I could not run the Windows scripts here (no Erlang on the machine).
Assisted by Claude.