DevGuide.md revision 13481
12650Ssaidi@eecs.umich.edu 22650Ssaidi@eecs.umich.edu 32650Ssaidi@eecs.umich.eduIf you are interested in understanding the internals of Google Test, 42650Ssaidi@eecs.umich.edubuilding from source, or contributing ideas or modifications to the 52650Ssaidi@eecs.umich.eduproject, then this document is for you. 62650Ssaidi@eecs.umich.edu 72650Ssaidi@eecs.umich.edu# Introduction # 82650Ssaidi@eecs.umich.edu 92650Ssaidi@eecs.umich.eduFirst, let's give you some background of the project. 102650Ssaidi@eecs.umich.edu 112650Ssaidi@eecs.umich.edu## Licensing ## 122650Ssaidi@eecs.umich.edu 132650Ssaidi@eecs.umich.eduAll Google Test source and pre-built packages are provided under the [New BSD License](http://www.opensource.org/licenses/bsd-license.php). 142650Ssaidi@eecs.umich.edu 152650Ssaidi@eecs.umich.edu## The Google Test Community ## 162650Ssaidi@eecs.umich.edu 172650Ssaidi@eecs.umich.eduThe Google Test community exists primarily through the [discussion group](http://groups.google.com/group/googletestframework) and the GitHub repository. 182650Ssaidi@eecs.umich.eduYou are definitely encouraged to contribute to the 192650Ssaidi@eecs.umich.edudiscussion and you can also help us to keep the effectiveness of the 202650Ssaidi@eecs.umich.edugroup high by following and promoting the guidelines listed here. 212650Ssaidi@eecs.umich.edu 222650Ssaidi@eecs.umich.edu### Please Be Friendly ### 232650Ssaidi@eecs.umich.edu 242650Ssaidi@eecs.umich.eduShowing courtesy and respect to others is a vital part of the Google 252650Ssaidi@eecs.umich.educulture, and we strongly encourage everyone participating in Google 262650Ssaidi@eecs.umich.eduTest development to join us in accepting nothing less. Of course, 272650Ssaidi@eecs.umich.edubeing courteous is not the same as failing to constructively disagree 282650Ssaidi@eecs.umich.eduwith each other, but it does mean that we should be respectful of each 293817Ssaidi@eecs.umich.eduother when enumerating the 42 technical reasons that a particular 303817Ssaidi@eecs.umich.eduproposal may not be the best choice. There's never a reason to be 313817Ssaidi@eecs.umich.eduantagonistic or dismissive toward anyone who is sincerely trying to 323817Ssaidi@eecs.umich.educontribute to a discussion. 333817Ssaidi@eecs.umich.edu 342650Ssaidi@eecs.umich.eduSure, C++ testing is serious business and all that, but it's also 353817Ssaidi@eecs.umich.edua lot of fun. Let's keep it that way. Let's strive to be one of the 363817Ssaidi@eecs.umich.edufriendliest communities in all of open source. 373817Ssaidi@eecs.umich.edu 383817Ssaidi@eecs.umich.eduAs always, discuss Google Test in the official GoogleTest discussion group. 393894Shsul@eecs.umich.eduYou don't have to actually submit code in order to sign up. Your participation 402650Ssaidi@eecs.umich.eduitself is a valuable contribution. 412650Ssaidi@eecs.umich.edu 422650Ssaidi@eecs.umich.edu# Working with the Code # 432982Sstever@eecs.umich.edu 443894Shsul@eecs.umich.eduIf you want to get your hands dirty with the code inside Google Test, 453894Shsul@eecs.umich.eduthis is the section for you. 463894Shsul@eecs.umich.edu 473894Shsul@eecs.umich.edu## Compiling from Source ## 483894Shsul@eecs.umich.edu 493894Shsul@eecs.umich.eduOnce you check out the code, you can find instructions on how to 502650Ssaidi@eecs.umich.educompile it in the [README](../README.md) file. 513894Shsul@eecs.umich.edu 523894Shsul@eecs.umich.edu## Testing ## 533894Shsul@eecs.umich.edu 543894Shsul@eecs.umich.eduA testing framework is of no good if itself is not thoroughly tested. 552650Ssaidi@eecs.umich.eduTests should be written for any new code, and changes should be 563894Shsul@eecs.umich.eduverified to not break existing tests before they are submitted for 573894Shsul@eecs.umich.edureview. To perform the tests, follow the instructions in 583894Shsul@eecs.umich.edu[README](../README.md) and verify that there are no failures. 593894Shsul@eecs.umich.edu 603894Shsul@eecs.umich.edu# Contributing Code # 613894Shsul@eecs.umich.edu 623894Shsul@eecs.umich.eduWe are excited that Google Test is now open source, and hope to get 633894Shsul@eecs.umich.edugreat patches from the community. Before you fire up your favorite IDE 643894Shsul@eecs.umich.eduand begin hammering away at that new feature, though, please take the 653894Shsul@eecs.umich.edutime to read this section and understand the process. While it seems 663894Shsul@eecs.umich.edurigorous, we want to keep a high standard of quality in the code 672650Ssaidi@eecs.umich.edubase. 683894Shsul@eecs.umich.edu 693894Shsul@eecs.umich.edu## Contributor License Agreements ## 703894Shsul@eecs.umich.edu 713894Shsul@eecs.umich.eduYou must sign a Contributor License Agreement (CLA) before we can 723894Shsul@eecs.umich.eduaccept any code. The CLA protects you and us. 733894Shsul@eecs.umich.edu 743894Shsul@eecs.umich.edu * 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). 753894Shsul@eecs.umich.edu * 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). 763894Shsul@eecs.umich.edu 773894Shsul@eecs.umich.eduFollow either of the two links above to access the appropriate CLA and 783894Shsul@eecs.umich.eduinstructions for how to sign and return it. 793894Shsul@eecs.umich.edu 802650Ssaidi@eecs.umich.edu## Coding Style ## 813894Shsul@eecs.umich.edu 823897Shsul@eecs.umich.eduTo keep the source consistent, readable, diffable and easy to merge, 833894Shsul@eecs.umich.eduwe 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 843894Shsul@eecs.umich.eduto conform to the style outlined [here](http://google-styleguide.googlecode.com/svn/trunk/cppguide.xml). 853894Shsul@eecs.umich.edu 863827Shsul@eecs.umich.edu## Updating Generated Code ## 873894Shsul@eecs.umich.edu 883894Shsul@eecs.umich.eduSome of Google Test's source files are generated by the Pump tool (a 893894Shsul@eecs.umich.eduPython script). If you need to update such files, please modify the 903894Shsul@eecs.umich.edusource (`foo.h.pump`) and re-generate the C++ file using Pump. You 913894Shsul@eecs.umich.educan read the PumpManual for details. 923894Shsul@eecs.umich.edu 932650Ssaidi@eecs.umich.edu## Submitting Patches ## 943894Shsul@eecs.umich.edu 953894Shsul@eecs.umich.eduPlease do submit code. Here's what you need to do: 962650Ssaidi@eecs.umich.edu 973894Shsul@eecs.umich.edu 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. 983894Shsul@eecs.umich.edu 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. 993894Shsul@eecs.umich.edu 1. Ensure that your code adheres to the [Google Test source code style](#Coding_Style.md). 1003894Shsul@eecs.umich.edu 1. Ensure that there are unit tests for your code. 1012650Ssaidi@eecs.umich.edu 1. Sign a Contributor License Agreement. 1023894Shsul@eecs.umich.edu 1. Create a Pull Request in the usual way. 1033894Shsul@eecs.umich.edu 1043894Shsul@eecs.umich.edu## Google Test Committers ## 1053894Shsul@eecs.umich.edu 1063894Shsul@eecs.umich.eduThe current members of the Google Test engineering team are the only 1073894Shsul@eecs.umich.educommitters at present. In the great tradition of eating one's own 1083894Shsul@eecs.umich.edudogfood, we will be requiring each new Google Test engineering team 1093894Shsul@eecs.umich.edumember to earn the right to become a committer by following the 1103894Shsul@eecs.umich.eduprocedures in this document, writing consistently great code, and 1113894Shsul@eecs.umich.edudemonstrating repeatedly that he or she truly gets the zen of Google 1123894Shsul@eecs.umich.eduTest. 1133828Shsul@eecs.umich.edu 1143894Shsul@eecs.umich.edu# Release Process # 1153894Shsul@eecs.umich.edu 1163894Shsul@eecs.umich.eduWe follow a typical release process: 1173894Shsul@eecs.umich.edu 1183894Shsul@eecs.umich.edu 1. A release branch named `release-X.Y` is created. 1193894Shsul@eecs.umich.edu 1. Bugs are fixed and features are added in trunk; those individual patches are merged into the release branch until it's stable. 1203894Shsul@eecs.umich.edu 1. An individual point release (the `Z` in `X.Y.Z`) is made by creating a tag from the branch. 1213894Shsul@eecs.umich.edu 1. Repeat steps 2 and 3 throughout one release cycle (as determined by features or time). 1223894Shsul@eecs.umich.edu 1. Go back to step 1 to create another release branch and so on. 1233894Shsul@eecs.umich.edu 1243894Shsul@eecs.umich.edu--- 1253894Shsul@eecs.umich.edu 1263817Ssaidi@eecs.umich.eduThis 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/). 1273894Shsul@eecs.umich.edu