Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5421c185 authored by Scott James Remnant's avatar Scott James Remnant
Browse files

Give run_unit_tests an exit code

So you can tell whether tests failed by checking $?

Change-Id: I0eb55c49946a4183206bd68cd3c0b1bdc69f6bb0
parent 52842b93
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -39,7 +39,9 @@ run_tests() {

  if [ "$failed_tests" != "" ]; then
    echo "$failed_tests";
    return 1
  fi
  return 0
}

tests=()
@@ -71,7 +73,7 @@ while [ $# -gt 0 ]; do
done

if [ ${#tests[*]} -eq 0 ]; then
  run_tests "$device" ${known_tests[*]}
  run_tests "$device" ${known_tests[*]} || exit 1
else
  run_tests "$device" ${tests[*]}
  run_tests "$device" ${tests[*]} || exit 1
fi