Skip to content

Commit e054678

Browse files
authored
fix(travis-ci): resolve broken tests (#2440)
1 parent ee22552 commit e054678

File tree

5 files changed

+42
-41
lines changed

5 files changed

+42
-41
lines changed

lgsm/config-default/config-lgsm/btserver/_default.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ glibc="2.17"
109109
## Server Specific Directories
110110
systemdir="${serverfiles}"
111111
executabledir="${systemdir}"
112-
executable="./DedicatedServer"
112+
executable="./Launch_DedicatedServer"
113113
servercfg="serversettings.xml"
114114
servercfgdefault="serversettings.xml"
115115
servercfgdir="${systemdir}"

tests/tests_fctrserver.sh

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,7 @@ if [ -f ".dev-debug" ]; then
2020
set -x
2121
fi
2222

23-
travistest="1"
24-
version="v19.6.0"
23+
version="v19.9.0"
2524
shortname="fctr"
2625
gameservername="fctrserver"
2726
rootdir="$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")"
@@ -48,6 +47,9 @@ userinput="${1}"
4847
if [ ! -v TRAVIS ]; then
4948
TRAVIS_BRANCH="develop"
5049
TRAVIS_BUILD_DIR="${rootdir}"
50+
else
51+
servicename="travis"
52+
travistest="1"
5153
fi
5254

5355
## GitHub Branch Select
@@ -381,7 +383,7 @@ else
381383
# Enables ANSI colours from core_messages.sh. Can be disabled with ansi=off.
382384
fn_ansi_loader
383385
# Prevents running of core_exit.sh for Travis-CI.
384-
if [ "${travistest}" != "1" ]; then
386+
if [ -z "${travistest}" ]; then
385387
getopt=$1
386388
core_getopt.sh
387389
fi
@@ -782,7 +784,6 @@ grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g
782784
echo ""
783785
echo "5.0 - Monitor Tests"
784786
echo "=================================================================="
785-
786787
echo ""
787788
echo "Server IP - Port: ${ip}:${port}"
788789
echo "Server IP - Query Port: ${ip}:${queryport}"

tests/tests_jc2server.sh

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,7 @@ if [ -f ".dev-debug" ]; then
2020
set -x
2121
fi
2222

23-
travistest="1"
24-
version="v19.6.0"
23+
version="v19.9.0"
2524
shortname="jc2"
2625
gameservername="jc2server"
2726
rootdir="$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")"
@@ -48,6 +47,9 @@ userinput="${1}"
4847
if [ ! -v TRAVIS ]; then
4948
TRAVIS_BRANCH="develop"
5049
TRAVIS_BUILD_DIR="${rootdir}"
50+
else
51+
servicename="travis"
52+
travistest="1"
5153
fi
5254

5355
## GitHub Branch Select
@@ -65,8 +67,6 @@ core_functions.sh(){
6567

6668
# Bootstrap
6769
# Fetches the core functions required before passed off to core_dl.sh.
68-
69-
# Fetches core functions.
7070
fn_bootstrap_fetch_file(){
7171
remote_fileurl="${1}"
7272
local_filedir="${2}"
@@ -281,15 +281,15 @@ if [ "$(whoami)" == "root" ]; then
281281
fi
282282
fi
283283

284-
# Download the latest serverlist. This is the complete list of all supported servers.
285-
fn_bootstrap_fetch_file_github "lgsm/data" "serverlist.csv" "${datadir}" "nochmodx" "norun" "forcedl" "nomd5"
286-
if [ ! -f "${serverlist}" ]; then
287-
echo "[ FAIL ] serverlist.csv could not be loaded."
288-
exit 1
289-
fi
290-
291284
# LinuxGSM installer mode.
292285
if [ "${shortname}" == "core" ]; then
286+
# Download the latest serverlist. This is the complete list of all supported servers.
287+
fn_bootstrap_fetch_file_github "lgsm/data" "serverlist.csv" "${datadir}" "nochmodx" "norun" "forcedl" "nomd5"
288+
if [ ! -f "${serverlist}" ]; then
289+
echo "[ FAIL ] serverlist.csv could not be loaded."
290+
exit 1
291+
fi
292+
293293
if [ "${userinput}" == "list" ]||[ "${userinput}" == "l" ]; then
294294
{
295295
tail -n +2 "${serverlist}" | awk -F "," '{print $2 "\t" $3}'
@@ -381,7 +381,7 @@ else
381381
# Enables ANSI colours from core_messages.sh. Can be disabled with ansi=off.
382382
fn_ansi_loader
383383
# Prevents running of core_exit.sh for Travis-CI.
384-
if [ "${travistest}" != "1" ]; then
384+
if [ -z "${travistest}" ]; then
385385
getopt=$1
386386
core_getopt.sh
387387
fi

tests/tests_mcserver.sh

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,7 @@ if [ -f ".dev-debug" ]; then
2020
set -x
2121
fi
2222

23-
travistest="1"
24-
version="v19.6.0"
23+
version="v19.9.0"
2524
shortname="mc"
2625
gameservername="mcserver"
2726
rootdir="$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")"
@@ -48,6 +47,9 @@ userinput="${1}"
4847
if [ ! -v TRAVIS ]; then
4948
TRAVIS_BRANCH="develop"
5049
TRAVIS_BUILD_DIR="${rootdir}"
50+
else
51+
servicename="travis"
52+
travistest="1"
5153
fi
5254

5355
## GitHub Branch Select
@@ -65,8 +67,6 @@ core_functions.sh(){
6567

6668
# Bootstrap
6769
# Fetches the core functions required before passed off to core_dl.sh.
68-
69-
# Fetches core functions.
7070
fn_bootstrap_fetch_file(){
7171
remote_fileurl="${1}"
7272
local_filedir="${2}"
@@ -281,15 +281,15 @@ if [ "$(whoami)" == "root" ]; then
281281
fi
282282
fi
283283

284-
# Download the latest serverlist. This is the complete list of all supported servers.
285-
fn_bootstrap_fetch_file_github "lgsm/data" "serverlist.csv" "${datadir}" "nochmodx" "norun" "forcedl" "nomd5"
286-
if [ ! -f "${serverlist}" ]; then
287-
echo "[ FAIL ] serverlist.csv could not be loaded."
288-
exit 1
289-
fi
290-
291284
# LinuxGSM installer mode.
292285
if [ "${shortname}" == "core" ]; then
286+
# Download the latest serverlist. This is the complete list of all supported servers.
287+
fn_bootstrap_fetch_file_github "lgsm/data" "serverlist.csv" "${datadir}" "nochmodx" "norun" "forcedl" "nomd5"
288+
if [ ! -f "${serverlist}" ]; then
289+
echo "[ FAIL ] serverlist.csv could not be loaded."
290+
exit 1
291+
fi
292+
293293
if [ "${userinput}" == "list" ]||[ "${userinput}" == "l" ]; then
294294
{
295295
tail -n +2 "${serverlist}" | awk -F "," '{print $2 "\t" $3}'
@@ -381,7 +381,7 @@ else
381381
# Enables ANSI colours from core_messages.sh. Can be disabled with ansi=off.
382382
fn_ansi_loader
383383
# Prevents running of core_exit.sh for Travis-CI.
384-
if [ "${travistest}" != "1" ]; then
384+
if [ -z "${travistest}" ]; then
385385
getopt=$1
386386
core_getopt.sh
387387
fi

tests/tests_ts3server.sh

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,7 @@ if [ -f ".dev-debug" ]; then
2020
set -x
2121
fi
2222

23-
travistest="1"
24-
version="v19.6.0"
23+
version="v19.9.0"
2524
shortname="ts3"
2625
gameservername="ts3server"
2726
rootdir="$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")"
@@ -48,6 +47,9 @@ userinput="${1}"
4847
if [ ! -v TRAVIS ]; then
4948
TRAVIS_BRANCH="develop"
5049
TRAVIS_BUILD_DIR="${rootdir}"
50+
else
51+
servicename="travis"
52+
travistest="1"
5153
fi
5254

5355
## GitHub Branch Select
@@ -65,8 +67,6 @@ core_functions.sh(){
6567

6668
# Bootstrap
6769
# Fetches the core functions required before passed off to core_dl.sh.
68-
69-
# Fetches core functions.
7070
fn_bootstrap_fetch_file(){
7171
remote_fileurl="${1}"
7272
local_filedir="${2}"
@@ -281,15 +281,15 @@ if [ "$(whoami)" == "root" ]; then
281281
fi
282282
fi
283283

284-
# Download the latest serverlist. This is the complete list of all supported servers.
285-
fn_bootstrap_fetch_file_github "lgsm/data" "serverlist.csv" "${datadir}" "nochmodx" "norun" "forcedl" "nomd5"
286-
if [ ! -f "${serverlist}" ]; then
287-
echo "[ FAIL ] serverlist.csv could not be loaded."
288-
exit 1
289-
fi
290-
291284
# LinuxGSM installer mode.
292285
if [ "${shortname}" == "core" ]; then
286+
# Download the latest serverlist. This is the complete list of all supported servers.
287+
fn_bootstrap_fetch_file_github "lgsm/data" "serverlist.csv" "${datadir}" "nochmodx" "norun" "forcedl" "nomd5"
288+
if [ ! -f "${serverlist}" ]; then
289+
echo "[ FAIL ] serverlist.csv could not be loaded."
290+
exit 1
291+
fi
292+
293293
if [ "${userinput}" == "list" ]||[ "${userinput}" == "l" ]; then
294294
{
295295
tail -n +2 "${serverlist}" | awk -F "," '{print $2 "\t" $3}'
@@ -381,7 +381,7 @@ else
381381
# Enables ANSI colours from core_messages.sh. Can be disabled with ansi=off.
382382
fn_ansi_loader
383383
# Prevents running of core_exit.sh for Travis-CI.
384-
if [ "${travistest}" != "1" ]; then
384+
if [ -z "${travistest}" ]; then
385385
getopt=$1
386386
core_getopt.sh
387387
fi

0 commit comments

Comments
 (0)