el-get/test/test-recipe.sh

25 lines
553 B
Bash
Raw Normal View History

#!/bin/bash
2012-02-20 18:12:33 +08:00
if [ -z "$1" ]; then
echo "Usage: $0 recipe1 [recipe2 ...]"
exit 0
fi
2014-04-23 07:48:22 +08:00
source "$(dirname $0)"/test-utils.sh
2012-02-20 18:12:33 +08:00
# 5 seconds in between tests to avoid accidental DoS from running too
# many tests in a short time
set_default DELAY_BETWEEN_TESTS 5
while [ -n "$1" ]; do
if test_recipe batch "$1"; then
echo "${EL_GET_SUCCESS_COLOR}*** SUCCESS $recipe_file ***${EL_GET_END}"
2012-02-20 18:12:33 +08:00
else
echo "${EL_GET_FAILURE_COLOR}*** FAILED $recipe_file ***${EL_GET_END}"
2012-02-20 18:12:33 +08:00
fi
shift
if [ -n "$1" ]; then
sleep "$DELAY_BETWEEN_TESTS"
fi
2012-02-20 18:12:33 +08:00
done