forked from metwork-framework/mfext
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrun_integration_tests.sh
executable file
·45 lines (40 loc) · 1.1 KB
/
run_integration_tests.sh
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
#!/bin/bash
# automatically generated from https://github.com/metwork-framework/resources/blob/master/cookiecutter/_%7B%7Bcookiecutter.repo%7D%7D/mfxxx_run_integration_tests.sh template
cd integration_tests 2>/dev/null
if test $? != 0; then
echo "Directory integration_tests is missing"
exit 0
fi
list_rep=`ls`
if test -z "$list_rep"; then
echo "There are no integration tests"
exit 0
fi
ret=0
for rep in $list_rep; do
if [ -d $rep ]; then
cd $rep
if test -s .layerapi2_dependencies; then
LAYERS_TO_LOAD=`cat .layerapi2_dependencies |xargs |sed 's/ /,/g'`
WRAPPER=0
else
WRAPPER=1
fi
for test in test*; do
echo "Test" $test "in" $rep
if test $WRAPPER -eq 0; then
layer_wrapper --layers=$LAYERS_TO_LOAD -- ./$test
else
./$test
fi
if test $? == 0; then
echo "Test $test OK"
else
echo "Test $test KO"
ret=1
fi
done
cd ..
fi
done
exit $ret