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
3678a248
Commit
3678a248
authored
May 13, 2010
by
vladlosev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Renames test script flags.
parent
2c697f59
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
16 additions
and
12 deletions
+16
-12
internal_utils.cmake
cmake/internal_utils.cmake
+8
-4
gtest_help_test.py
test/gtest_help_test.py
+1
-1
gtest_output_test.py
test/gtest_output_test.py
+1
-1
gtest_test_utils.py
test/gtest_test_utils.py
+5
-5
run_tests_util.py
test/run_tests_util.py
+1
-1
No files found.
cmake/internal_utils.cmake
View file @
3678a248
# NOTE: This file can be included both into Google Test's and Google Mock's
# build scripts, so actions and functions defined here need to be
# idempotent.
# Defines CMAKE_USE_PTHREADS_INIT and CMAKE_THREAD_LIBS_INIT.
find_package
(
Threads
)
...
...
@@ -174,13 +178,13 @@ endfunction()
function
(
py_test name
)
# We are not supporting Python tests on Linux yet as they consider
# all Linux environments to be google3 and try to use google3 features.
if
(
PYTHONINTERP_FOUND
AND NOT
${
CMAKE_SYSTEM_NAME
}
MATCHES
"Linux"
)
# ${
gtest
_BINARY_DIR} is known at configuration time, so we can
if
(
PYTHONINTERP_FOUND
)
# ${
CMAKE
_BINARY_DIR} is known at configuration time, so we can
# directly bind it from cmake. ${CTEST_CONFIGURATION_TYPE} is known
# only at ctest runtime (by calling ctest -c <Configuration>), so
# we have to escape $ to delay variable substitution here.
add_test
(
${
name
}
${
PYTHON_EXECUTABLE
}
${
gtest
_SOURCE_DIR
}
/test/
${
name
}
.py
--
gtest_build_dir=
${
gtest
_BINARY_DIR
}
/\
${
CTEST_CONFIGURATION_TYPE
}
)
${
PYTHON_EXECUTABLE
}
${
CMAKE
_SOURCE_DIR
}
/test/
${
name
}
.py
--
build_dir=
${
CMAKE
_BINARY_DIR
}
/\
${
CTEST_CONFIGURATION_TYPE
}
)
endif
()
endfunction
()
test/gtest_help_test.py
View file @
3678a248
...
...
@@ -32,7 +32,7 @@
"""Tests the --help flag of Google C++ Testing Framework.
SYNOPSIS
gtest_help_test.py --
gtest_
build_dir=BUILD/DIR
gtest_help_test.py --build_dir=BUILD/DIR
# where BUILD/DIR contains the built gtest_help_test_ file.
gtest_help_test.py
"""
...
...
test/gtest_output_test.py
View file @
3678a248
...
...
@@ -32,7 +32,7 @@
"""Tests the text output of Google C++ Testing Framework.
SYNOPSIS
gtest_output_test.py --
gtest_
build_dir=BUILD/DIR --gengolden
gtest_output_test.py --build_dir=BUILD/DIR --gengolden
# where BUILD/DIR contains the built gtest_output_test_ file.
gtest_output_test.py --gengolden
gtest_output_test.py
...
...
test/gtest_test_utils.py
View file @
3678a248
...
...
@@ -63,8 +63,8 @@ TestCase = _test_module.TestCase # pylint: disable-msg=C6409
# Initially maps a flag to its default value. After
# _ParseAndStripGTestFlags() is called, maps a flag to its actual value.
_flag_map
=
{
'
gtest_
source_dir'
:
os
.
path
.
dirname
(
sys
.
argv
[
0
]),
'
gtest_
build_dir'
:
os
.
path
.
dirname
(
sys
.
argv
[
0
])}
_flag_map
=
{
'source_dir'
:
os
.
path
.
dirname
(
sys
.
argv
[
0
]),
'build_dir'
:
os
.
path
.
dirname
(
sys
.
argv
[
0
])}
_gtest_flags_are_parsed
=
False
...
...
@@ -111,13 +111,13 @@ def GetFlag(flag):
def
GetSourceDir
():
"""Returns the absolute path of the directory where the .py files are."""
return
os
.
path
.
abspath
(
GetFlag
(
'
gtest_
source_dir'
))
return
os
.
path
.
abspath
(
GetFlag
(
'source_dir'
))
def
GetBuildDir
():
"""Returns the absolute path of the directory where the test binaries are."""
return
os
.
path
.
abspath
(
GetFlag
(
'
gtest_
build_dir'
))
return
os
.
path
.
abspath
(
GetFlag
(
'build_dir'
))
_temp_dir
=
None
...
...
@@ -161,7 +161,7 @@ def GetTestExecutablePath(executable_name, build_dir=None):
if
not
os
.
path
.
exists
(
path
):
message
=
(
'Unable to find the test binary. Please make sure to provide path
\n
'
'to the binary via the --
gtest_build_dir flag or the GTEST_
BUILD_DIR
\n
'
'to the binary via the --
build_dir flag or the
BUILD_DIR
\n
'
'environment variable. For convenient use, invoke this script via
\n
'
'mk_test.py.
\n
'
# TODO(vladl@google.com): change mk_test.py to test.py after renaming
...
...
test/run_tests_util.py
View file @
3678a248
...
...
@@ -171,7 +171,7 @@ class TestRunner(object):
def
__init__
(
self
,
script_dir
,
build_dir_var_name
=
'
GTEST_
BUILD_DIR'
,
build_dir_var_name
=
'BUILD_DIR'
,
injected_os
=
os
,
injected_subprocess
=
subprocess
,
injected_build_dir_finder
=
_GetGtestBuildDir
):
...
...
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