2017-08-29 00:11:22 +02:00
|
|
|
#!/bin/bash
|
2017-08-26 15:01:31 +02:00
|
|
|
|
2017-08-29 02:01:19 +02:00
|
|
|
python fetchlist.py | sort > list_apps
|
|
|
|
|
2017-08-26 15:01:31 +02:00
|
|
|
while read APP;
|
|
|
|
do
|
|
|
|
APPNAME=$(echo $APP | awk '{print $1}')
|
|
|
|
echo $APPNAME
|
2017-08-29 00:10:32 +02:00
|
|
|
wget -q -O data/$APPNAME "https://ci-apps.yunohost.org/jenkins/job/$APP/lastBuild/consoleText" --prefer-family=IPv4
|
2017-08-26 15:01:31 +02:00
|
|
|
|
2017-08-29 02:01:19 +02:00
|
|
|
TESTS_RESULTS=""
|
|
|
|
while read TESTNAME
|
|
|
|
do
|
|
|
|
RESULTS=$(grep "^$TESTNAME:" data/$APPNAME)
|
|
|
|
if echo $RESULTS | grep -q "FAIL"
|
|
|
|
then
|
|
|
|
TESTS_RESULTS="${TESTS_RESULTS}0"
|
|
|
|
elif echo $RESULTS | grep -q "SUCCESS"
|
|
|
|
then
|
|
|
|
TESTS_RESULTS="${TESTS_RESULTS}1"
|
|
|
|
else
|
|
|
|
TESTS_RESULTS="${TESTS_RESULTS}X"
|
|
|
|
fi
|
|
|
|
done < list_tests
|
|
|
|
|
|
|
|
LEVELS=$(grep -A10 'Level of this application' data/$APPNAME \
|
|
|
|
| tail -n 11 \
|
|
|
|
| sed -e 's@N/A@X@g' -e 's/ Level //g' -e 's/Level of this application//g' \
|
|
|
|
| awk '{print $2}' \
|
|
|
|
| tr -d '\n')
|
2017-08-26 15:01:31 +02:00
|
|
|
|
2017-08-29 02:01:19 +02:00
|
|
|
echo $TESTS_RESULTS > data/$APPNAME
|
2017-08-26 15:01:31 +02:00
|
|
|
echo $LEVELS >> data/$APPNAME
|
|
|
|
|
2017-08-29 02:01:19 +02:00
|
|
|
done < list_apps
|
2017-08-26 15:01:31 +02:00
|
|
|
|