Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
neo
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
2
Merge Requests
2
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
Kirill Smelkov
neo
Commits
8ee01a27
Commit
8ee01a27
authored
Dec 24, 2020
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
39b3d8c7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
7 deletions
+10
-7
go/internal/xtracing/tracetest/example_test.go
go/internal/xtracing/tracetest/example_test.go
+10
-7
No files found.
go/internal/xtracing/tracetest/example_test.go
View file @
8ee01a27
...
...
@@ -92,7 +92,7 @@ func routeEvent(event interface{}) (stream string) {
// verify calls tracetest.Verify on f with first preparing tracing setup and events delivery.
// It also verifies that tracetest detects errors as expected.
func
verify
(
t
*
testing
.
T
,
f
func
(
t
*
tracetest
.
T
),
targvExtra
...
string
)
{
// XXX t.Helper() ?
t
.
Helper
()
verifyInSubprocess
(
t
,
func
(
t
*
testing
.
T
)
{
tracetest
.
Verify
(
t
,
func
(
t
*
tracetest
.
T
)
{
// setup tracing to deliver trace events to t.
...
...
@@ -185,13 +185,16 @@ func verifyInSubprocess(t *testing.T, f func(t *testing.T), targvExtra ...string
cmd
.
Env
=
append
(
os
.
Environ
(),
"TRACETEST_EX_VERIFY_IN_SUBPROCESS=1"
)
bout
,
err
:=
cmd
.
CombinedOutput
()
out
:=
string
(
bout
)
e
,
ok
:=
err
.
(
*
exec
.
ExitError
)
if
!
ok
{
// e.g. could not respawn at all
t
.
Log
(
out
)
t
.
Fatal
(
err
)
ecode
:=
0
if
err
!=
nil
{
e
,
ok
:=
err
.
(
*
exec
.
ExitError
)
if
!
ok
{
// e.g. could not respawn at all
t
.
Log
(
out
)
t
.
Fatal
(
err
)
}
ecode
=
e
.
ExitCode
()
}
ecode
:=
e
.
ExitCode
()
bad
:=
""
badf
:=
func
(
format
string
,
argv
...
interface
{})
{
...
...
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