Blame googletest/docs/DevGuide.md

Packit bd1cd8
Packit bd1cd8
Packit bd1cd8
If you are interested in understanding the internals of Google Test,
Packit bd1cd8
building from source, or contributing ideas or modifications to the
Packit bd1cd8
project, then this document is for you.
Packit bd1cd8
Packit bd1cd8
# Introduction #
Packit bd1cd8
Packit bd1cd8
First, let's give you some background of the project.
Packit bd1cd8
Packit bd1cd8
## Licensing ##
Packit bd1cd8
Packit bd1cd8
All Google Test source and pre-built packages are provided under the [New BSD License](http://www.opensource.org/licenses/bsd-license.php).
Packit bd1cd8
Packit bd1cd8
## The Google Test Community ##
Packit bd1cd8
Packit bd1cd8
The Google Test community exists primarily through the [discussion group](http://groups.google.com/group/googletestframework) and the GitHub repository.
Packit bd1cd8
You are definitely encouraged to contribute to the
Packit bd1cd8
discussion and you can also help us to keep the effectiveness of the
Packit bd1cd8
group high by following and promoting the guidelines listed here.
Packit bd1cd8
Packit bd1cd8
### Please Be Friendly ###
Packit bd1cd8
Packit bd1cd8
Showing courtesy and respect to others is a vital part of the Google
Packit bd1cd8
culture, and we strongly encourage everyone participating in Google
Packit bd1cd8
Test development to join us in accepting nothing less. Of course,
Packit bd1cd8
being courteous is not the same as failing to constructively disagree
Packit bd1cd8
with each other, but it does mean that we should be respectful of each
Packit bd1cd8
other when enumerating the 42 technical reasons that a particular
Packit bd1cd8
proposal may not be the best choice. There's never a reason to be
Packit bd1cd8
antagonistic or dismissive toward anyone who is sincerely trying to
Packit bd1cd8
contribute to a discussion.
Packit bd1cd8
Packit bd1cd8
Sure, C++ testing is serious business and all that, but it's also
Packit bd1cd8
a lot of fun. Let's keep it that way. Let's strive to be one of the
Packit bd1cd8
friendliest communities in all of open source.
Packit bd1cd8
Packit bd1cd8
As always, discuss Google Test in the official GoogleTest discussion group.
Packit bd1cd8
You don't have to actually submit code in order to sign up. Your participation
Packit bd1cd8
itself is a valuable contribution.
Packit bd1cd8
Packit bd1cd8
# Working with the Code #
Packit bd1cd8
Packit bd1cd8
If you want to get your hands dirty with the code inside Google Test,
Packit bd1cd8
this is the section for you.
Packit bd1cd8
Packit bd1cd8
## Compiling from Source ##
Packit bd1cd8
Packit bd1cd8
Once you check out the code, you can find instructions on how to
Packit bd1cd8
compile it in the [README](../README.md) file.
Packit bd1cd8
Packit bd1cd8
## Testing ##
Packit bd1cd8
Packit bd1cd8
A testing framework is of no good if itself is not thoroughly tested.
Packit bd1cd8
Tests should be written for any new code, and changes should be
Packit bd1cd8
verified to not break existing tests before they are submitted for
Packit bd1cd8
review. To perform the tests, follow the instructions in
Packit bd1cd8
[README](../README.md) and verify that there are no failures.
Packit bd1cd8
Packit bd1cd8
# Contributing Code #
Packit bd1cd8
Packit bd1cd8
We are excited that Google Test is now open source, and hope to get
Packit bd1cd8
great patches from the community. Before you fire up your favorite IDE
Packit bd1cd8
and begin hammering away at that new feature, though, please take the
Packit bd1cd8
time to read this section and understand the process. While it seems
Packit bd1cd8
rigorous, we want to keep a high standard of quality in the code
Packit bd1cd8
base.
Packit bd1cd8
Packit bd1cd8
## Contributor License Agreements ##
Packit bd1cd8
Packit bd1cd8
You must sign a Contributor License Agreement (CLA) before we can
Packit bd1cd8
accept any code.  The CLA protects you and us.
Packit bd1cd8
Packit bd1cd8
  * If you are an individual writing original source code and you're sure you own the intellectual property, then you'll need to sign an [individual CLA](http://code.google.com/legal/individual-cla-v1.0.html).
Packit bd1cd8
  * If you work for a company that wants to allow you to contribute your work to Google Test, then you'll need to sign a [corporate CLA](http://code.google.com/legal/corporate-cla-v1.0.html).
Packit bd1cd8
Packit bd1cd8
Follow either of the two links above to access the appropriate CLA and
Packit bd1cd8
instructions for how to sign and return it.
Packit bd1cd8
Packit bd1cd8
## Coding Style ##
Packit bd1cd8
Packit bd1cd8
To keep the source consistent, readable, diffable and easy to merge,
Packit bd1cd8
we use a fairly rigid coding style, as defined by the [google-styleguide](http://code.google.com/p/google-styleguide/) project.  All patches will be expected
Packit bd1cd8
to conform to the style outlined [here](http://google-styleguide.googlecode.com/svn/trunk/cppguide.xml).
Packit bd1cd8
Packit bd1cd8
## Updating Generated Code ##
Packit bd1cd8
Packit bd1cd8
Some of Google Test's source files are generated by the Pump tool (a
Packit bd1cd8
Python script).  If you need to update such files, please modify the
Packit bd1cd8
source (`foo.h.pump`) and re-generate the C++ file using Pump.  You
Packit bd1cd8
can read the PumpManual for details.
Packit bd1cd8
Packit bd1cd8
## Submitting Patches ##
Packit bd1cd8
Packit bd1cd8
Please do submit code. Here's what you need to do:
Packit bd1cd8
Packit bd1cd8
  1. A submission should be a set of changes that addresses one issue in the [issue tracker](https://github.com/google/googletest/issues). Please don't mix more than one logical change per submittal, because it makes the history hard to follow. If you want to make a change that doesn't have a corresponding issue in the issue tracker, please create one.
Packit bd1cd8
  1. Also, coordinate with team members that are listed on the issue in question. This ensures that work isn't being duplicated and communicating your plan early also generally leads to better patches.
Packit bd1cd8
  1. Ensure that your code adheres to the [Google Test source code style](#Coding_Style.md).
Packit bd1cd8
  1. Ensure that there are unit tests for your code.
Packit bd1cd8
  1. Sign a Contributor License Agreement.
Packit bd1cd8
  1. Create a Pull Request in the usual way.
Packit bd1cd8
Packit bd1cd8
## Google Test Committers ##
Packit bd1cd8
Packit bd1cd8
The current members of the Google Test engineering team are the only
Packit bd1cd8
committers at present. In the great tradition of eating one's own
Packit bd1cd8
dogfood, we will be requiring each new Google Test engineering team
Packit bd1cd8
member to earn the right to become a committer by following the
Packit bd1cd8
procedures in this document, writing consistently great code, and
Packit bd1cd8
demonstrating repeatedly that he or she truly gets the zen of Google
Packit bd1cd8
Test.
Packit bd1cd8
Packit bd1cd8
# Release Process #
Packit bd1cd8
Packit bd1cd8
We follow a typical release process:
Packit bd1cd8
Packit bd1cd8
  1. A release branch named `release-X.Y` is created.
Packit bd1cd8
  1. Bugs are fixed and features are added in trunk; those individual patches are merged into the release branch until it's stable.
Packit bd1cd8
  1. An individual point release (the `Z` in `X.Y.Z`) is made by creating a tag from the branch.
Packit bd1cd8
  1. Repeat steps 2 and 3 throughout one release cycle (as determined by features or time).
Packit bd1cd8
  1. Go back to step 1 to create another release branch and so on.
Packit bd1cd8
Packit bd1cd8
---
Packit bd1cd8
Packit bd1cd8
This page is based on the [Making GWT Better](http://code.google.com/webtoolkit/makinggwtbetter.html) guide from the [Google Web Toolkit](http://code.google.com/webtoolkit/) project.  Except as otherwise [noted](http://code.google.com/policies.html#restrictions), the content of this page is licensed under the [Creative Commons Attribution 2.5 License](http://creativecommons.org/licenses/by/2.5/).