Skip to content

Commit

Permalink
fix(travis-ci): resolve broken tests (#2440)
Browse files Browse the repository at this point in the history
  • Loading branch information
dgibbs64 committed Jul 10, 2019
1 parent ee22552 commit e054678
Show file tree
Hide file tree
Showing 5 changed files with 42 additions and 41 deletions.
2 changes: 1 addition & 1 deletion lgsm/config-default/config-lgsm/btserver/_default.cfg
Expand Up @@ -109,7 +109,7 @@ glibc="2.17"
## Server Specific Directories ## Server Specific Directories
systemdir="${serverfiles}" systemdir="${serverfiles}"
executabledir="${systemdir}" executabledir="${systemdir}"
executable="./DedicatedServer" executable="./Launch_DedicatedServer"
servercfg="serversettings.xml" servercfg="serversettings.xml"
servercfgdefault="serversettings.xml" servercfgdefault="serversettings.xml"
servercfgdir="${systemdir}" servercfgdir="${systemdir}"
Expand Down
9 changes: 5 additions & 4 deletions tests/tests_fctrserver.sh
Expand Up @@ -20,8 +20,7 @@ if [ -f ".dev-debug" ]; then
set -x set -x
fi fi


travistest="1" version="v19.9.0"
version="v19.6.0"
shortname="fctr" shortname="fctr"
gameservername="fctrserver" gameservername="fctrserver"
rootdir="$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")" rootdir="$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")"
Expand All @@ -48,6 +47,9 @@ userinput="${1}"
if [ ! -v TRAVIS ]; then if [ ! -v TRAVIS ]; then
TRAVIS_BRANCH="develop" TRAVIS_BRANCH="develop"
TRAVIS_BUILD_DIR="${rootdir}" TRAVIS_BUILD_DIR="${rootdir}"
else
servicename="travis"
travistest="1"
fi fi


## GitHub Branch Select ## GitHub Branch Select
Expand Down Expand Up @@ -381,7 +383,7 @@ else
# Enables ANSI colours from core_messages.sh. Can be disabled with ansi=off. # Enables ANSI colours from core_messages.sh. Can be disabled with ansi=off.
fn_ansi_loader fn_ansi_loader
# Prevents running of core_exit.sh for Travis-CI. # Prevents running of core_exit.sh for Travis-CI.
if [ "${travistest}" != "1" ]; then if [ -z "${travistest}" ]; then
getopt=$1 getopt=$1
core_getopt.sh core_getopt.sh
fi fi
Expand Down Expand Up @@ -782,7 +784,6 @@ grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g
echo "" echo ""
echo "5.0 - Monitor Tests" echo "5.0 - Monitor Tests"
echo "==================================================================" echo "=================================================================="

echo "" echo ""
echo "Server IP - Port: ${ip}:${port}" echo "Server IP - Port: ${ip}:${port}"
echo "Server IP - Query Port: ${ip}:${queryport}" echo "Server IP - Query Port: ${ip}:${queryport}"
Expand Down
24 changes: 12 additions & 12 deletions tests/tests_jc2server.sh
Expand Up @@ -20,8 +20,7 @@ if [ -f ".dev-debug" ]; then
set -x set -x
fi fi


travistest="1" version="v19.9.0"
version="v19.6.0"
shortname="jc2" shortname="jc2"
gameservername="jc2server" gameservername="jc2server"
rootdir="$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")" rootdir="$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")"
Expand All @@ -48,6 +47,9 @@ userinput="${1}"
if [ ! -v TRAVIS ]; then if [ ! -v TRAVIS ]; then
TRAVIS_BRANCH="develop" TRAVIS_BRANCH="develop"
TRAVIS_BUILD_DIR="${rootdir}" TRAVIS_BUILD_DIR="${rootdir}"
else
servicename="travis"
travistest="1"
fi fi


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


# Bootstrap # Bootstrap
# Fetches the core functions required before passed off to core_dl.sh. # Fetches the core functions required before passed off to core_dl.sh.

# Fetches core functions.
fn_bootstrap_fetch_file(){ fn_bootstrap_fetch_file(){
remote_fileurl="${1}" remote_fileurl="${1}"
local_filedir="${2}" local_filedir="${2}"
Expand Down Expand Up @@ -281,15 +281,15 @@ if [ "$(whoami)" == "root" ]; then
fi fi
fi fi


# Download the latest serverlist. This is the complete list of all supported servers.
fn_bootstrap_fetch_file_github "lgsm/data" "serverlist.csv" "${datadir}" "nochmodx" "norun" "forcedl" "nomd5"
if [ ! -f "${serverlist}" ]; then
echo "[ FAIL ] serverlist.csv could not be loaded."
exit 1
fi

# LinuxGSM installer mode. # LinuxGSM installer mode.
if [ "${shortname}" == "core" ]; then if [ "${shortname}" == "core" ]; then
# Download the latest serverlist. This is the complete list of all supported servers.
fn_bootstrap_fetch_file_github "lgsm/data" "serverlist.csv" "${datadir}" "nochmodx" "norun" "forcedl" "nomd5"
if [ ! -f "${serverlist}" ]; then
echo "[ FAIL ] serverlist.csv could not be loaded."
exit 1
fi

if [ "${userinput}" == "list" ]||[ "${userinput}" == "l" ]; then if [ "${userinput}" == "list" ]||[ "${userinput}" == "l" ]; then
{ {
tail -n +2 "${serverlist}" | awk -F "," '{print $2 "\t" $3}' tail -n +2 "${serverlist}" | awk -F "," '{print $2 "\t" $3}'
Expand Down Expand Up @@ -381,7 +381,7 @@ else
# Enables ANSI colours from core_messages.sh. Can be disabled with ansi=off. # Enables ANSI colours from core_messages.sh. Can be disabled with ansi=off.
fn_ansi_loader fn_ansi_loader
# Prevents running of core_exit.sh for Travis-CI. # Prevents running of core_exit.sh for Travis-CI.
if [ "${travistest}" != "1" ]; then if [ -z "${travistest}" ]; then
getopt=$1 getopt=$1
core_getopt.sh core_getopt.sh
fi fi
Expand Down
24 changes: 12 additions & 12 deletions tests/tests_mcserver.sh
Expand Up @@ -20,8 +20,7 @@ if [ -f ".dev-debug" ]; then
set -x set -x
fi fi


travistest="1" version="v19.9.0"
version="v19.6.0"
shortname="mc" shortname="mc"
gameservername="mcserver" gameservername="mcserver"
rootdir="$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")" rootdir="$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")"
Expand All @@ -48,6 +47,9 @@ userinput="${1}"
if [ ! -v TRAVIS ]; then if [ ! -v TRAVIS ]; then
TRAVIS_BRANCH="develop" TRAVIS_BRANCH="develop"
TRAVIS_BUILD_DIR="${rootdir}" TRAVIS_BUILD_DIR="${rootdir}"
else
servicename="travis"
travistest="1"
fi fi


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


# Bootstrap # Bootstrap
# Fetches the core functions required before passed off to core_dl.sh. # Fetches the core functions required before passed off to core_dl.sh.

# Fetches core functions.
fn_bootstrap_fetch_file(){ fn_bootstrap_fetch_file(){
remote_fileurl="${1}" remote_fileurl="${1}"
local_filedir="${2}" local_filedir="${2}"
Expand Down Expand Up @@ -281,15 +281,15 @@ if [ "$(whoami)" == "root" ]; then
fi fi
fi fi


# Download the latest serverlist. This is the complete list of all supported servers.
fn_bootstrap_fetch_file_github "lgsm/data" "serverlist.csv" "${datadir}" "nochmodx" "norun" "forcedl" "nomd5"
if [ ! -f "${serverlist}" ]; then
echo "[ FAIL ] serverlist.csv could not be loaded."
exit 1
fi

# LinuxGSM installer mode. # LinuxGSM installer mode.
if [ "${shortname}" == "core" ]; then if [ "${shortname}" == "core" ]; then
# Download the latest serverlist. This is the complete list of all supported servers.
fn_bootstrap_fetch_file_github "lgsm/data" "serverlist.csv" "${datadir}" "nochmodx" "norun" "forcedl" "nomd5"
if [ ! -f "${serverlist}" ]; then
echo "[ FAIL ] serverlist.csv could not be loaded."
exit 1
fi

if [ "${userinput}" == "list" ]||[ "${userinput}" == "l" ]; then if [ "${userinput}" == "list" ]||[ "${userinput}" == "l" ]; then
{ {
tail -n +2 "${serverlist}" | awk -F "," '{print $2 "\t" $3}' tail -n +2 "${serverlist}" | awk -F "," '{print $2 "\t" $3}'
Expand Down Expand Up @@ -381,7 +381,7 @@ else
# Enables ANSI colours from core_messages.sh. Can be disabled with ansi=off. # Enables ANSI colours from core_messages.sh. Can be disabled with ansi=off.
fn_ansi_loader fn_ansi_loader
# Prevents running of core_exit.sh for Travis-CI. # Prevents running of core_exit.sh for Travis-CI.
if [ "${travistest}" != "1" ]; then if [ -z "${travistest}" ]; then
getopt=$1 getopt=$1
core_getopt.sh core_getopt.sh
fi fi
Expand Down
24 changes: 12 additions & 12 deletions tests/tests_ts3server.sh
Expand Up @@ -20,8 +20,7 @@ if [ -f ".dev-debug" ]; then
set -x set -x
fi fi


travistest="1" version="v19.9.0"
version="v19.6.0"
shortname="ts3" shortname="ts3"
gameservername="ts3server" gameservername="ts3server"
rootdir="$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")" rootdir="$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")"
Expand All @@ -48,6 +47,9 @@ userinput="${1}"
if [ ! -v TRAVIS ]; then if [ ! -v TRAVIS ]; then
TRAVIS_BRANCH="develop" TRAVIS_BRANCH="develop"
TRAVIS_BUILD_DIR="${rootdir}" TRAVIS_BUILD_DIR="${rootdir}"
else
servicename="travis"
travistest="1"
fi fi


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


# Bootstrap # Bootstrap
# Fetches the core functions required before passed off to core_dl.sh. # Fetches the core functions required before passed off to core_dl.sh.

# Fetches core functions.
fn_bootstrap_fetch_file(){ fn_bootstrap_fetch_file(){
remote_fileurl="${1}" remote_fileurl="${1}"
local_filedir="${2}" local_filedir="${2}"
Expand Down Expand Up @@ -281,15 +281,15 @@ if [ "$(whoami)" == "root" ]; then
fi fi
fi fi


# Download the latest serverlist. This is the complete list of all supported servers.
fn_bootstrap_fetch_file_github "lgsm/data" "serverlist.csv" "${datadir}" "nochmodx" "norun" "forcedl" "nomd5"
if [ ! -f "${serverlist}" ]; then
echo "[ FAIL ] serverlist.csv could not be loaded."
exit 1
fi

# LinuxGSM installer mode. # LinuxGSM installer mode.
if [ "${shortname}" == "core" ]; then if [ "${shortname}" == "core" ]; then
# Download the latest serverlist. This is the complete list of all supported servers.
fn_bootstrap_fetch_file_github "lgsm/data" "serverlist.csv" "${datadir}" "nochmodx" "norun" "forcedl" "nomd5"
if [ ! -f "${serverlist}" ]; then
echo "[ FAIL ] serverlist.csv could not be loaded."
exit 1
fi

if [ "${userinput}" == "list" ]||[ "${userinput}" == "l" ]; then if [ "${userinput}" == "list" ]||[ "${userinput}" == "l" ]; then
{ {
tail -n +2 "${serverlist}" | awk -F "," '{print $2 "\t" $3}' tail -n +2 "${serverlist}" | awk -F "," '{print $2 "\t" $3}'
Expand Down Expand Up @@ -381,7 +381,7 @@ else
# Enables ANSI colours from core_messages.sh. Can be disabled with ansi=off. # Enables ANSI colours from core_messages.sh. Can be disabled with ansi=off.
fn_ansi_loader fn_ansi_loader
# Prevents running of core_exit.sh for Travis-CI. # Prevents running of core_exit.sh for Travis-CI.
if [ "${travistest}" != "1" ]; then if [ -z "${travistest}" ]; then
getopt=$1 getopt=$1
core_getopt.sh core_getopt.sh
fi fi
Expand Down

0 comments on commit e054678

Please sign in to comment.