forked from infection/infection
-
Notifications
You must be signed in to change notification settings - Fork 0
/
e2e_tests
executable file
·49 lines (39 loc) · 828 Bytes
/
e2e_tests
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#!/usr/bin/env bash
cd tests/e2e
failure="false"
if [ -f error.log ]
then
:> error.log
fi
touch error.log
for dir in */
do
cd "$dir"
echo -e "\n$dir\n";
if [ -f composer.json ] || [ -f composer.lock ]
then
composer install > /dev/null 2>&1
fi
if [ -f "run_tests.bash" ]
then
output="$(INFECTION_E2E_TESTS_ENV=1 bash run_tests.bash)"
else
output="$(INFECTION_E2E_TESTS_ENV=1 bash ../standard_script.bash ${1:-bin/infection})"
fi
if [ $? != 0 ]
then
failure="true"
echo "$dir" >> ../error.log
echo "$output" >> ../error.log
echo "" >> ../error.log
fi
cd ..
done
if [ $failure = "true" ]
then
echo "One of the e2e tests failed, check the logs";
cat error.log
exit 1
fi
echo -e "\nSuccess"
exit 0