From 9722cac9fefb6d21d53a7f4cd0b221cb5b69bde6 Mon Sep 17 00:00:00 2001 From: Linus Groh Date: Mon, 20 Apr 2020 20:16:35 +0100 Subject: [PATCH] LibJS: Let run-tests return 1 when not all tests pass --- Libraries/LibJS/Tests/run-tests | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Libraries/LibJS/Tests/run-tests b/Libraries/LibJS/Tests/run-tests index df55c56e3e..d0c5fb94dc 100755 --- a/Libraries/LibJS/Tests/run-tests +++ b/Libraries/LibJS/Tests/run-tests @@ -33,13 +33,18 @@ pass_color="" fail_color="" color_off="\033[0m" +exit_code=0 + if [ $pass_count -gt 0 ]; then pass_color="\033[32;1m" fi if [ $fail_count -gt 0 ]; then fail_color="\033[31;1m" + exit_code=1 fi echo echo -e "Ran $count tests. Passed: ${pass_color}${pass_count}${color_off}, Failed: ${fail_color}${fail_count}${color_off}" + +exit $exit_code