The Gerrit Code Review system is used by the Android Open Source Project and commercial vendors to manage contributions to Android source code repositories.

Gerrit is also used for non-Android projects and provides a systematic process for evaluating and approving source code changes before they are committed.

Gerrit provides facilities to park changes until they are approved by appropriate engineers. Engineers are notified of a change (or they sign into the Gerrit server to find new changes) and must decide if the change should be accepted into the code base. This process is typically implemented by manual code review and/or pulling changes into a local workspace, building the changes, and running some tests.

  • The ElectricFlow Gerrit plugin simplifies the build/test approval process. The goal is to run tests automatically before the reviewer looks at the change, although a setting is available to run builds on demand only.
  • The plugin works closely with Gerrit by adding links to run builds and to finished builds directly in Gerrit change comments.
  • ElectricFlow can also act as a reviewer by automatically setting a Gerrit category to a value based on the build success or failure.
  • The plugin communicates with the Gerrit server to retrieve information about the change, including the commands used to pull down files in a patch set.
  • First, a full repository is initialized to the head of a specified branch. Second, changes submitted to Gerrit (adds/deletes/modifies) are overlaid. Third, a build you create is run. This build can do whatever you need from running a simple “make” to running complicated automatic test suites involving physical hardware.
  • You decide what determines test success or failure and ElectricFlow annotates Gerrit with your build results.