Zhanyong and Chandler, I have updated the Xcode project with the ability to run the ...
15 years, 6 months ago
(2008-10-04 04:19:15 UTC)
#1
Zhanyong and Chandler,
I have updated the Xcode project with the ability to run the gtest unit tests.
This adds
1. a way for the user to build and run tests individually from within xcode
2. a way for the user to build and run tests individually from the command line
3. a "check" target that will execute al of the test and report the successes
and failures
For some reason, the codereview site won't let me look at the diff of the xcode
project (it is too big). Then again, It's really not that helpful to look at
xcode xml.
Please take a look especially at runtests.sh
Thanks!
Preston
The xcode project file itself is indeed too big and too low-level to by reviewed ...
15 years, 6 months ago
(2008-10-06 20:33:29 UTC)
#2
The xcode project file itself is indeed too big and too low-level to by reviewed
by human, but I trust that you've tested it. :-)
http://codereview.appspot.com/7047/diff/202/206
File xcode/Scripts/runtests.sh (right):
http://codereview.appspot.com/7047/diff/202/206#newcode3
Line 3: # Executes the samples and unittests for the Google Test Framework
Nit: unittests => tests
http://codereview.appspot.com/7047/diff/202/206#newcode14
Line 14: # Create and array of test executables
and => an
http://codereview.appspot.com/7047/diff/202/206#newcode15
Line 15: test_executables=("$BUILT_PRODUCTS_DIR/sample1_unittest"
Just a thought for the future: we have this list in various forms at multiple
places, since we need to support multiple platforms. It would be nice to only
need to define the list in a single place. Perhpas Chandler's new build script
will be the answer, or perhaps there's something easy we can do before that. I
don't know.
Fixed the issues Zhanyong and Vlad raised. http://codereview.appspot.com/7047/diff/202/206 File xcode/Scripts/runtests.sh (right): http://codereview.appspot.com/7047/diff/202/206#newcode3 Line 3: # ...
15 years, 6 months ago
(2008-10-08 04:08:00 UTC)
#3
Fixed the issues Zhanyong and Vlad raised.
http://codereview.appspot.com/7047/diff/202/206
File xcode/Scripts/runtests.sh (right):
http://codereview.appspot.com/7047/diff/202/206#newcode3
Line 3: # Executes the samples and unittests for the Google Test Framework
On 2008/10/06 20:33:29, Zhanyong wrote:
> Nit: unittests => tests
Done.
http://codereview.appspot.com/7047/diff/202/206#newcode14
Line 14: # Create and array of test executables
On 2008/10/06 20:33:29, Zhanyong wrote:
> and => an
Done.
http://codereview.appspot.com/7047/diff/202/206#newcode15
Line 15: test_executables=("$BUILT_PRODUCTS_DIR/sample1_unittest"
Agreed. It would be nice to have this list kept somewhere. I've extracted this
list from the Makefile.am file. I think we should revisit this after Chandler
has a chance to create a CMake solution.
On 2008/10/06 20:33:29, Zhanyong wrote:
> Just a thought for the future: we have this list in various forms at multiple
> places, since we need to support multiple platforms. It would be nice to only
> need to define the list in a single place. Perhpas Chandler's new build
script
> will be the answer, or perhaps there's something easy we can do before that.
I
> don't know.
http://codereview.appspot.com/7047/diff/202/206#newcode61
Line 61: echo "Tests complete with $succeeded successes and $failed failures."
In the latest version, I am returning the number of failed tests. Xcode
interprets a nonzero return value as a failure.
Issue 7047: "Adding unittests to Xcode project"
Created 15 years, 7 months ago by Preston
Modified 9 years, 4 months ago
Reviewers: wan, chandlerc1, vladl_google.com
Base URL: http://googletest.googlecode.com/svn/trunk/
Comments: 7