diff --git a/apps/remix-ide-e2e/script.js b/apps/remix-ide-e2e/script.js index b78f2beca6..a45f3a8669 100644 --- a/apps/remix-ide-e2e/script.js +++ b/apps/remix-ide-e2e/script.js @@ -12,12 +12,15 @@ const bash = spawn('apps/remix-ide-e2e/script.sh', [env, filePath]); bash.stdout.on('data', (data) => { console.log(data.toString()) -}); +}) bash.stderr.on('data', (data) => { console.log(data.toString()) -}); +}) bash.on('exit', (code) => { console.log(`Process exited with code ${code}`) -}); \ No newline at end of file + if (parseInt(code) === 1) { + throw new Error('Failed with error code 1') + } +}) \ No newline at end of file diff --git a/apps/remix-ide-e2e/script.sh b/apps/remix-ide-e2e/script.sh index 3d17ade7c7..082f0fa5a4 100755 --- a/apps/remix-ide-e2e/script.sh +++ b/apps/remix-ide-e2e/script.sh @@ -14,10 +14,10 @@ then TEST_SCRIPT=${TEST_SCRIPT}' '$2; fi -eval $TEST_SCRIPT; +eval $TEST_SCRIPT || TEST_EXITCODE=1; echo $TEST_EXITCODE -if [ $TEST_EXITCODE -eq 1 ] +if [ "$TEST_EXITCODE" -eq "1" ] then exit 1 fi \ No newline at end of file