Skip to content

Commit b6798de

Browse files
committed
add quick SHOW_OUTPUT toggle for integration tests
Setting this to `true` shows the output of the executed commands.
1 parent 2625828 commit b6798de

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

integrations/execute.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ let path = require('path')
33
let { spawn } = require('child_process')
44
let resolveToolRoot = require('./resolve-tool-root')
55

6+
let SHOW_OUTPUT = false
7+
68
let runningProcessess = []
79

810
afterEach(() => {
@@ -92,13 +94,19 @@ module.exports = function $(command, options = {}) {
9294
let combined = ''
9395

9496
child.stdout.on('data', (data) => {
97+
if (SHOW_OUTPUT) {
98+
console.log(data.toString())
99+
}
95100
stdoutMessages.push(data.toString())
96101
notifyNextStdoutActor()
97102
stdout += data
98103
combined += data
99104
})
100105

101106
child.stderr.on('data', (data) => {
107+
if (SHOW_OUTPUT) {
108+
console.error(data.toString())
109+
}
102110
stderrMessages.push(data.toString())
103111
notifyNextStderrActor()
104112
stderr += data

0 commit comments

Comments
 (0)