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
6324796b
Commit
6324796b
authored
Aug 01, 2018
by
Gennadiy Civil
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
googletest-output-test changes
parent
e69a1a83
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
17 additions
and
16 deletions
+17
-16
BUILD.bazel
googletest/test/BUILD.bazel
+7
-6
googletest-output-test-golden-lin.txt
googletest/test/googletest-output-test-golden-lin.txt
+0
-0
googletest-output-test.py
googletest/test/googletest-output-test.py
+10
-10
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 = "g
test_output_
test_",
name = "g
oogletest-output-
test_",
testonly = 1,
srcs = ["g
test_output_
test_.cc"],
srcs = ["g
oogletest-output-
test_.cc"],
deps = ["//:gtest"],
)
py_test(
name = "g
test_output_
test",
name = "g
oogletest-output-
test",
size = "small",
srcs = ["g
test_output_
test.py"],
srcs = ["g
oogletest-output-
test.py"],
args = select({
":has_absl": [],
"//conditions:default": ["--no_stacktrace_support"],
}),
data = [
"g
test_output_test_golden_
lin.txt",
":g
test_output_
test_",
"g
oogletest-output-test-golden-
lin.txt",
":g
oogletest-output-
test_",
],
deps = [":gtest_test_utils"],
)
...
...
googletest/test/g
test_output_test_golden_
lin.txt
→
googletest/test/g
oogletest-output-test-golden-
lin.txt
View file @
6324796b
This diff is collapsed.
Click to expand it.
googletest/test/g
test_output_
test.py
→
googletest/test/g
oogletest-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 g
test_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
oogletest-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
=
'g
test_output_test_golden_
lin.txt'
GOLDEN_NAME
=
'g
oogletest-output-test-golden-
lin.txt'
PROGRAM_PATH
=
gtest_test_utils
.
GetTestExecutablePath
(
'g
test_output_
test_'
)
PROGRAM_PATH
=
gtest_test_utils
.
GetTestExecutablePath
(
'g
oogletest-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'.*[/\\]((g
test_output_
test_|gtest).cc)(\:\d+|\(\d+\))\: '
,
return
re
.
sub
(
r'.*[/\\]((g
oogletest-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 g
test_output_
test_.exe)."""
"""Normalizes output (the output of g
oogletest-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
(),
'_g
test_output_
test_normalized_actual.txt'
),
'wb'
)
.
write
(
'_g
oogletest-output-
test_normalized_actual.txt'
),
'wb'
)
.
write
(
normalized_actual
)
open
(
os
.
path
.
join
(
gtest_test_utils
.
GetSourceDir
(),
'_g
test_output_
test_normalized_golden.txt'
),
'wb'
)
.
write
(
'_g
oogletest-output-
test_normalized_golden.txt'
),
'wb'
)
.
write
(
normalized_golden
)
self
.
assertEqual
(
normalized_golden
,
normalized_actual
)
...
...
googletest/test/g
test_output_
test_.cc
→
googletest/test/g
oogletest-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