mirror of
https://github.com/status-im/libp2p-test-plans.git
synced 2025-01-26 23:00:06 +00:00
Add debug logging if JSON parse fails (#223)
This commit is contained in:
parent
9277cff3bd
commit
ec32d36cab
@ -55,8 +55,19 @@ export async function run(namespace: string, compose: ComposeSpecification, opts
|
||||
if (testResults === null || testResults.length < 2) {
|
||||
throw new Error("Test JSON results not found")
|
||||
}
|
||||
const testResultsParsed = JSON.parse(testResults[1])
|
||||
console.log("Finished:", namespace, testResultsParsed)
|
||||
try {
|
||||
const testResultsParsed = JSON.parse(testResults[1])
|
||||
console.log("Finished:", namespace, testResultsParsed)
|
||||
} catch (e) {
|
||||
console.log("Failed to parse test results:", testResults[1])
|
||||
console.log("stdout:")
|
||||
console.log(stdout)
|
||||
console.log("")
|
||||
console.log("stderr:")
|
||||
console.log(stderr)
|
||||
console.log("")
|
||||
throw e
|
||||
}
|
||||
} catch (e: any) {
|
||||
console.log("Failure", e)
|
||||
return e
|
||||
|
Loading…
x
Reference in New Issue
Block a user