Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
googletest
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Chen Yisong
googletest
Commits
0cbe322d
Commit
0cbe322d
authored
Oct 08, 2008
by
preston.jackson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adding tests to Xcode project
parent
980926a9
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
48 additions
and
10 deletions
+48
-10
Makefile.am
Makefile.am
+4
-1
README
README
+44
-9
No files found.
Makefile.am
View file @
0cbe322d
...
@@ -28,8 +28,11 @@ EXTRA_DIST += \
...
@@ -28,8 +28,11 @@ EXTRA_DIST += \
xcode/Config/FrameworkTarget.xcconfig
\
xcode/Config/FrameworkTarget.xcconfig
\
xcode/Config/General.xcconfig
\
xcode/Config/General.xcconfig
\
xcode/Config/ReleaseProject.xcconfig
\
xcode/Config/ReleaseProject.xcconfig
\
xcode/Config/TestTarget.xcconfig
\
xcode/Config/InternalTestTarget.xcconfig
\
xcode/Resources/Info.plist
\
xcode/Resources/Info.plist
\
xcode/Scripts/versiongenerate.py
\
xcode/Scripts/versiongenerate.py
\
xcode/Scripts/runtests.sh
\
xcode/gtest.xcodeproj/project.pbxproj
xcode/gtest.xcodeproj/project.pbxproj
# xcode sample files
# xcode sample files
...
@@ -225,7 +228,7 @@ test_gtest_typed_test_test_LDADD = lib/libgtest_main.la
...
@@ -225,7 +228,7 @@ test_gtest_typed_test_test_LDADD = lib/libgtest_main.la
if
HAVE_PYTHON
if
HAVE_PYTHON
check_SCRIPTS
=
check_SCRIPTS
=
# These two Python modules are used by multiple Python
g
tests below.
# These two Python modules are used by multiple Python tests below.
check_SCRIPTS
+=
test
/gtest_test_utils.py
\
check_SCRIPTS
+=
test
/gtest_test_utils.py
\
test
/gtest_xml_test_utils.py
test
/gtest_xml_test_utils.py
...
...
README
View file @
0cbe322d
...
@@ -153,17 +153,52 @@ Studio project.
...
@@ -153,17 +153,52 @@ Studio project.
Open the gtest.xcodeproj in the xcode/ folder using Xcode. Build the "gtest"
Open the gtest.xcodeproj in the xcode/ folder using Xcode. Build the "gtest"
target. The universal binary framework will end up in your selected build
target. The universal binary framework will end up in your selected build
directory (selected in the Xcode "Preferences..." -> "Building" pane and
directory (selected in the Xcode "Preferences..." -> "Building" pane and
defaults to xcode/build).
defaults to xcode/build).
Alternatively, at the command line, enter:
Alternatively, run "xcodebuild" from the command line in Terminal.app. This
$ xcodebuild
will build the "Release" configuration of the gtest.framework, but you can
This will build the "Release" configuration of the gtest.framework, but you can
select the "Debug" configuration with a command line option. See the
select the "Debug" configuration with a command line option. See the
xcodebuild man page for more information.
"xcodebuild" man page for more information.
To use the gtest.framework, add the framework to your own project.
To test the gtest.framework in Xcode, change the active target to "Check" and
Create a new executable target and add the framework to the "Link Binary With
then build. This target builds all of the tests and then runs them. Don'
t
worry
Libraries" build phase. Select "Edit Active Executable" from the "Project"
if
you
see
some
errors
.
Xcode
reports
all
test
failures
(
even
the
intentional
menu. In the "Arguments" tab, add
ones
)
as
errors
.
However
,
you
should
see
a
"Build succeeded"
message
at
the
end
of
the
build
log
.
To
run
all
of
the
tests
from
the
command
line
,
enter
:
$
xcodebuid
-
target
Check
It
is
also
possible
to
build
and
execute
individual
tests
within
Xcode
.
Each
test
has
its
own
Xcode
"Target"
and
Xcode
"Executable"
.
To
build
any
of
the
tests
,
change
the
active
target
and
the
active
executable
to
the
test
of
interest
and
then
build
and
run
.
NOTE
:
many
of
the
tests
are
executed
from
Python
scripts
.
These
tests
are
indicated
by
a
trailing
underscore
"_"
in
the
test
name
.
These
tests
should
not
be
executed
directly
.
Instead
a
custom
Xcode
"Executable"
was
created
to
run
the
Python
script
from
within
Xcode
.
These
custom
executables
do
not
have
the
trailing
underscore
in
the
name
.
For
example
,
to
run
the
gtest_color_test
,
set
the
active
target
to
"gtest_color_test_"
(
with
a
trailing
underscore
).
This
target
will
build
the
gtest_color_test_
,
which
should
not
be
run
directly
.
Then
set
the
active
executable
to
"gtest_color_test"
(
no
trailing
underscore
).
This
executable
will
execute
the
gtest_color_test_
from
within
the
gtest_color_test
.
py
script
).
Individual
tests
can
be
built
from
the
command
line
using
:
$
xcodebuild
-
target
<
test_name
>
These
tests
can
be
executed
from
the
command
line
by
moving
to
the
build
directory
and
then
(
in
bash
)
$
export
DYLD_FRAMEWORK_PATH
=`
pwd
`
$
./<
test_name
>
#
(
e
.
g
.
./
gtest_unittest
or
./
gtest_color_test
.
py
)
To
use
the
gtest
.
framework
for
your
own
tests
,
first
,
add
the
framework
to
Xcode
project
.
Next
,
create
a
new
executable
target
and
add
the
framework
to
the
"Link Binary With Libraries"
build
phase
.
Select
"Edit Active Executable"
from
the
"Project"
menu
.
In
the
"Arguments"
tab
,
add
"DYLD_FRAMEWORK_PATH"
:
"/real/framework/path"
"DYLD_FRAMEWORK_PATH"
:
"/real/framework/path"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment