2020-07-03 13:08:27 +08:00
|
|
|
#!/usr/bin/env bash
|
2020-07-01 19:50:08 +08:00
|
|
|
set -e
|
2020-06-30 00:49:52 +08:00
|
|
|
cd integration-tests
|
2020-07-03 13:08:27 +08:00
|
|
|
|
|
|
|
run_test() {
|
|
|
|
echo
|
|
|
|
echo
|
|
|
|
echo "☆☆☆☆☆☆☆☆☆☆ $1 ☆☆☆☆☆☆☆☆☆☆"
|
|
|
|
echo
|
2020-07-01 19:50:08 +08:00
|
|
|
(
|
2020-07-03 13:08:27 +08:00
|
|
|
cd "$1"
|
2020-07-01 19:50:08 +08:00
|
|
|
docker-compose up --build --abort-on-container-exit --exit-code-from tests
|
2020-07-03 13:08:27 +08:00
|
|
|
docker-compose down
|
2020-07-01 19:50:08 +08:00
|
|
|
)
|
2020-07-03 13:08:27 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
if [[ $# -gt 0 ]]; then
|
|
|
|
while [[ -n "$1" ]]; do
|
|
|
|
run_test "$1"
|
|
|
|
shift
|
|
|
|
done
|
|
|
|
else
|
|
|
|
for i in `find -maxdepth 1 -type d`; do
|
|
|
|
i="$(basename "$i")"
|
|
|
|
if [ "$i" == "tester" ] || [ "$i" == "." ] || [ "$i" == ".." ]; then
|
|
|
|
continue
|
|
|
|
fi
|
|
|
|
run_test $i
|
|
|
|
done
|
|
|
|
fi
|