mirror of
https://github.com/google/googletest.git
synced 2026-04-30 19:09:20 +08:00
121 lines
6.4 KiB
Plaintext
121 lines
6.4 KiB
Plaintext
#summary How to contribute to Google C++ Testing Framework.
|
|
#labels Phase-Implementation
|
|
|
|
= Google C++ Testing Framework Development Guide =
|
|
|
|
If you are interested in understanding the internals of Google Test,
|
|
building from source, or contributing ideas or modifications to the
|
|
project, then this document is for you.
|
|
|
|
== Introduction ==
|
|
|
|
First, let's give you some background of the project.
|
|
|
|
=== Licensing ===
|
|
|
|
All Google Test source and pre-built packages are provided under the [http://www.opensource.org/licenses/bsd-license.php New BSD License].
|
|
|
|
=== The Google Test Community ===
|
|
|
|
The Google Test community exists primarily through the [http://groups.google.com/group/googletestframework discussion group], the
|
|
[http://code.google.com/p/googletest/issues/list issue tracker] and, to a lesser extent, the [http://code.google.com/p/googletest/source/checkout source control repository]. You are definitely encouraged to contribute to the
|
|
discussion and you can also help us to keep the effectiveness of the
|
|
group high by following and promoting the guidelines listed here.
|
|
|
|
==== Please Be Friendly ====
|
|
|
|
Showing courtesy and respect to others is a vital part of the Google
|
|
culture, and we strongly encourage everyone participating in Google
|
|
Test development to join us in accepting nothing less. Of course,
|
|
being courteous is not the same as failing to constructively disagree
|
|
with each other, but it does mean that we should be respectful of each
|
|
other when enumerating the 42 technical reasons that a particular
|
|
proposal may not be the best choice. There's never a reason to be
|
|
antagonistic or dismissive toward anyone who is sincerely trying to
|
|
contribute to a discussion.
|
|
|
|
Sure, C++ testing is serious business and all that, but it's also
|
|
a lot of fun. Let's keep it that way. Let's strive to be one of the
|
|
friendliest communities in all of open source.
|
|
|
|
==== Where to Discuss Google Test ====
|
|
|
|
As always, discuss Google Test in the official [http://groups.google.com/group/googletestframework Google C++ Testing Framework discussion group]. You don't have to actually submit
|
|
code in order to sign up. Your participation itself is a valuable
|
|
contribution.
|
|
|
|
== Working with the Code ==
|
|
|
|
If you want to get your hands dirty with the code inside Google Test,
|
|
this is the section for you.
|
|
|
|
=== Checking Out the Source from Subversion ===
|
|
|
|
Checking out the Google Test source is most useful if you plan to
|
|
tweak it yourself. You check out the source for Google Test using a
|
|
[http://subversion.tigris.org/ Subversion] client as you would for any
|
|
other project hosted on Google Code. Please see the instruction on
|
|
the [http://code.google.com/p/googletest/source/checkoutproject source code access page] for how to do it.
|
|
|
|
=== Compiling from Source ===
|
|
|
|
Once you check out the code, you can find instructions on how to
|
|
compile it in the [http://code.google.com/p/googletest/source/browse/trunk/README README] file.
|
|
|
|
=== Testing ===
|
|
|
|
A testing framework is of no good if itself is not thoroughly tested.
|
|
Tests should be written for any new code, and changes should be
|
|
verified to not break existing tests before they are submitted for
|
|
review. To perform the tests, follow the instructions in [http://code.google.com/p/googletest/source/browse/trunk/README README] and
|
|
verify that there are no failures.
|
|
|
|
== Contributing Code ==
|
|
|
|
We are excited that Google Test is now open source, and hope to get
|
|
great patches from the community. Before you fire up your favorite IDE
|
|
and begin hammering away at that new feature, though, please take the
|
|
time to read this section and understand the process. While it seems
|
|
rigorous, we want to keep a high standard of quality in the code
|
|
base.
|
|
|
|
=== Contributor License Agreements ===
|
|
|
|
You must sign a Contributor License Agreement (CLA) before we can
|
|
accept any code. The CLA protects you and us.
|
|
|
|
* 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 [http://code.google.com/legal/individual-cla-v1.0.html individual CLA].
|
|
* If you work for a company that wants to allow you to contribute your work to GWT, then you'll need to sign a [http://code.google.com/legal/corporate-cla-v1.0.html corporate CLA].
|
|
|
|
Follow either of the two links above to access the appropriate CLA and
|
|
instructions for how to sign and return it.
|
|
|
|
=== Coding Style ===
|
|
|
|
To keep the source consistent, readable, diffable and easy to merge,
|
|
we use a fairly rigid coding style, as defined by the [http://code.google.com/p/google-styleguide/ google-styleguide] project. All patches will be expected
|
|
to conform to the style outlined [http://google-styleguide.googlecode.com/svn/trunk/cppguide.xml here].
|
|
|
|
=== Submitting Patches ===
|
|
|
|
Please do submit code. Here's what you need to do:
|
|
|
|
# Decide which code you want to submit. A submission should be a set of changes that addresses one issue in the [http://code.google.com/p/googletest/issues/list Google Test issue tracker]. 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.
|
|
# 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.
|
|
# Ensure that your code adheres to the [#Coding_Style Google Test source code style].
|
|
# Ensure that there are unit tests for your code.
|
|
# Sign a Contributor License Agreement.
|
|
# Attach the code to the issue it addresses. For brand new files, attach the whole file. For patches to existing files, attach a Subversion diff (that is, `svn diff`).
|
|
|
|
=== Google Test Committers ===
|
|
|
|
The current members of the Google Test engineering team are the only
|
|
committers at present. In the great tradition of eating one's own
|
|
dogfood, we will be requiring each new Google Test engineering team
|
|
member to earn the right to become a committer by following the
|
|
procedures in this document, writing consistently great code, and
|
|
demonstrating repeatedly that he or she truly gets the zen of Google
|
|
Test.
|
|
|
|
----
|
|
This page is based on the [http://code.google.com/webtoolkit/makinggwtbetter.html Making GWT Better] guide from the [http://code.google.com/webtoolkit/ Google Web Toolkit] project. Except as otherwise [http://code.google.com/policies.html#restrictions noted], the content of this page is licensed under the [http://creativecommons.org/licenses/by/2.5/ Creative Commons Attribution 2.5 License]. |