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

pantsbuild / pants / 4951 / 3
0%
main: 93%

Build:
Build:
LAST BUILD BRANCH: dk-uv-selective-sync
DEFAULT BRANCH: main
Ran 19 May 2015 09:29PM UTC
Files 325
Run time 21min
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

19 May 2015 08:52PM UTC coverage: 65.066%. First build
CI_FLAGS="-fkmsrcn -u 1/2 'Unit tests for pants and pants-plugins - shard 2'"

push

travis-ci

jsirois
Add support for python test sharding.

The option follows the format of the similar option in the junit-runner
and the sharding happens at the finest-grained test function/method
level.

Use this new feature to replace the target-level sharding implemented
in the ci.sh script.

Testing Done:
Locally verified the script changes with:
```console
$ CXX=g++ ./build-support/bin/ci.sh -u 0/10 -i 0/10
```

Also did a look and feel on the console for sharded vs non output.

Non-sharded:
```console
$ pants.dev test.pytest --shard=0/1 tests/python/pants_test/backend/python/tasks:
...
02:40:29 00:00     [pytest]
02:40:29 00:00       [run]
                     ============== test session starts ===============
                     platform linux2 -- Python 2.7.8 -- py-1.4.27 -- pytest-2.6.4
                     plugins: timeout, cov
                     collected 46 items

                     tests/python/pants_test/backend/python/tasks/test_setup_py.py .............
                     tests/python/pants_test/backend/python/tasks/test_pytest_run.py .............
                     tests/python/pants_test/backend/python/tasks/test_python_repl.py .......
                     tests/python/pants_test/backend/python/tasks/test_python_eval.py .............

                     ===== 46 passed, 1 warnings in 49.38 seconds =====
```

Sharded - note extra test session header lines explaining the shard:
```console
$ pants.dev test.pytest --shard=0/2 tests/python/pants_test/backend/python/tasks:
...
02:38:08 00:00     [pytest]
02:38:08 00:00       [run]
                     ============== test session starts ===============
                     platform linux2 -- Python 2.7.8 -- py-1.4.27 -- pytest-2.6.4
                     shard: 0 of 2 (0-based shard numbering)
                     plugins: timeout, cov
                     collected 46 items
                     Only executing 23 of 46 total tests in shard 0 of 2

                     tests/python/pants_test/backend/python/tasks/test_setup_py.py .......
                     tests/python/pants_test/backend/python/tasks/test_pytest_run.py ......
                     tests/python/pants_test/backend/python/tasks/test_python_repl.py ....
                     tests/python/pants_test/backend/python/tasks/test_python_eval.py ......

                     ===== 23 passed, 1 warnings in 39.47 seconds =====

$ pants.dev test.pytest --shard=1/2 tests/python/pants_test/backend/python/tasks:
...
02:39:13 00:03     [pytest]
02:39:13 00:03       [run]
                     ============== test session starts ===============
                     platform linux2 -- Python 2.7.8 -- py-1.4.27 -- pytest-2.6.4
                     shard: 1 of 2 (0-based shard numbering)
                     plugins: timeout, cov
                     collected 46 items
                     Only executing 23 of 46 total tests in shard 1 of 2

                     tests/python/pants_test/backend/python/tasks/test_setup_py.py ......
                     tests/python/pants_test/backend/python/tasks/test_pytest_run.py .......
                     tests/python/pants_test/backend/python/tasks/test_python_repl.py ...
                     tests/python/pants_test/backend/python/tasks/test_python_eval.py .......

                     ===== 23 passed, 1 warnings in 25.95 seconds =====
```

And a manual OSX CI launched with:
```console
$ cp .travis.osx.yml .travis.yml && \
  git commit -am 'Manual OSX CI.' && \
  git push -f git@github.com:pantsbuild/pants-for-travis-osx-ci.git HEAD:master && \
  git reset --hard HEAD~1
```
...went green here:
  https://travis-ci.org/pantsbuild/pants-for-travis-osx-ci/builds/63141484

Finally, linux CI went green here:
  https://travis-ci.org/pantsbuild/pants/builds/63232758

Bugs closed: 1569

Reviewed at https://rbcommons.com/s/twitter/r/2243/

12667 of 19468 relevant lines covered (65.07%)

0.65 hits per line

Source Files on job 4951.3 (CI_FLAGS="-fkmsrcn -u 1/2 'Unit tests for pants and pants-plugins - shard 2'")
  • Tree
  • List 0
  • Changed 0
  • Source Changed 0
  • Coverage Changed 0
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 4951
  • Travis Job 4951.3
  • d1aa2f11 on github
  • Next Job for CI_FLAGS="-fkmsrcn -u 1/2 'Unit tests for pants and pants-plugins - shard 2'" on master (#4960.3)
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