diff options
author | jak1 <jak1@themanaworld.org> | 2023-04-07 16:51:54 +0200 |
---|---|---|
committer | jak1 <jak1@themanaworld.org> | 2023-04-07 16:52:34 +0200 |
commit | a6006f9c59dccb6af4bf9b3e192bdb829c54fe87 (patch) | |
tree | 4df48d2b9ee14d51d0d6428436c49ed29f4395cb /tools/ci/scripts/runtests.sh | |
parent | 279c7ba28804960ae3b2ec0753b4c3a92d5a6ede (diff) | |
download | mv-a6006f9c59dccb6af4bf9b3e192bdb829c54fe87.tar.gz mv-a6006f9c59dccb6af4bf9b3e192bdb829c54fe87.tar.bz2 mv-a6006f9c59dccb6af4bf9b3e192bdb829c54fe87.tar.xz mv-a6006f9c59dccb6af4bf9b3e192bdb829c54fe87.zip |
sorting CI:
moved disabled jobs to 'tools/ci/disabled.gitlab-ci.yml'
added check before rm, removes a lot unnecessary noise form pipeline output (req. init.sh)
added N_RUNS to runtests.sh (without arg it runs 3 times the tests, given amount otherwise)
added gcc-12 job
Diffstat (limited to 'tools/ci/scripts/runtests.sh')
-rwxr-xr-x | tools/ci/scripts/runtests.sh | 27 |
1 files changed, 17 insertions, 10 deletions
diff --git a/tools/ci/scripts/runtests.sh b/tools/ci/scripts/runtests.sh index 9f0a6729f..528ea69cc 100755 --- a/tools/ci/scripts/runtests.sh +++ b/tools/ci/scripts/runtests.sh @@ -1,5 +1,11 @@ #!/usr/bin/env bash +if [[ $1 != "" ]]; then + N_RUNS=$1 +else + N_RUNS=3 +fi + if [[ "$RUNFROMSHELL" != "" ]]; then if [[ ${CIRRUS_CI} != "true" ]]; then echo "Running from shell. Skipping run tests $*" @@ -21,18 +27,19 @@ export ASAN_OPTIONS=detect_stack_use_after_return=true:strict_init_order=true 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" - rm "${HOME}/.local/share/mana/manaplus.log" - rm "/root/.local/share/mana/manaplus.log" + echo "run test ${n}/${N_RUNS}" + echo "clean configs and logs" + silent_rm "${HOME}/.config/mana/mana/config.xml" + silent_rm "/root/.config/mana/mana/config.xml" + silent_rm "${HOME}/.config/mana/mana/serverlistplus.xml" + silent_rm "/root/.config/mana/mana/serverlistplus.xml" + silent_rm "${HOME}/.local/share/mana/manaplus.log" + silent_rm "/root/.local/share/mana/manaplus.log" ./tools/ci/scripts/runtest.sh if [ "$?" != 0 ]; then exit 1 fi - if [[ $n -ge 3 ]]; then + if [[ $n -ge $N_RUNS ]]; then break fi sleep 5 @@ -45,8 +52,8 @@ echo "existing config runs" n=0 while true; do echo "run test ${n}" - rm "${HOME}/.local/share/mana/manaplus.log" - rm "/root/.local/share/mana/manaplus.log" + silent_rm "${HOME}/.local/share/mana/manaplus.log" + silent_rm "/root/.local/share/mana/manaplus.log" ./tools/ci/scripts/runtest.sh if [ "$?" != 0 ]; then exit 1 |