summaryrefslogtreecommitdiffstats
path: root/autotest-checkers.sh
blob: 0c9966f55887b5d1b21b4c116ffcc1769ddd2c3f (plain)
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
50
#!/usr/bin/env bash
#
RESULT=0

bash ./build/autoloaderchecker.sh
RESULT=$(($RESULT+$?))
php ./build/translation-checker.php
RESULT=$(($RESULT+$?))
php ./build/htaccess-checker.php
RESULT=$(($RESULT+$?))

dataDirCreated=0
if ! [ -e data/ ]; then
    dataDirCreated=1
    echo "Create directory 'data/'"
    mkdir data/
fi
for app in $(find "apps/" -mindepth 1 -maxdepth 1 -type d -exec basename {} \;); do
    echo "Testing $app"
    if
        [ "$app" == "dav" ] || \
        [ "$app" == "encryption" ] || \
        [ "$app" == "federatedfilesharing" ] || \
        [ "$app" == "files" ] || \
        [ "$app" == "files_external" ] || \
        [ "$app" == "files_sharing" ] || \
        [ "$app" == "files_trashbin" ] || \
        [ "$app" == "files_versions" ] || \
        [ "$app" == "lookup_server_connector" ] || \
        [ "$app" == "provisioning_api" ] || \
        [ "$app" == "testing" ] || \
        [ "$app" == "twofactor_backupcodes" ] || \
        [ "$app" == "updatenotification" ] || \
        [ "$app" == "user_ldap" ]
    then
        ./occ app:check-code --skip-checkers "$app"
    else
        ./occ app:check-code "$app"
    fi
    RESULT=$(($RESULT+$?))
done;
if [ $dataDirCreated == 1 ]; then
    echo "Delete created directory 'data/'"
    rm -rf data/
fi

php ./build/files-checker.php
RESULT=$(($RESULT+$?))

exit $RESULT