Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • B buck
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 201
    • Issues 201
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 22
    • Merge requests 22
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Meta
  • buck
  • Merge requests
  • !1471

Add support for splitting large jvm based test suites

  • Review changes

  • Download
  • Email patches
  • Plain diff
Closed Administrator requested to merge github/fork/kageiit/test_splitting into master Aug 21, 2017
  • Overview 1
  • Commits 1
  • Pipelines 0
  • Changes 7

Created by: kageiit

This adds support for splitting up jvm test suites with a large number of tests.

This can be used effectively on CI/machines with a lot of cores to run an existing large test suite in parallel by bucketing the test classes evenly. We have seen our test suite speedup from 1 hour down to 20 min by using this change.

This change usually accompanies a definition like

test_bucket_size = 200


original_java_test = java_test
def java_test(
    name,
    srcs=[],
    **kwargs
    ):
  splits = (len(srcs) + test_bucket_size - 1) / test_bucket_size
  if splits > 1:
    for part in xrange(splits):
      n_name = name if part == 0 else '{}_{}'.format(name, part + 1)
      original_java_test(
        name=n_name,
        srcs=srcs,
        splits=splits,
        part=part+1,
        **kwargs
      )

When running on CI

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: github/fork/kageiit/test_splitting