summaryrefslogblamecommitdiff
path: root/tools/ci/scripts/runtests.sh
blob: 9e2e913b6c0a9fb27460edcf8657312f935d263c (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11

           




                                                    



                              
                                  
 
                       
            
 





                                             

                                                     



                                 
                           
             








                           

                                                     



                                 
                           




              
#!/bin/bash

if [[ ${CI_RUNNER_TAGS} != *"docker"* ]]; then
    echo "Running from shell. Skipping run tests $*"
    exit 0
fi

export SDL_VIDEODRIVER="dummy"
ulimit -c unlimited -S
ulimit -c unlimited
rm -rf core*
sysctl -w kernel.core_pattern=core

export HOME="logs/home"
rm -rf $HOME

echo "clean config runs"
n=0
while true; do
    echo "run test ${n}"
    rm "${HOME}/.config/mana/mana/config.xml"
    rm "/root/.config/mana/mana/config.xml"
    rm "${HOME}/.config/mana/mana/serverlistplus.xml"
    rm "/root/.config/mana/mana/serverlistplus.xml"
    ./tools/ci/scripts/runtest.sh
    if [ "$?" != 0 ]; then
        exit 1
    fi
    if [[ $n -ge 1 ]]; then
        break
    fi
    sleep 5s
    n=$((n+1))
done

echo "existing config runs"
n=0
while true; do
    echo "run test ${n}"
    rm "${HOME}/.config/mana/mana/serverlistplus.xml"
    rm "/root/.config/mana/mana/serverlistplus.xml"
    ./tools/ci/scripts/runtest.sh
    if [ "$?" != 0 ]; then
        exit 1
    fi
    if [[ $n -ge 1 ]]; then
        exit 0
    fi
    sleep 5s
    n=$((n+1))
done