Browse Source

List function files that the commands run though

forgot to add file


corrected filename


test


trying another location


building tree


test


test


test


pwd


test


absolute path


builf path


date


travis build dir


moar tests


cat dev-debug.log


test grep


test


added feature to jc2server


removed debug at top
pull/1863/head
Daniel Gibbs 7 years ago
parent
commit
4e19031832
  1. 1
      .travis.yml
  2. 313
      tests/tests_jc2server.sh
  3. 225
      tests/tests_ts3server.sh

1
.travis.yml

@ -31,6 +31,7 @@ addons:
- net-tools - net-tools
- iproute2 - iproute2
- shellcheck - shellcheck
- tree
jobs: jobs:
include: include:

313
tests/tests_jc2server.sh

@ -9,13 +9,6 @@
travistest="1" travistest="1"
# Debugging
if [ -f ".dev-debug" ]; then
exec 5>dev-debug.log
BASH_XTRACEFD="5"
set -x
fi
version="171014" version="171014"
shortname="jc2" shortname="jc2"
gameservername="jc2server" gameservername="jc2server"
@ -474,25 +467,49 @@ echo "================================="
echo "Description:" echo "Description:"
echo "Create log dir's" echo "Create log dir's"
echo "" echo ""
(install_logs.sh) (
exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log"
BASH_XTRACEFD="5"
set -x
install_logs.sh
)
echo "run order"
echo "================="
grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log"| sed 's/functionfile=//g'
echo "0.2 - Enable dev-debug" echo "0.2 - Enable dev-debug"
echo "=================================" echo "================================="
echo "Description:" echo "Description:"
echo "Enable dev-debug" echo "Enable dev-debug"
echo "" echo ""
(command_dev_debug.sh) (
exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log"
BASH_XTRACEFD="5"
set -x
command_dev_debug.sh
)
fn_test_result_pass fn_test_result_pass
echo "run order"
echo "================="
grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log"| sed 's/functionfile=//g'
echo ""
echo "1.0 - start - no files" echo "1.0 - start - no files"
echo "=================================" echo "================================="
echo "Description:" echo "Description:"
echo "test script reaction to missing server files." echo "test script reaction to missing server files."
echo "Command: ./jc2server start" echo "Command: ./jc2server start"
echo "" echo ""
(command_start.sh) (
exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log"
BASH_XTRACEFD="5"
set -x
command_start.sh
)
fn_test_result_fail fn_test_result_fail
echo "run order"
echo "================="
grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log"| sed 's/functionfile=//g'
echo "" echo ""
echo "1.1 - getopt" echo "1.1 - getopt"
@ -501,8 +518,16 @@ echo "Description:"
echo "displaying options messages." echo "displaying options messages."
echo "Command: ./jc2server" echo "Command: ./jc2server"
echo "" echo ""
(core_getopt.sh) (
exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log"
BASH_XTRACEFD="5"
set -x
core_getopt.sh
)
fn_test_result_pass fn_test_result_pass
echo "run order"
echo "================="
grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log"| sed 's/functionfile=//g'
echo "" echo ""
echo "1.2 - getopt with incorrect args" echo "1.2 - getopt with incorrect args"
@ -512,8 +537,16 @@ echo "displaying options messages."
echo "Command: ./jc2server abc123" echo "Command: ./jc2server abc123"
echo "" echo ""
getopt="abc123" getopt="abc123"
(core_getopt.sh) (
exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log"
BASH_XTRACEFD="5"
set -x
core_getopt.sh
)
fn_test_result_fail fn_test_result_fail
echo "run order"
echo "================="
grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log"| sed 's/functionfile=//g'
echo "" echo ""
echo "2.0 - install" echo "2.0 - install"
@ -521,8 +554,16 @@ echo "================================="
echo "Description:" echo "Description:"
echo "install ${gamename} server." echo "install ${gamename} server."
echo "Command: ./jc2server auto-install" echo "Command: ./jc2server auto-install"
(fn_autoinstall) (
exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log"
BASH_XTRACEFD="5"
set -x
fn_autoinstall
)
fn_test_result_pass fn_test_result_pass
echo "run order"
echo "================="
grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log"| sed 's/functionfile=//g'
echo "" echo ""
echo "3.1 - start" echo "3.1 - start"
@ -532,8 +573,16 @@ echo "start ${gamename} server."
echo "Command: ./jc2server start" echo "Command: ./jc2server start"
requiredstatus="OFFLINE" requiredstatus="OFFLINE"
fn_setstatus fn_setstatus
(command_start.sh) (
exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log"
BASH_XTRACEFD="5"
set -x
command_start.sh
)
fn_test_result_pass fn_test_result_pass
echo "run order"
echo "================="
grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log"| sed 's/functionfile=//g'
echo "" echo ""
echo "3.2 - start - online" echo "3.2 - start - online"
@ -543,8 +592,16 @@ echo "start ${gamename} server while already running."
echo "Command: ./jc2server start" echo "Command: ./jc2server start"
requiredstatus="ONLINE" requiredstatus="ONLINE"
fn_setstatus fn_setstatus
(command_start.sh) (
exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log"
BASH_XTRACEFD="5"
set -x
command_start.sh
)
fn_test_result_fail fn_test_result_fail
echo "run order"
echo "================="
grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log"| sed 's/functionfile=//g'
echo "" echo ""
echo "3.3 - start - updateonstart" echo "3.3 - start - updateonstart"
@ -554,8 +611,16 @@ echo "will update server on start."
echo "Command: ./jc2server start" echo "Command: ./jc2server start"
requiredstatus="OFFLINE" requiredstatus="OFFLINE"
fn_setstatus fn_setstatus
(updateonstart="on";command_start.sh) (
exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log"
BASH_XTRACEFD="5"
set -x
updateonstart="on";command_start.sh
)
fn_test_result_pass fn_test_result_pass
echo "run order"
echo "================="
grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log"| sed 's/functionfile=//g'
echo "" echo ""
echo "3.4 - stop" echo "3.4 - stop"
@ -565,8 +630,16 @@ echo "stop ${gamename} server."
echo "Command: ./jc2server stop" echo "Command: ./jc2server stop"
requiredstatus="ONLINE" requiredstatus="ONLINE"
fn_setstatus fn_setstatus
(command_stop.sh) (
exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log"
BASH_XTRACEFD="5"
set -x
command_stop.sh
)
fn_test_result_pass fn_test_result_pass
echo "run order"
echo "================="
grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log"| sed 's/functionfile=//g'
echo "" echo ""
echo "3.5 - stop - offline" echo "3.5 - stop - offline"
@ -576,8 +649,16 @@ echo "stop ${gamename} server while already stopped."
echo "Command: ./jc2server stop" echo "Command: ./jc2server stop"
requiredstatus="OFFLINE" requiredstatus="OFFLINE"
fn_setstatus fn_setstatus
(command_stop.sh) (
exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log"
BASH_XTRACEFD="5"
set -x
command_stop.sh
)
fn_test_result_fail fn_test_result_fail
echo "run order"
echo "================="
grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log"| sed 's/functionfile=//g'
echo "" echo ""
echo "3.6 - restart" echo "3.6 - restart"
@ -587,8 +668,16 @@ echo "restart ${gamename}."
echo "Command: ./jc2server restart" echo "Command: ./jc2server restart"
requiredstatus="ONLINE" requiredstatus="ONLINE"
fn_setstatus fn_setstatus
(command_restart.sh) (
exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log"
BASH_XTRACEFD="5"
set -x
command_restart.sh
)
fn_test_result_pass fn_test_result_pass
echo "run order"
echo "================="
grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log"| sed 's/functionfile=//g'
echo "" echo ""
echo "3.7 - restart - offline" echo "3.7 - restart - offline"
@ -598,8 +687,16 @@ echo "restart ${gamename} while already stopped."
echo "Command: ./jc2server restart" echo "Command: ./jc2server restart"
requiredstatus="OFFLINE" requiredstatus="OFFLINE"
fn_setstatus fn_setstatus
(command_restart.sh) (
exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log"
BASH_XTRACEFD="5"
set -x
command_restart.sh
)
fn_test_result_pass fn_test_result_pass
echo "run order"
echo "================="
grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log"| sed 's/functionfile=//g'
echo "4.1 - update" echo "4.1 - update"
echo "=================================" echo "================================="
@ -608,8 +705,16 @@ echo "check for updates."
echo "Command: ./jc2server update" echo "Command: ./jc2server update"
requiredstatus="OFFLINE" requiredstatus="OFFLINE"
fn_setstatus fn_setstatus
(command_update.sh) (
exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log"
BASH_XTRACEFD="5"
set -x
command_update.sh
)
fn_test_result_pass fn_test_result_pass
echo "run order"
echo "================="
grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log"| sed 's/functionfile=//g'
echo "" echo ""
echo "4.2 - update - change buildid" echo "4.2 - update - change buildid"
@ -621,8 +726,16 @@ requiredstatus="OFFLINE"
fn_setstatus fn_setstatus
fn_print_info_nl "changed buildid to 0." fn_print_info_nl "changed buildid to 0."
sed -i 's/[0-9]\+/0/' "${serverfiles}/steamapps/appmanifest_${appid}.acf" sed -i 's/[0-9]\+/0/' "${serverfiles}/steamapps/appmanifest_${appid}.acf"
(command_update.sh) (
exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log"
BASH_XTRACEFD="5"
set -x
command_update.sh
)
fn_test_result_pass fn_test_result_pass
echo "run order"
echo "================="
grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log"| sed 's/functionfile=//g'
echo "" echo ""
echo "4.3 - update - change buildid - online" echo "4.3 - update - change buildid - online"
@ -634,8 +747,16 @@ requiredstatus="ONLINE"
fn_setstatus fn_setstatus
fn_print_info_nl "changed buildid to 0." fn_print_info_nl "changed buildid to 0."
sed -i 's/[0-9]\+/0/' "${serverfiles}/steamapps/appmanifest_${appid}.acf" sed -i 's/[0-9]\+/0/' "${serverfiles}/steamapps/appmanifest_${appid}.acf"
(command_update.sh) (
exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log"
BASH_XTRACEFD="5"
set -x
command_update.sh
)
fn_test_result_pass fn_test_result_pass
echo "run order"
echo "================="
grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log"| sed 's/functionfile=//g'
echo "" echo ""
echo "4.4 - update - remove appmanifest file" echo "4.4 - update - remove appmanifest file"
@ -647,8 +768,16 @@ requiredstatus="OFFLINE"
fn_setstatus fn_setstatus
fn_print_info_nl "removed appmanifest_${appid}.acf." fn_print_info_nl "removed appmanifest_${appid}.acf."
rm --verbose "${serverfiles}/steamapps/appmanifest_${appid}.acf" rm --verbose "${serverfiles}/steamapps/appmanifest_${appid}.acf"
(command_update.sh) (
exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log"
BASH_XTRACEFD="5"
set -x
command_update.sh
)
fn_test_result_pass fn_test_result_pass
echo "run order"
echo "================="
grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log"| sed 's/functionfile=//g'
echo "" echo ""
echo "4.5 - force-update" echo "4.5 - force-update"
@ -658,8 +787,16 @@ echo "force-update bypassing update check."
echo "Command: ./jc2server force-update" echo "Command: ./jc2server force-update"
requiredstatus="OFFLINE" requiredstatus="OFFLINE"
fn_setstatus fn_setstatus
(forceupdate=1;command_update.sh) (
exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log"
BASH_XTRACEFD="5"
set -x
forceupdate=1;command_update.sh
)
fn_test_result_pass fn_test_result_pass
echo "run order"
echo "================="
grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log"| sed 's/functionfile=//g'
echo "" echo ""
echo "4.6 - force-update - online" echo "4.6 - force-update - online"
@ -669,8 +806,16 @@ echo "force-update bypassing update check server while already running."
echo "Command: ./jc2server force-update" echo "Command: ./jc2server force-update"
requiredstatus="ONLINE" requiredstatus="ONLINE"
fn_setstatus fn_setstatus
(forceupdate=1;command_update.sh) (
exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log"
BASH_XTRACEFD="5"
set -x
forceupdate=1;command_update.sh
)
fn_test_result_pass fn_test_result_pass
echo "run order"
echo "================="
grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log"| sed 's/functionfile=//g'
echo "" echo ""
echo "4.7 - validate" echo "4.7 - validate"
@ -680,8 +825,16 @@ echo "validate server files."
echo "Command: ./jc2server validate" echo "Command: ./jc2server validate"
requiredstatus="OFFLINE" requiredstatus="OFFLINE"
fn_setstatus fn_setstatus
(command_validate.sh) (
exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log"
BASH_XTRACEFD="5"
set -x
command_validate.sh
)
fn_test_result_pass fn_test_result_pass
echo "run order"
echo "================="
grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log"| sed 's/functionfile=//g'
echo "" echo ""
echo "4.8 - validate - online" echo "4.8 - validate - online"
@ -692,8 +845,16 @@ echo ""
echo "Command: ./jc2server validate" echo "Command: ./jc2server validate"
requiredstatus="ONLINE" requiredstatus="ONLINE"
fn_setstatus fn_setstatus
(command_validate.sh) (
exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log"
BASH_XTRACEFD="5"
set -x
command_validate.sh
)
fn_test_result_pass fn_test_result_pass
echo "run order"
echo "================="
grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log"| sed 's/functionfile=//g'
echo "" echo ""
echo "Inserting IP address" echo "Inserting IP address"
@ -713,8 +874,16 @@ echo "run monitor server while already running."
echo "Command: ./jc2server monitor" echo "Command: ./jc2server monitor"
requiredstatus="ONLINE" requiredstatus="ONLINE"
fn_setstatus fn_setstatus
(command_monitor.sh) (
exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log"
BASH_XTRACEFD="5"
set -x
command_monitor.sh
)
fn_test_result_pass fn_test_result_pass
echo "run order"
echo "================="
grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log"| sed 's/functionfile=//g'
echo "" echo ""
echo "5.2 - monitor - offline - with lockfile" echo "5.2 - monitor - offline - with lockfile"
@ -726,8 +895,16 @@ requiredstatus="OFFLINE"
fn_setstatus fn_setstatus
fn_print_info_nl "creating lockfile." fn_print_info_nl "creating lockfile."
date > "${rootdir}/${lockselfname}" date > "${rootdir}/${lockselfname}"
(command_monitor.sh) (
exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log"
BASH_XTRACEFD="5"
set -x
command_monitor.sh
)
fn_test_result_pass fn_test_result_pass
echo "run order"
echo "================="
grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log"| sed 's/functionfile=//g'
echo "" echo ""
echo "5.3 - monitor - offline - no lockfile" echo "5.3 - monitor - offline - no lockfile"
@ -737,8 +914,16 @@ echo "run monitor while server is offline with no lockfile."
echo "Command: ./jc2server monitor" echo "Command: ./jc2server monitor"
requiredstatus="OFFLINE" requiredstatus="OFFLINE"
fn_setstatus fn_setstatus
(command_monitor.sh) (
exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log"
BASH_XTRACEFD="5"
set -x
command_monitor.sh
)
fn_test_result_fail fn_test_result_fail
echo "run order"
echo "================="
grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log"| sed 's/functionfile=//g'
echo "" echo ""
echo "5.4 - monitor - gsquery.py failure" echo "5.4 - monitor - gsquery.py failure"
@ -750,8 +935,17 @@ requiredstatus="ONLINE"
fn_setstatus fn_setstatus
cp "${servercfgfullpath}" "config.lua" cp "${servercfgfullpath}" "config.lua"
sed -i 's/[0-9]\+/0/' "${servercfgfullpath}" sed -i 's/[0-9]\+/0/' "${servercfgfullpath}"
(command_monitor.sh) (
exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log"
BASH_XTRACEFD="5"
set -x
command_monitor.sh
)
fn_test_result_fail fn_test_result_fail
echo "run order"
echo "================="
grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log"| sed 's/functionfile=//g'
echo "" echo ""
fn_print_info_nl "Re-generating ${servercfg}." fn_print_info_nl "Re-generating ${servercfg}."
cp -v "config.lua" "${servercfgfullpath}" cp -v "config.lua" "${servercfgfullpath}"
@ -765,8 +959,16 @@ echo "display details."
echo "Command: ./jc2server details" echo "Command: ./jc2server details"
requiredstatus="ONLINE" requiredstatus="ONLINE"
fn_setstatus fn_setstatus
(command_details.sh) (
exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log"
BASH_XTRACEFD="5"
set -x
command_details.sh
)
fn_test_result_pass fn_test_result_pass
echo "run order"
echo "================="
grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log"| sed 's/functionfile=//g'
echo "" echo ""
echo "6.1 - post details" echo "6.1 - post details"
@ -776,8 +978,16 @@ echo "post details."
echo "Command: ./jc2server postdetails" echo "Command: ./jc2server postdetails"
requiredstatus="ONLINE" requiredstatus="ONLINE"
fn_setstatus fn_setstatus
(command_postdetails.sh) (
exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log"
BASH_XTRACEFD="5"
set -x
command_postdetails.sh
)
fn_test_result_pass fn_test_result_pass
echo "run order"
echo "================="
grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log"| sed 's/functionfile=//g'
echo "" echo ""
echo "7.0 - backup" echo "7.0 - backup"
@ -790,6 +1000,9 @@ fn_setstatus
echo "test de-activated until issue #1839 fixed" echo "test de-activated until issue #1839 fixed"
#(command_backup.sh) #(command_backup.sh)
fn_test_result_pass fn_test_result_pass
echo "run order"
echo "================="
grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log"| sed 's/functionfile=//g'
echo "" echo ""
echo "8.0 - dev - detect glibc" echo "8.0 - dev - detect glibc"
@ -799,8 +1012,16 @@ echo "detect glibc."
echo "Command: ./jc2server detect-glibc" echo "Command: ./jc2server detect-glibc"
requiredstatus="ONLINE" requiredstatus="ONLINE"
fn_setstatus fn_setstatus
(command_dev_detect_glibc.sh) (
exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log"
BASH_XTRACEFD="5"
set -x
command_dev_detect_glibc.sh
)
fn_test_result_pass fn_test_result_pass
echo "run order"
echo "================="
grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log"| sed 's/functionfile=//g'
echo "" echo ""
echo "8.1 - dev - detect ldd" echo "8.1 - dev - detect ldd"
@ -810,8 +1031,16 @@ echo "detect ldd."
echo "Command: ./jc2server detect-ldd" echo "Command: ./jc2server detect-ldd"
requiredstatus="ONLINE" requiredstatus="ONLINE"
fn_setstatus fn_setstatus
(command_dev_detect_ldd.sh) (
exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log"
BASH_XTRACEFD="5"
set -x
command_dev_detect_ldd.sh
)
fn_test_result_pass fn_test_result_pass
echo "run order"
echo "================="
grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log"| sed 's/functionfile=//g'
echo "" echo ""
echo "8.2 - dev - detect deps" echo "8.2 - dev - detect deps"
@ -821,8 +1050,16 @@ echo "detect dependencies."
echo "Command: ./jc2server detect-deps" echo "Command: ./jc2server detect-deps"
requiredstatus="ONLINE" requiredstatus="ONLINE"
fn_setstatus fn_setstatus
(command_dev_detect_deps.sh) (
exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log"
BASH_XTRACEFD="5"
set -x
command_dev_detect_deps.sh
)
fn_test_result_pass fn_test_result_pass
echo "run order"
echo "================="
grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log"| sed 's/functionfile=//g'
echo "" echo ""
echo "=================================" echo "================================="

225
tests/tests_ts3server.sh

@ -9,13 +9,6 @@
travistest="1" travistest="1"
# Debugging
if [ -f ".dev-debug" ]; then
exec 5>dev-debug.log
BASH_XTRACEFD="5"
set -x
fi
version="171014" version="171014"
shortname="ts3" shortname="ts3"
gameservername="ts3server" gameservername="ts3server"
@ -467,16 +460,24 @@ echo "Server Tests"
echo "Using: ${gamename}" echo "Using: ${gamename}"
echo "Testing Branch: $TRAVIS_BRANCH" echo "Testing Branch: $TRAVIS_BRANCH"
echo "=================================" echo "================================="
echo ""
echo ""
echo "0.1 - Create log dir's" echo "0.1 - Create log dir's"
echo "=================================" echo "================================="
echo "Description:" echo "Description:"
echo "Create log dir's" echo "Create log dir's"
echo "" echo ""
(install_logs.sh) (
exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log"
BASH_XTRACEFD="5"
set -x
install_logs.sh
)
echo "run order"
echo "================="
grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log"| sed 's/functionfile=//g'
echo""
echo "0.2 - Enable dev-debug" echo "0.2 - Enable dev-debug"
echo "=================================" echo "================================="
echo "Description:" echo "Description:"
@ -484,15 +485,27 @@ echo "Enable dev-debug"
echo "" echo ""
(command_dev_debug.sh) (command_dev_debug.sh)
fn_test_result_pass fn_test_result_pass
echo "run order"
echo "================="
grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log"| sed 's/functionfile=//g'
echo""
echo "1.0 - start - no files" echo "1.0 - start - no files"
echo "=================================" echo "================================="
echo "Description:" echo "Description:"
echo "test script reaction to missing server files." echo "test script reaction to missing server files."
echo "Command: ./ts3server start" echo "Command: ./ts3server start"
echo "" echo ""
(command_start.sh) (
exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log"
BASH_XTRACEFD="5"
set -x
command_start.sh
)
fn_test_result_fail fn_test_result_fail
echo "run order"
echo "================="
grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log"| sed 's/functionfile=//g'
echo "" echo ""
echo "1.1 - getopt" echo "1.1 - getopt"
@ -501,8 +514,16 @@ echo "Description:"
echo "displaying options messages." echo "displaying options messages."
echo "Command: ./ts3server" echo "Command: ./ts3server"
echo "" echo ""
(core_getopt.sh) (
exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log"
BASH_XTRACEFD="5"
set -x
core_getopt.sh
)
fn_test_result_pass fn_test_result_pass
echo "run order"
echo "================="
grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log"| sed 's/functionfile=//g'
echo "" echo ""
echo "1.2 - getopt with incorrect args" echo "1.2 - getopt with incorrect args"
@ -512,8 +533,16 @@ echo "displaying options messages."
echo "Command: ./ts3server abc123" echo "Command: ./ts3server abc123"
echo "" echo ""
getopt="abc123" getopt="abc123"
(core_getopt.sh) (
exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log"
BASH_XTRACEFD="5"
set -x
core_getopt.sh
)
fn_test_result_fail fn_test_result_fail
echo "run order"
echo "================="
grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log"| sed 's/functionfile=//g'
echo "" echo ""
echo "2.0 - install" echo "2.0 - install"
@ -521,8 +550,16 @@ echo "================================="
echo "Description:" echo "Description:"
echo "install ${gamename} server." echo "install ${gamename} server."
echo "Command: ./ts3server auto-install" echo "Command: ./ts3server auto-install"
(fn_autoinstall) (
exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log"
BASH_XTRACEFD="5"
set -x
fn_autoinstall
)
fn_test_result_pass fn_test_result_pass
echo "run order"
echo "================="
grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log"| sed 's/functionfile=//g'
echo "" echo ""
echo "3.1 - start" echo "3.1 - start"
@ -532,8 +569,16 @@ echo "start ${gamename} server."
echo "Command: ./ts3server start" echo "Command: ./ts3server start"
requiredstatus="OFFLINE" requiredstatus="OFFLINE"
fn_setstatus fn_setstatus
(command_start.sh) (
exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log"
BASH_XTRACEFD="5"
set -x
command_start.sh
)
fn_test_result_pass fn_test_result_pass
echo "run order"
echo "================="
grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log"| sed 's/functionfile=//g'
echo "" echo ""
echo "3.2 - start - online" echo "3.2 - start - online"
@ -543,7 +588,12 @@ echo "start ${gamename} server while already running."
echo "Command: ./ts3server start" echo "Command: ./ts3server start"
requiredstatus="ONLINE" requiredstatus="ONLINE"
fn_setstatus fn_setstatus
(command_start.sh) (
exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log"
BASH_XTRACEFD="5"
set -x
command_start.sh
)
fn_test_result_fail fn_test_result_fail
echo "" echo ""
@ -554,8 +604,16 @@ echo "will update server on start."
echo "Command: ./ts3server start" echo "Command: ./ts3server start"
requiredstatus="OFFLINE" requiredstatus="OFFLINE"
fn_setstatus fn_setstatus
(updateonstart="on";command_start.sh) (
exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log"
BASH_XTRACEFD="5"
set -x
updateonstart="on";command_start.sh
)
fn_test_result_pass fn_test_result_pass
echo "run order"
echo "================="
grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log"| sed 's/functionfile=//g'
echo "" echo ""
echo "3.4 - stop" echo "3.4 - stop"
@ -565,8 +623,16 @@ echo "stop ${gamename} server."
echo "Command: ./ts3server stop" echo "Command: ./ts3server stop"
requiredstatus="ONLINE" requiredstatus="ONLINE"
fn_setstatus fn_setstatus
(command_stop.sh) (
exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log"
BASH_XTRACEFD="5"
set -x
command_stop.sh
)
fn_test_result_pass fn_test_result_pass
echo "run order"
echo "================="
grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log"| sed 's/functionfile=//g'
echo "" echo ""
echo "3.5 - stop - offline" echo "3.5 - stop - offline"
@ -576,8 +642,16 @@ echo "stop ${gamename} server while already stopped."
echo "Command: ./ts3server stop" echo "Command: ./ts3server stop"
requiredstatus="OFFLINE" requiredstatus="OFFLINE"
fn_setstatus fn_setstatus
(command_stop.sh) (
exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log"
BASH_XTRACEFD="5"
set -x
command_stop.sh
)
fn_test_result_fail fn_test_result_fail
echo "run order"
echo "================="
grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log"| sed 's/functionfile=//g'
echo "" echo ""
echo "3.6 - restart" echo "3.6 - restart"
@ -587,8 +661,16 @@ echo "restart ${gamename}."
echo "Command: ./ts3server restart" echo "Command: ./ts3server restart"
requiredstatus="ONLINE" requiredstatus="ONLINE"
fn_setstatus fn_setstatus
(command_restart.sh) (
exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log"
BASH_XTRACEFD="5"
set -x
command_restart.sh
)
fn_test_result_pass fn_test_result_pass
echo "run order"
echo "================="
grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log"| sed 's/functionfile=//g'
echo "" echo ""
echo "3.7 - restart - offline" echo "3.7 - restart - offline"
@ -598,8 +680,16 @@ echo "restart ${gamename} while already stopped."
echo "Command: ./ts3server restart" echo "Command: ./ts3server restart"
requiredstatus="OFFLINE" requiredstatus="OFFLINE"
fn_setstatus fn_setstatus
(command_restart.sh) (
exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log"
BASH_XTRACEFD="5"
set -x
command_restart.sh
)
fn_test_result_pass fn_test_result_pass
echo "run order"
echo "================="
grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log"| sed 's/functionfile=//g'
echo "4.1 - update" echo "4.1 - update"
echo "=================================" echo "================================="
@ -608,8 +698,16 @@ echo "check for updates."
echo "Command: ./ts3server update" echo "Command: ./ts3server update"
requiredstatus="OFFLINE" requiredstatus="OFFLINE"
fn_setstatus fn_setstatus
(command_update.sh) (
exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log"
BASH_XTRACEFD="5"
set -x
command_update.sh
)
fn_test_result_pass fn_test_result_pass
echo "run order"
echo "================="
grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log"| sed 's/functionfile=//g'
echo "" echo ""
echo "5.1 - monitor - online" echo "5.1 - monitor - online"
@ -619,8 +717,16 @@ echo "run monitor server while already running."
echo "Command: ./ts3server monitor" echo "Command: ./ts3server monitor"
requiredstatus="ONLINE" requiredstatus="ONLINE"
fn_setstatus fn_setstatus
(command_monitor.sh) (
exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log"
BASH_XTRACEFD="5"
set -x
command_monitor.sh
)
fn_test_result_pass fn_test_result_pass
echo "run order"
echo "================="
grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log"| sed 's/functionfile=//g'
echo "" echo ""
echo "5.2 - monitor - offline - with lockfile" echo "5.2 - monitor - offline - with lockfile"
@ -632,8 +738,16 @@ requiredstatus="OFFLINE"
fn_setstatus fn_setstatus
fn_print_info_nl "creating lockfile." fn_print_info_nl "creating lockfile."
date > "${rootdir}/${lockselfname}" date > "${rootdir}/${lockselfname}"
(command_monitor.sh) (
exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log"
BASH_XTRACEFD="5"
set -x
command_monitor.sh
)
fn_test_result_pass fn_test_result_pass
echo "run order"
echo "================="
grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log"| sed 's/functionfile=//g'
echo "" echo ""
echo "5.3 - monitor - offline - no lockfile" echo "5.3 - monitor - offline - no lockfile"
@ -643,8 +757,16 @@ echo "run monitor while server is offline with no lockfile."
echo "Command: ./ts3server monitor" echo "Command: ./ts3server monitor"
requiredstatus="OFFLINE" requiredstatus="OFFLINE"
fn_setstatus fn_setstatus
(command_monitor.sh) (
exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log"
BASH_XTRACEFD="5"
set -x
command_monitor.sh
)
fn_test_result_fail fn_test_result_fail
echo "run order"
echo "================="
grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log"| sed 's/functionfile=//g'
echo "" echo ""
echo "6.0 - details" echo "6.0 - details"
@ -654,8 +776,16 @@ echo "display details."
echo "Command: ./ts3server details" echo "Command: ./ts3server details"
requiredstatus="ONLINE" requiredstatus="ONLINE"
fn_setstatus fn_setstatus
(command_details.sh) (
exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log"
BASH_XTRACEFD="5"
set -x
command_details.sh
)
fn_test_result_pass fn_test_result_pass
echo "run order"
echo "================="
grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log"| sed 's/functionfile=//g'
echo "" echo ""
echo "6.1 - post details" echo "6.1 - post details"
@ -665,8 +795,16 @@ echo "post details."
echo "Command: ./jc2server postdetails" echo "Command: ./jc2server postdetails"
requiredstatus="ONLINE" requiredstatus="ONLINE"
fn_setstatus fn_setstatus
(command_postdetails.sh) (
exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log"
BASH_XTRACEFD="5"
set -x
command_postdetails.sh
)
fn_test_result_pass fn_test_result_pass
echo "run order"
echo "================="
grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log"| sed 's/functionfile=//g'
echo "" echo ""
echo "7.0 - backup" echo "7.0 - backup"
@ -679,6 +817,9 @@ fn_setstatus
echo "test de-activated until issue #1839 fixed" echo "test de-activated until issue #1839 fixed"
#(command_backup.sh) #(command_backup.sh)
fn_test_result_pass fn_test_result_pass
echo "run order"
echo "================="
grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log"| sed 's/functionfile=//g'
echo "" echo ""
echo "8.0 - dev - detect glibc" echo "8.0 - dev - detect glibc"
@ -688,8 +829,16 @@ echo "detect glibc."
echo "Command: ./jc2server detect-glibc" echo "Command: ./jc2server detect-glibc"
requiredstatus="ONLINE" requiredstatus="ONLINE"
fn_setstatus fn_setstatus
(command_dev_detect_glibc.sh) (
exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log"
BASH_XTRACEFD="5"
set -x
command_dev_detect_glibc.sh
)
fn_test_result_pass fn_test_result_pass
echo "run order"
echo "================="
grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log"| sed 's/functionfile=//g'
echo "" echo ""
echo "8.1 - dev - detect ldd" echo "8.1 - dev - detect ldd"
@ -699,8 +848,16 @@ echo "detect ldd."
echo "Command: ./jc2server detect-ldd" echo "Command: ./jc2server detect-ldd"
requiredstatus="ONLINE" requiredstatus="ONLINE"
fn_setstatus fn_setstatus
(command_dev_detect_ldd.sh) (
exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log"
BASH_XTRACEFD="5"
set -x
command_dev_detect_ldd.sh
)
fn_test_result_pass fn_test_result_pass
echo "run order"
echo "================="
grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log"| sed 's/functionfile=//g'
echo "" echo ""
echo "8.2 - dev - detect deps" echo "8.2 - dev - detect deps"
@ -710,8 +867,16 @@ echo "detect dependencies."
echo "Command: ./jc2server detect-deps" echo "Command: ./jc2server detect-deps"
requiredstatus="ONLINE" requiredstatus="ONLINE"
fn_setstatus fn_setstatus
(command_dev_detect_deps.sh) (
exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log"
BASH_XTRACEFD="5"
set -x
command_dev_detect_deps.sh
)
fn_test_result_pass fn_test_result_pass
echo "run order"
echo "================="
grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log"| sed 's/functionfile=//g'
echo "" echo ""
echo "=================================" echo "================================="

Loading…
Cancel
Save