2022-03-22 19:02:51 +00:00
|
|
|
#!/usr/bin/env bash
|
2021-08-02 10:11:48 +01:00
|
|
|
|
2022-03-22 19:02:51 +00:00
|
|
|
source assets/logging.sh
|
2021-08-02 10:11:48 +01:00
|
|
|
|
|
|
|
|
for unittest in ./should*; do
|
|
|
|
|
log "**********************************"
|
|
|
|
|
log " UNIT TEST: ${unittest}"
|
|
|
|
|
log "**********************************"
|
|
|
|
|
log ""
|
|
|
|
|
cd ${unittest}
|
|
|
|
|
./test.sh
|
|
|
|
|
ret_code=$?
|
|
|
|
|
cd ..
|
|
|
|
|
|
|
|
|
|
log ""
|
|
|
|
|
log ""
|
|
|
|
|
if [ "${ret_code}" = "0" ]; then
|
|
|
|
|
success "Completed: unit test ${unittest}"
|
|
|
|
|
else
|
|
|
|
|
error "Completed: unit test ${unittest} with errors"
|
|
|
|
|
failed="true"
|
|
|
|
|
fi
|
|
|
|
|
done
|
|
|
|
|
|
|
|
|
|
if [ -n "${failed:-}" ]; then
|
|
|
|
|
error ""
|
|
|
|
|
error "*************************************"
|
|
|
|
|
error "All unit tests completed, with errors"
|
|
|
|
|
error "*************************************"
|
|
|
|
|
exit 1
|
|
|
|
|
else
|
|
|
|
|
success ""
|
|
|
|
|
success "***************************************"
|
|
|
|
|
success "All unit tests completed with no errors"
|
|
|
|
|
success "***************************************"
|
|
|
|
|
fi
|