• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

mbland / go-script-bash / 72
95%

Build:
DEFAULT BRANCH: master
Ran 14 Sep 2016 03:27PM UTC
Jobs 1
Files 6
Run time 1s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

pending completion
72

push

travis-ci

mbland
test, kcov: Run coverage only by default on Travis

Now, instead of having Travis run the test, then run them again, and ignore the
return status of `kcov`, this change should allow Travis to just perform the
coverage run and rely on the `kcov` exit status.

As explained in the comment for the `test: run coverage by default on Travis
Linux` test case:

This test also makes sure the invocation doesn't cause a second recursive call
to `run_kcov` thanks to the `_COVERAGE_RUN` variable.  Previously, seemingly
successful coverage runs (added in commit
4440832c2) were causing Travis failures,
ameliorated in commit cc284d11e. These were
due to the `run_kcov` getting called recursively and failing because the first
call already created the `tests/coverage` directory.

Here was the chain of events:

- Travis calls `./go test`.
- Test suite runs and succeeds.
- `"$?" -eq '0' && "$TRAVIS_OS_NAME" == 'linux'` condition met.
- `_test_coverage` and `run_kcov` executed.
- `run_kcov` creates `tests/coverage` and executes `kcov ./go test`.
  - Test suite runs and succeeds.
  - `"$?" -eq '0' && "$TRAVIS_OS_NAME" == 'linux'` condition met.
  - `_test_coverage` and `run_kcov` executed.
  - `run_kcov` fails because `tests/coverage` already exists.
- `kcov` sends coverage info to Coveralls, but exits with an error.
- Travis build reports failure.

With the `_COVERAGE_RUN` variable, the recursive call is now
short-circuited.

96 of 231 relevant lines covered (41.56%)

132.04 hits per line

Jobs
ID Job ID Ran Files Coverage
1 72.1 14 Sep 2016 03:27PM UTC 0
41.56
Travis Job 72.1
Source Files on build 72
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #72
  • 89c3b15a on github
  • Prev Build on master (#71)
  • Next Build on master (#73)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc