aboutsummaryrefslogtreecommitdiffhomepage
path: root/shared/extra-utils/server/servers.ts
diff options
context:
space:
mode:
Diffstat (limited to 'shared/extra-utils/server/servers.ts')
-rw-r--r--shared/extra-utils/server/servers.ts12
1 files changed, 8 insertions, 4 deletions
diff --git a/shared/extra-utils/server/servers.ts b/shared/extra-utils/server/servers.ts
index a647b0eb4..75e79cc41 100644
--- a/shared/extra-utils/server/servers.ts
+++ b/shared/extra-utils/server/servers.ts
@@ -104,7 +104,7 @@ function randomRTMP () {
104 return randomInt(low, high) 104 return randomInt(low, high)
105} 105}
106 106
107async function flushAndRunServer (serverNumber: number, configOverride?: Object, args = []) { 107async function flushAndRunServer (serverNumber: number, configOverride?: Object, args = [], silent = true) {
108 const parallel = parallelTests() 108 const parallel = parallelTests()
109 109
110 const internalServerNumber = parallel ? randomServer() : serverNumber 110 const internalServerNumber = parallel ? randomServer() : serverNumber
@@ -133,10 +133,10 @@ async function flushAndRunServer (serverNumber: number, configOverride?: Object,
133 } 133 }
134 } 134 }
135 135
136 return runServer(server, configOverride, args) 136 return runServer(server, configOverride, args, silent)
137} 137}
138 138
139async function runServer (server: ServerInfo, configOverrideArg?: any, args = []) { 139async function runServer (server: ServerInfo, configOverrideArg?: any, args = [], silent?: boolean) {
140 // These actions are async so we need to be sure that they have both been done 140 // These actions are async so we need to be sure that they have both been done
141 const serverRunString = { 141 const serverRunString = {
142 'Server listening': false 142 'Server listening': false
@@ -240,7 +240,11 @@ async function runServer (server: ServerInfo, configOverrideArg?: any, args = []
240 // If no, there is maybe one thing not already initialized (client/user credentials generation...) 240 // If no, there is maybe one thing not already initialized (client/user credentials generation...)
241 if (dontContinue === true) return 241 if (dontContinue === true) return
242 242
243 server.app.stdout.removeListener('data', onStdout) 243 if (silent === false) {
244 console.log(data.toString())
245 } else {
246 server.app.stdout.removeListener('data', onStdout)
247 }
244 248
245 process.on('exit', () => { 249 process.on('exit', () => {
246 try { 250 try {