mirror of
https://github.com/atom/atom.git
synced 2026-01-24 14:28:14 -05:00
15 lines
450 B
JavaScript
15 lines
450 B
JavaScript
'use strict'
|
|
|
|
let parentProcessId = process.argv[2]
|
|
let timeoutInMinutes = process.argv[3]
|
|
let timeoutInMilliseconds = timeoutInMinutes * 1000 * 60
|
|
|
|
function exitTestRunner () {
|
|
process.kill(parentProcessId, 'SIGINT')
|
|
let errorMessage = 'The test suite has timed out because it has been running'
|
|
errorMessage += ' for more than ' + timeoutInMinutes + ' minutes.'
|
|
console.log(errorMessage)
|
|
}
|
|
|
|
setTimeout(exitTestRunner, timeoutInMilliseconds)
|