More documentation on running tests (including --gtest_filter info).
authorEric Tzeng <eric.s.tzeng@gmail.com>
Thu, 13 Mar 2014 21:35:48 +0000 (14:35 -0700)
committerEric Tzeng <eric.s.tzeng@gmail.com>
Thu, 13 Mar 2014 21:36:10 +0000 (14:36 -0700)
docs/development.md

index 459e1d6..8a166f7 100644 (file)
@@ -36,6 +36,18 @@ We'd appreciate your contribution to the documentation effort!
 
 **Testing**: run `make runtest` to check the project tests. New code requires new tests. Pull requests that fail tests will not be accepted.
 
+The `googletest` framework we use provides many additional options, which you can access by running the test binaries directly. One of the more useful options is `--gtest_filter`, which allows you to filter tests by name:
+
+    # run all tests with CPU in the name
+    build/src/caffe/test/test_all.testbin --gtest_filter='*CPU*'
+
+    # run all tests without GPU in the name (note the leading minus sign)
+    build/src/caffe/test/test_all.testbin --gtest_filter=-'*GPU*'
+
+To get a list of all options `googletest` provides, simply pass the `--help` flag:
+
+    build/src/caffe/test/test_all.testbin --help
+
 **Style**
 
 - Follow [Google C++ style](http://google-styleguide.googlecode.com/svn/trunk/cppguide.xml) and [Google python style](http://google-styleguide.googlecode.com/svn/trunk/pyguide.html) + [PEP 8](http://legacy.python.org/dev/peps/pep-0008/).