The Wayback Machine - https://web.archive.org/web/20200916184655/https://github.com/nodegit/nodegit/issues/1449
Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix code coverage of tests #1449

Open
Croydon opened this issue Feb 28, 2018 · 10 comments
Open

Fix code coverage of tests #1449

Croydon opened this issue Feb 28, 2018 · 10 comments
Labels

Comments

@Croydon
Copy link
Contributor

@Croydon Croydon commented Feb 28, 2018

Tests weren't run in the CI for some time. Therefore the failure of the tests were hidden.

I changed stuff in #1447 so they would get executed and disabled them temporary (in a visible, easy to switch way) due to the failure.

Eventually they should get fixed and enabled again.

https://travis-ci.org/inexorgame/nodegit/jobs/347256998#L9041

Croydon added a commit to Croydon/nodegit that referenced this issue Feb 28, 2018
See issue nodegit#1449
@rcjsuen
Copy link
Member

@rcjsuen rcjsuen commented Feb 28, 2018

Tests weren't run in the CI for some time. Therefore the failure of the tests were hidden.

I don't understand what you mean, @Croydon. If I look at nodegit/nodegit's build #3076 for instance, the tests appear to have been run. You can scroll to the bottom of a log file and see output from Mocha in it.

@Croydon
Copy link
Contributor Author

@Croydon Croydon commented Feb 28, 2018

Yes, npm test works and gets always executed in every single Travis job.

These tests don't get execute in master currently:

travis_retry npm test && npm run cov && npm run coveralls;

and they fail.

@JimiC
Copy link

@JimiC JimiC commented Feb 28, 2018

@rcjsuen @Croydon means the release coverage tests are failing. I'm already working with Croydon to have the travis config setup with stages.

@Croydon
Copy link
Contributor Author

@Croydon Croydon commented Feb 28, 2018

@Croydon
Copy link
Contributor Author

@Croydon Croydon commented Feb 28, 2018

@JimiC My pull request already contains stages and they just bring in more structure.
Stages don't solve the test failure.

@rcjsuen
Copy link
Member

@rcjsuen rcjsuen commented Feb 28, 2018

@Croydon Okay. I think what you mean is that the code coverage isn't being run, correct?

@JimiC
Copy link

@JimiC JimiC commented Feb 28, 2018

Yes.And if someone can tell me what before_script is all about, I'll be able to submit my travis config proposal.

@Croydon
Copy link
Contributor Author

@Croydon Croydon commented Feb 28, 2018

No. It fails when it runs. (And master never runs coverage tests, so this problem is hidden right now)

I have fixed it within my pull requests, that coverages tests get executed when you switch the variable EXTENDED_TESTING to true. My last commit disabled coverage tests execution, so we can merge it now for better documentation.

No regression in testing between master and my pull request.
Improvements in documentation, building always for the latest Node minor versions and simplification in the .travis.yml file, visibility when and if coverages tests are getting executed.

Fixing tests are a follow up task, therefore this issue.

@JimiC
Copy link

@JimiC JimiC commented Feb 28, 2018

@Croydon Notice #1402 (comment) as we discussed that it may be prudent to build docs only on release for the moment.

@rcjsuen rcjsuen changed the title Fix tests Fix code coverage of tests Feb 28, 2018
@rcjsuen rcjsuen added the Build label Feb 28, 2018
@rcjsuen
Copy link
Member

@rcjsuen rcjsuen commented Mar 26, 2018

I think the last time code coverage for the C++ files were run was in Travis CI build #2741. We can see mention of this at the bottom of its log file.

...
Processing file src/commit.cc
Processing file src/revert.cc
Processing file src/odb.cc
Processing file src/transfer_progress.cc
Processing file src/signature.cc
Processing file src/proxy_options.cc
Processing file src/clone.cc
Processing file src/index_time.cc
Processing file src/cert_x509.cc
Processing file src/functions/sleep_for_ms.cc
Processing file src/functions/copy.cc
Processing file utils/execPromise.js
Writing directory view page.
Overall coverage rate:
  lines......: 39.6% (11417 of 28816 lines)
  functions..: no data found
  branches...: 71.9% (305 of 424 branches)

> [secure]@0.16.0 coveralls /home/travis/build/[secure]/[secure]
> cat ./test/coverage/merged.lcov | coveralls

This was then mistakenly "disabled" by 1269fd7 because the coverage tests were then set to run if $NODE_VERSION == "6". This condition never resolved to true because of NODE_VERSION="6.5".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.