From 56e2c77bd473fd17a317948f07eea87a178f8523 Mon Sep 17 00:00:00 2001 From: ioedeveloper Date: Wed, 18 Nov 2020 12:57:15 +0100 Subject: [PATCH] Set exit code --- apps/remix-ide-e2e/script.js | 7 +++---- apps/remix-ide-e2e/script.sh | 8 +++++++- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/apps/remix-ide-e2e/script.js b/apps/remix-ide-e2e/script.js index 933d52a819..b78f2beca6 100644 --- a/apps/remix-ide-e2e/script.js +++ b/apps/remix-ide-e2e/script.js @@ -11,14 +11,13 @@ commands.forEach(val => { const bash = spawn('apps/remix-ide-e2e/script.sh', [env, filePath]); bash.stdout.on('data', (data) => { - console.log(data.toString()); + console.log(data.toString()) }); bash.stderr.on('data', (data) => { - console.log(data.toString()); - throw new Error(data) + console.log(data.toString()) }); bash.on('exit', (code) => { - console.log(`Process exited with code ${code}`); + console.log(`Process exited with code ${code}`) }); \ No newline at end of file diff --git a/apps/remix-ide-e2e/script.sh b/apps/remix-ide-e2e/script.sh index 76f52a858f..ec9a12bd2d 100755 --- a/apps/remix-ide-e2e/script.sh +++ b/apps/remix-ide-e2e/script.sh @@ -14,4 +14,10 @@ then TEST_SCRIPT=${TEST_SCRIPT}' '$2; fi -eval $TEST_SCRIPT; \ No newline at end of file +eval $TEST_SCRIPT; + +echo "$TEST_EXITCODE" +if [ "$TEST_EXITCODE" -eq 1 ] +then + exit 1 +fi \ No newline at end of file