Skip to content

Fix code coverage of tests #1449

Closed as not planned
Closed as not planned

Description

@Croydon

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

Activity

  1. added a commit that references this issue on Feb 28, 2018
  2. rcjsuen commented on Feb 28, 2018

    @rcjsuen
    Member

    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.

  3. Croydon commented on Feb 28, 2018

    @Croydon
    ContributorAuthor

    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.

  4. JimiC commented on Feb 28, 2018

    @JimiC

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

  5. Croydon commented on Feb 28, 2018

    @Croydon
    ContributorAuthor
  6. Croydon commented on Feb 28, 2018

    @Croydon
    ContributorAuthor

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

  7. rcjsuen commented on Feb 28, 2018

    @rcjsuen
    Member

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

  8. JimiC commented on Feb 28, 2018

    @JimiC

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

  9. Croydon commented on Feb 28, 2018

    @Croydon
    ContributorAuthor

    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.

  10. JimiC commented on Feb 28, 2018

    @JimiC

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

  11. changed the title [-]Fix tests[/-] [+]Fix code coverage of tests[/+] on Feb 28, 2018
  12. rcjsuen commented on Mar 26, 2018

    @rcjsuen
    Member

    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".

  13. Croydon commented on Jun 20, 2024

    @Croydon
    ContributorAuthor

    Closing due to inactivity. If any active maintainer is interested in this, then please create a new issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions