Don't Fail with Coverage Combine - aka, 4.3 Broke All Our Builds

Issue #548 resolved
created an issue

The changes in 4.3 to fail (return -1) if there are no coverage files to append broke all of our builds. We needed that to success for our Travis + Coveralls set up. Now we are forced to peg at 4.2. Fails here:

Please add a '--no-strict' or similar so we don't need to do this.

Comments (9)

  1. Ned Batchelder repo owner

    Help me understand your situation: why are you running "coverage combine" if you have no data files to combine? Another solution is to ignore the exit status in your .travis.yml file:

    - coverage combine --append || true
  2. Miserlou reporter

    The tests run in parallel, so I assume whichever finishes first is dying with -1. I am not sure how Travis is doing that under the hood. This is the travis yaml:

    language: python
      - "2.7"
    # command to install dependencies
      - pip
      - "pip install setuptools --upgrade; pip install -r test_requirements.txt; pip install -e git+; python install" 
    # command to run tests
      - TESTCASE=tests/
      - TESTCASE=tests/
      - TESTCASE=tests/
      - TESTCASE=tests/
      - nosetests $TESTCASE --with-coverage --cover-package=zappa --with-timer
      - coverage combine --append
  3. Loic Dachary

    @Miserlou my understanding is that travis-ci runs a different test for each line in env (i.e. etc.) and each run in a different directory so they cannot share the result of the test and coverage combine will always fail.

    The call to coveralls ( not sure which one is used ) uploads to which combines the result (the server code is not available to verify that but it makes sense to me) if the SHA1 of the commit are identical.

    If this theory is right, removing the coverage combine line should work. What do you say ?

  4. Miserlou reporter

    The problem with that is then they're all submitted independently, so that misrepresents our coverage amount. It says 17, then 60, then 20 (or whatever.) It rests at the last-submitted value, not at the combined value.

  5. Log in to comment