Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
yangql
googletest
Commits
6324796b
Commit
6324796b
authored
Aug 01, 2018
by
Gennadiy Civil
Browse files
googletest-output-test changes
parent
e69a1a83
Changes
4
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
119 additions
and
118 deletions
+119
-118
googletest/test/BUILD.bazel
googletest/test/BUILD.bazel
+7
-6
googletest/test/googletest-output-test-golden-lin.txt
googletest/test/googletest-output-test-golden-lin.txt
+102
-102
googletest/test/googletest-output-test.py
googletest/test/googletest-output-test.py
+10
-10
googletest/test/googletest-output-test_.cc
googletest/test/googletest-output-test_.cc
+0
-0
No files found.
googletest/test/BUILD.bazel
View file @
6324796b
...
...
@@ -174,23 +174,24 @@ py_test(
)
cc_binary
(
name
=
"gtest
_
output
_
test_"
,
name
=
"g
oogle
test
-
output
-
test_"
,
testonly
=
1
,
srcs
=
[
"gtest
_
output
_
test_.cc"
],
srcs
=
[
"g
oogle
test
-
output
-
test_.cc"
],
deps
=
[
"//:gtest"
],
)
py_test
(
name
=
"gtest
_
output
_
test"
,
name
=
"g
oogle
test
-
output
-
test"
,
size
=
"small"
,
srcs
=
[
"gtest
_
output
_
test.py"
],
srcs
=
[
"g
oogle
test
-
output
-
test.py"
],
args
=
select
({
":has_absl"
:
[],
"//conditions:default"
:
[
"--no_stacktrace_support"
],
}),
data
=
[
"gtest
_
output
_
test
_
golden
_
lin.txt"
,
":gtest
_
output
_
test_"
,
"g
oogle
test
-
output
-
test
-
golden
-
lin.txt"
,
":g
oogle
test
-
output
-
test_"
,
],
deps
=
[
":gtest_test_utils"
],
)
...
...
googletest/test/gtest
_
output
_
test
_
golden
_
lin.txt
→
googletest/test/g
oogle
test
-
output
-
test
-
golden
-
lin.txt
View file @
6324796b
This diff is collapsed.
Click to expand it.
googletest/test/gtest
_
output
_
test.py
→
googletest/test/g
oogle
test
-
output
-
test.py
View file @
6324796b
...
...
@@ -33,10 +33,10 @@
SYNOPSIS
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
g
oogle
test_output_test.py --build_dir=BUILD/DIR --gengolden
# where BUILD/DIR contains the built g
oogle
test
-
output
-
test_ file.
g
oogle
test_output_test.py --gengolden
g
oogle
test_output_test.py
"""
__author__
=
'wan@google.com (Zhanyong Wan)'
...
...
@@ -59,9 +59,9 @@ IS_LINUX = os.name == 'posix' and os.uname()[0] == 'Linux'
IS_WINDOWS
=
os
.
name
==
'nt'
# TODO(vladl@google.com): remove the _lin suffix.
GOLDEN_NAME
=
'gtest
_
output
_
test
_
golden
_
lin.txt'
GOLDEN_NAME
=
'g
oogle
test
-
output
-
test
-
golden
-
lin.txt'
PROGRAM_PATH
=
gtest_test_utils
.
GetTestExecutablePath
(
'gtest
_
output
_
test_'
)
PROGRAM_PATH
=
gtest_test_utils
.
GetTestExecutablePath
(
'g
oogle
test
-
output
-
test_'
)
# At least one command we exercise must not have the
# 'internal_skip_environment_and_ad_hoc_tests' argument.
...
...
@@ -104,7 +104,7 @@ def RemoveLocations(test_output):
'FILE_NAME:#: '.
"""
return
re
.
sub
(
r
'.*[/\\]((gtest
_
output
_
test_|gtest).cc)(\:\d+|\(\d+\))\: '
,
return
re
.
sub
(
r
'.*[/\\]((g
oogle
test
-
output
-
test_|gtest).cc)(\:\d+|\(\d+\))\: '
,
r
'\1:#: '
,
test_output
)
...
...
@@ -195,7 +195,7 @@ def RemoveMatchingTests(test_output, pattern):
def
NormalizeOutput
(
output
):
"""Normalizes output (the output of gtest
_
output
_
test_.exe)."""
"""Normalizes output (the output of g
oogle
test
-
output
-
test_.exe)."""
output
=
ToUnixLineEnding
(
output
)
output
=
RemoveLocations
(
output
)
...
...
@@ -316,11 +316,11 @@ class GTestOutputTest(gtest_test_utils.TestCase):
if
os
.
getenv
(
'DEBUG_GTEST_OUTPUT_TEST'
):
open
(
os
.
path
.
join
(
gtest_test_utils
.
GetSourceDir
(),
'_gtest
_
output
_
test_normalized_actual.txt'
),
'wb'
).
write
(
'_g
oogle
test
-
output
-
test_normalized_actual.txt'
),
'wb'
).
write
(
normalized_actual
)
open
(
os
.
path
.
join
(
gtest_test_utils
.
GetSourceDir
(),
'_gtest
_
output
_
test_normalized_golden.txt'
),
'wb'
).
write
(
'_g
oogle
test
-
output
-
test_normalized_golden.txt'
),
'wb'
).
write
(
normalized_golden
)
self
.
assertEqual
(
normalized_golden
,
normalized_actual
)
...
...
googletest/test/gtest
_
output
_
test_.cc
→
googletest/test/g
oogle
test
-
output
-
test_.cc
View file @
6324796b
File moved
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