Skip to content

Commit be8cccc

Browse files
committed
Stop execution of tests when a container step fails
1 parent cec2964 commit be8cccc

File tree

1 file changed

+25
-7
lines changed

1 file changed

+25
-7
lines changed

tests/test_all.sh

Lines changed: 25 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,29 @@ SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
22
cd "${SCRIPT_DIR}"
33

44
find . -type d -mindepth 2 -path "*/dockerfiles/*" | sort --reverse | while read directory; do
5-
echo "Running ${directory}" &&
6-
pushd "${directory}" &&
7-
bash "1_build.sh" &&
8-
bash "2_start.sh" &&
9-
bash "3_test.sh" &&
10-
bash "4_stop.sh" &&
11-
popd
5+
printf '=%.0s' {1..80}
6+
echo -e "\nRunning ${directory}"
7+
pushd "${directory}"
8+
9+
bash "1_build.sh"
10+
if [[ $? -ne 0 ]]; then
11+
exit 1
12+
fi
13+
14+
bash "2_start.sh"
15+
if [[ $? -ne 0 ]]; then
16+
exit 1
17+
fi
18+
19+
bash "3_test.sh"
20+
if [[ $? -ne 0 ]]; then
21+
exit 1
22+
fi
23+
24+
bash "4_stop.sh"
25+
if [[ $? -ne 0 ]]; then
26+
exit 1
27+
fi
28+
29+
popd
1230
done

0 commit comments

Comments
 (0)