113481Sgiacomo.travaglini@arm.com
213481Sgiacomo.travaglini@arm.com
313481Sgiacomo.travaglini@arm.comIf you are interested in understanding the internals of Google Mock,
413481Sgiacomo.travaglini@arm.combuilding from source, or contributing ideas or modifications to the
513481Sgiacomo.travaglini@arm.comproject, then this document is for you.
613481Sgiacomo.travaglini@arm.com
713481Sgiacomo.travaglini@arm.com# Introduction #
813481Sgiacomo.travaglini@arm.com
913481Sgiacomo.travaglini@arm.comFirst, let's give you some background of the project.
1013481Sgiacomo.travaglini@arm.com
1113481Sgiacomo.travaglini@arm.com## Licensing ##
1213481Sgiacomo.travaglini@arm.com
1313481Sgiacomo.travaglini@arm.comAll Google Mock source and pre-built packages are provided under the [New BSD License](http://www.opensource.org/licenses/bsd-license.php).
1413481Sgiacomo.travaglini@arm.com
1513481Sgiacomo.travaglini@arm.com## The Google Mock Community ##
1613481Sgiacomo.travaglini@arm.com
1713481Sgiacomo.travaglini@arm.comThe Google Mock community exists primarily through the [discussion group](http://groups.google.com/group/googlemock), the
1813481Sgiacomo.travaglini@arm.com[issue tracker](https://github.com/google/googletest/issues) and, to a lesser extent, the [source control repository](../). You are definitely encouraged to contribute to the
1913481Sgiacomo.travaglini@arm.comdiscussion and you can also help us to keep the effectiveness of the
2013481Sgiacomo.travaglini@arm.comgroup high by following and promoting the guidelines listed here.
2113481Sgiacomo.travaglini@arm.com
2213481Sgiacomo.travaglini@arm.com### Please Be Friendly ###
2313481Sgiacomo.travaglini@arm.com
2413481Sgiacomo.travaglini@arm.comShowing courtesy and respect to others is a vital part of the Google
2513481Sgiacomo.travaglini@arm.comculture, and we strongly encourage everyone participating in Google
2613481Sgiacomo.travaglini@arm.comMock development to join us in accepting nothing less. Of course,
2713481Sgiacomo.travaglini@arm.combeing courteous is not the same as failing to constructively disagree
2813481Sgiacomo.travaglini@arm.comwith each other, but it does mean that we should be respectful of each
2913481Sgiacomo.travaglini@arm.comother when enumerating the 42 technical reasons that a particular
3013481Sgiacomo.travaglini@arm.comproposal may not be the best choice. There's never a reason to be
3113481Sgiacomo.travaglini@arm.comantagonistic or dismissive toward anyone who is sincerely trying to
3213481Sgiacomo.travaglini@arm.comcontribute to a discussion.
3313481Sgiacomo.travaglini@arm.com
3413481Sgiacomo.travaglini@arm.comSure, C++ testing is serious business and all that, but it's also
3513481Sgiacomo.travaglini@arm.coma lot of fun. Let's keep it that way. Let's strive to be one of the
3613481Sgiacomo.travaglini@arm.comfriendliest communities in all of open source.
3713481Sgiacomo.travaglini@arm.com
3813481Sgiacomo.travaglini@arm.com### Where to Discuss Google Mock ###
3913481Sgiacomo.travaglini@arm.com
4013481Sgiacomo.travaglini@arm.comAs always, discuss Google Mock in the official [Google C++ Mocking Framework discussion group](http://groups.google.com/group/googlemock).  You don't have to actually submit
4113481Sgiacomo.travaglini@arm.comcode in order to sign up. Your participation itself is a valuable
4213481Sgiacomo.travaglini@arm.comcontribution.
4313481Sgiacomo.travaglini@arm.com
4413481Sgiacomo.travaglini@arm.com# Working with the Code #
4513481Sgiacomo.travaglini@arm.com
4613481Sgiacomo.travaglini@arm.comIf you want to get your hands dirty with the code inside Google Mock,
4713481Sgiacomo.travaglini@arm.comthis is the section for you.
4813481Sgiacomo.travaglini@arm.com
4913481Sgiacomo.travaglini@arm.com## Checking Out the Source from Subversion ##
5013481Sgiacomo.travaglini@arm.com
5113481Sgiacomo.travaglini@arm.comChecking out the Google Mock source is most useful if you plan to
5213481Sgiacomo.travaglini@arm.comtweak it yourself.  You check out the source for Google Mock using a
5313481Sgiacomo.travaglini@arm.com[Subversion](http://subversion.tigris.org/) client as you would for any
5413481Sgiacomo.travaglini@arm.comother project hosted on Google Code.  Please see the instruction on
5513481Sgiacomo.travaglini@arm.comthe [source code access page](../) for how to do it.
5613481Sgiacomo.travaglini@arm.com
5713481Sgiacomo.travaglini@arm.com## Compiling from Source ##
5813481Sgiacomo.travaglini@arm.com
5913481Sgiacomo.travaglini@arm.comOnce you check out the code, you can find instructions on how to
6013481Sgiacomo.travaglini@arm.comcompile it in the [README](../README.md) file.
6113481Sgiacomo.travaglini@arm.com
6213481Sgiacomo.travaglini@arm.com## Testing ##
6313481Sgiacomo.travaglini@arm.com
6413481Sgiacomo.travaglini@arm.comA mocking framework is of no good if itself is not thoroughly tested.
6513481Sgiacomo.travaglini@arm.comTests should be written for any new code, and changes should be
6613481Sgiacomo.travaglini@arm.comverified to not break existing tests before they are submitted for
6713481Sgiacomo.travaglini@arm.comreview. To perform the tests, follow the instructions in [README](http://code.google.com/p/googlemock/source/browse/trunk/README) and
6813481Sgiacomo.travaglini@arm.comverify that there are no failures.
6913481Sgiacomo.travaglini@arm.com
7013481Sgiacomo.travaglini@arm.com# Contributing Code #
7113481Sgiacomo.travaglini@arm.com
7213481Sgiacomo.travaglini@arm.comWe are excited that Google Mock is now open source, and hope to get
7313481Sgiacomo.travaglini@arm.comgreat patches from the community. Before you fire up your favorite IDE
7413481Sgiacomo.travaglini@arm.comand begin hammering away at that new feature, though, please take the
7513481Sgiacomo.travaglini@arm.comtime to read this section and understand the process. While it seems
7613481Sgiacomo.travaglini@arm.comrigorous, we want to keep a high standard of quality in the code
7713481Sgiacomo.travaglini@arm.combase.
7813481Sgiacomo.travaglini@arm.com
7913481Sgiacomo.travaglini@arm.com## Contributor License Agreements ##
8013481Sgiacomo.travaglini@arm.com
8113481Sgiacomo.travaglini@arm.comYou must sign a Contributor License Agreement (CLA) before we can
8213481Sgiacomo.travaglini@arm.comaccept any code.  The CLA protects you and us.
8313481Sgiacomo.travaglini@arm.com
8413481Sgiacomo.travaglini@arm.com  * 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).
8513481Sgiacomo.travaglini@arm.com  * If you work for a company that wants to allow you to contribute your work to Google Mock, then you'll need to sign a [corporate CLA](http://code.google.com/legal/corporate-cla-v1.0.html).
8613481Sgiacomo.travaglini@arm.com
8713481Sgiacomo.travaglini@arm.comFollow either of the two links above to access the appropriate CLA and
8813481Sgiacomo.travaglini@arm.cominstructions for how to sign and return it.
8913481Sgiacomo.travaglini@arm.com
9013481Sgiacomo.travaglini@arm.com## Coding Style ##
9113481Sgiacomo.travaglini@arm.com
9213481Sgiacomo.travaglini@arm.comTo keep the source consistent, readable, diffable and easy to merge,
9313481Sgiacomo.travaglini@arm.comwe use a fairly rigid coding style, as defined by the [google-styleguide](https://github.com/google/styleguide) project.  All patches will be expected
9413481Sgiacomo.travaglini@arm.comto conform to the style outlined [here](https://github.com/google/styleguide/blob/gh-pages/cppguide.xml).
9513481Sgiacomo.travaglini@arm.com
9613481Sgiacomo.travaglini@arm.com## Submitting Patches ##
9713481Sgiacomo.travaglini@arm.com
9813481Sgiacomo.travaglini@arm.comPlease do submit code. Here's what you need to do:
9913481Sgiacomo.travaglini@arm.com
10013481Sgiacomo.travaglini@arm.com  1. Normally you should make your change against the SVN trunk instead of a branch or a tag, as the latter two are for release control and should be treated mostly as read-only.
10113481Sgiacomo.travaglini@arm.com  1. Decide which code you want to submit. A submission should be a set of changes that addresses one issue in the [Google Mock issue tracker](http://code.google.com/p/googlemock/issues/list). 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.
10213481Sgiacomo.travaglini@arm.com  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.
10313481Sgiacomo.travaglini@arm.com  1. Ensure that your code adheres to the [Google Mock source code style](#Coding_Style.md).
10413481Sgiacomo.travaglini@arm.com  1. Ensure that there are unit tests for your code.
10513481Sgiacomo.travaglini@arm.com  1. Sign a Contributor License Agreement.
10613481Sgiacomo.travaglini@arm.com  1. Create a patch file using `svn diff`.
10713481Sgiacomo.travaglini@arm.com  1. We use [Rietveld](http://codereview.appspot.com/) to do web-based code reviews.  You can read about the tool [here](https://github.com/rietveld-codereview/rietveld/wiki).  When you are ready, upload your patch via Rietveld and notify `googlemock@googlegroups.com` to review it.  There are several ways to upload the patch.  We recommend using the [upload\_gmock.py](../scripts/upload_gmock.py) script, which you can find in the `scripts/` folder in the SVN trunk.
10813481Sgiacomo.travaglini@arm.com
10913481Sgiacomo.travaglini@arm.com## Google Mock Committers ##
11013481Sgiacomo.travaglini@arm.com
11113481Sgiacomo.travaglini@arm.comThe current members of the Google Mock engineering team are the only
11213481Sgiacomo.travaglini@arm.comcommitters at present. In the great tradition of eating one's own
11313481Sgiacomo.travaglini@arm.comdogfood, we will be requiring each new Google Mock engineering team
11413481Sgiacomo.travaglini@arm.commember to earn the right to become a committer by following the
11513481Sgiacomo.travaglini@arm.comprocedures in this document, writing consistently great code, and
11613481Sgiacomo.travaglini@arm.comdemonstrating repeatedly that he or she truly gets the zen of Google
11713481Sgiacomo.travaglini@arm.comMock.
11813481Sgiacomo.travaglini@arm.com
11913481Sgiacomo.travaglini@arm.com# Release Process #
12013481Sgiacomo.travaglini@arm.com
12113481Sgiacomo.travaglini@arm.comWe follow the typical release process for Subversion-based projects:
12213481Sgiacomo.travaglini@arm.com
12313481Sgiacomo.travaglini@arm.com  1. A release branch named `release-X.Y` is created.
12413481Sgiacomo.travaglini@arm.com  1. Bugs are fixed and features are added in trunk; those individual patches are merged into the release branch until it's stable.
12513481Sgiacomo.travaglini@arm.com  1. An individual point release (the `Z` in `X.Y.Z`) is made by creating a tag from the branch.
12613481Sgiacomo.travaglini@arm.com  1. Repeat steps 2 and 3 throughout one release cycle (as determined by features or time).
12713481Sgiacomo.travaglini@arm.com  1. Go back to step 1 to create another release branch and so on.
12813481Sgiacomo.travaglini@arm.com
12913481Sgiacomo.travaglini@arm.com
13013481Sgiacomo.travaglini@arm.com---
13113481Sgiacomo.travaglini@arm.com
13213481Sgiacomo.travaglini@arm.comThis 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/).
133