Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
N
next.js
Project
Project
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
Alex
next.js
Commits
889481e8
Unverified
Commit
889481e8
authored
Jul 27, 2022
by
JJ Kasper
Committed by
GitHub
Jul 27, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update delayed test output handling (#39078)
parent
34f5236f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
13 deletions
+11
-13
run-tests.js
run-tests.js
+11
-13
No files found.
run-tests.js
View file @
889481e8
...
@@ -269,15 +269,15 @@ async function main() {
...
@@ -269,15 +269,15 @@ async function main() {
},
},
}
}
)
)
const
handleOutput
=
(
chunk
)
=>
{
const
handleOutput
=
(
type
)
=>
(
chunk
)
=>
{
if
(
hideOutput
)
{
if
(
hideOutput
)
{
outputChunks
.
push
(
chunk
)
outputChunks
.
push
(
{
type
,
chunk
}
)
}
else
{
}
else
{
process
.
stderr
.
write
(
chunk
)
process
.
stderr
.
write
(
chunk
)
}
}
}
}
child
.
stdout
.
on
(
'data'
,
handleOutput
)
child
.
stdout
.
on
(
'data'
,
handleOutput
(
'stdout'
)
)
child
.
stderr
.
on
(
'data'
,
handleOutput
)
child
.
stderr
.
on
(
'data'
,
handleOutput
(
'stderr'
)
)
children
.
add
(
child
)
children
.
add
(
child
)
...
@@ -287,15 +287,13 @@ async function main() {
...
@@ -287,15 +287,13 @@ async function main() {
if
(
isFinalRun
&&
hideOutput
)
{
if
(
isFinalRun
&&
hideOutput
)
{
// limit out to last 64kb so that we don't
// limit out to last 64kb so that we don't
// run out of log room in CI
// run out of log room in CI
const
trimmedOutput
=
[]
outputChunks
.
forEach
(({
type
,
chunk
})
=>
{
if
(
type
===
'stdout'
)
{
for
(
let
i
=
outputChunks
.
length
;
i
>=
0
;
i
--
)
{
process
.
stdout
.
write
(
chunk
)
const
chunk
=
outputChunks
[
i
]
}
else
{
if
(
!
chunk
)
continue
process
.
stderr
.
write
(
chunk
)
}
trimmedOutput
.
unshift
(
chunk
)
})
}
trimmedOutput
.
forEach
((
chunk
)
=>
process
.
stdout
.
write
(
chunk
))
}
}
return
reject
(
return
reject
(
new
Error
(
new
Error
(
...
...
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