From 0e6198a91881edd9b8c7d2fa6fc676428a5f78a7 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sun, 18 Mar 2018 11:23:09 +0000 Subject: [PATCH 01/21] List function files that the commands run though --- tests/tests_jc2server.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/tests_jc2server.sh b/tests/tests_jc2server.sh index 600afcd16..e85c32fc3 100644 --- a/tests/tests_jc2server.sh +++ b/tests/tests_jc2server.sh @@ -484,6 +484,7 @@ echo "Enable dev-debug" echo "" (command_dev_debug.sh) fn_test_result_pass +grep "functionfile=" echo "1.0 - start - no files" echo "=================================" @@ -493,6 +494,7 @@ echo "Command: ./jc2server start" echo "" (command_start.sh) fn_test_result_fail +grep "functionfile=" echo "" echo "1.1 - getopt" @@ -503,6 +505,7 @@ echo "Command: ./jc2server" echo "" (core_getopt.sh) fn_test_result_pass +grep "functionfile=" echo "" echo "1.2 - getopt with incorrect args" @@ -514,6 +517,7 @@ echo "" getopt="abc123" (core_getopt.sh) fn_test_result_fail +grep "functionfile=" echo "" echo "2.0 - install" @@ -523,6 +527,7 @@ echo "install ${gamename} server." echo "Command: ./jc2server auto-install" (fn_autoinstall) fn_test_result_pass +grep "functionfile=" echo "" echo "3.1 - start" @@ -534,6 +539,7 @@ requiredstatus="OFFLINE" fn_setstatus (command_start.sh) fn_test_result_pass +grep "functionfile=" echo "" echo "3.2 - start - online" From 57ce68fa26ec249a4a73f66cf2900d56e95a8620 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sun, 18 Mar 2018 11:26:39 +0000 Subject: [PATCH 02/21] forgot to add file --- tests/tests_jc2server.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/tests/tests_jc2server.sh b/tests/tests_jc2server.sh index e85c32fc3..9e9dee2ab 100644 --- a/tests/tests_jc2server.sh +++ b/tests/tests_jc2server.sh @@ -484,7 +484,7 @@ echo "Enable dev-debug" echo "" (command_dev_debug.sh) fn_test_result_pass -grep "functionfile=" +grep "functionfile=" .dev-debug echo "1.0 - start - no files" echo "=================================" @@ -494,7 +494,7 @@ echo "Command: ./jc2server start" echo "" (command_start.sh) fn_test_result_fail -grep "functionfile=" +grep "functionfile=" .dev-debug echo "" echo "1.1 - getopt" @@ -505,7 +505,7 @@ echo "Command: ./jc2server" echo "" (core_getopt.sh) fn_test_result_pass -grep "functionfile=" +grep "functionfile=" .dev-debug echo "" echo "1.2 - getopt with incorrect args" @@ -517,7 +517,7 @@ echo "" getopt="abc123" (core_getopt.sh) fn_test_result_fail -grep "functionfile=" +grep "functionfile=" .dev-debug echo "" echo "2.0 - install" @@ -527,7 +527,7 @@ echo "install ${gamename} server." echo "Command: ./jc2server auto-install" (fn_autoinstall) fn_test_result_pass -grep "functionfile=" +grep "functionfile=" .dev-debug echo "" echo "3.1 - start" @@ -539,7 +539,7 @@ requiredstatus="OFFLINE" fn_setstatus (command_start.sh) fn_test_result_pass -grep "functionfile=" +grep "functionfile=" .dev-debug echo "" echo "3.2 - start - online" From d427c2b198d22feaa5776dbe473f550da6812007 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sun, 18 Mar 2018 11:29:26 +0000 Subject: [PATCH 03/21] corrected filename --- tests/tests_jc2server.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/tests/tests_jc2server.sh b/tests/tests_jc2server.sh index 9e9dee2ab..2ab6e2160 100644 --- a/tests/tests_jc2server.sh +++ b/tests/tests_jc2server.sh @@ -484,7 +484,7 @@ echo "Enable dev-debug" echo "" (command_dev_debug.sh) fn_test_result_pass -grep "functionfile=" .dev-debug +grep "functionfile=" dev-debug.log echo "1.0 - start - no files" echo "=================================" @@ -494,7 +494,7 @@ echo "Command: ./jc2server start" echo "" (command_start.sh) fn_test_result_fail -grep "functionfile=" .dev-debug +grep "functionfile=" dev-debug.log echo "" echo "1.1 - getopt" @@ -505,7 +505,7 @@ echo "Command: ./jc2server" echo "" (core_getopt.sh) fn_test_result_pass -grep "functionfile=" .dev-debug +grep "functionfile=" dev-debug.log echo "" echo "1.2 - getopt with incorrect args" @@ -517,7 +517,7 @@ echo "" getopt="abc123" (core_getopt.sh) fn_test_result_fail -grep "functionfile=" .dev-debug +grep "functionfile=" dev-debug.log echo "" echo "2.0 - install" @@ -527,7 +527,7 @@ echo "install ${gamename} server." echo "Command: ./jc2server auto-install" (fn_autoinstall) fn_test_result_pass -grep "functionfile=" .dev-debug +grep "functionfile=" dev-debug.log echo "" echo "3.1 - start" @@ -539,7 +539,7 @@ requiredstatus="OFFLINE" fn_setstatus (command_start.sh) fn_test_result_pass -grep "functionfile=" .dev-debug +grep "functionfile=" dev-debug.log echo "" echo "3.2 - start - online" From 592e6e4c9d070430fc3e6020c04cf958c5874807 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sun, 18 Mar 2018 11:31:41 +0000 Subject: [PATCH 04/21] test --- tests/tests_jc2server.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/tests_jc2server.sh b/tests/tests_jc2server.sh index 2ab6e2160..9e6e3d7dd 100644 --- a/tests/tests_jc2server.sh +++ b/tests/tests_jc2server.sh @@ -485,7 +485,8 @@ echo "" (command_dev_debug.sh) fn_test_result_pass grep "functionfile=" dev-debug.log - +echo "################## LS -AL" +ls -al echo "1.0 - start - no files" echo "=================================" echo "Description:" From 3bcf2642287b834530cc43da7afebc8c296b3945 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sun, 18 Mar 2018 11:38:42 +0000 Subject: [PATCH 05/21] trying another location --- tests/tests_jc2server.sh | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/tests/tests_jc2server.sh b/tests/tests_jc2server.sh index 9e6e3d7dd..bfebce3a3 100644 --- a/tests/tests_jc2server.sh +++ b/tests/tests_jc2server.sh @@ -11,7 +11,7 @@ travistest="1" # Debugging if [ -f ".dev-debug" ]; then - exec 5>dev-debug.log + exec 5>"tests/dev-debug.log" BASH_XTRACEFD="5" set -x fi @@ -484,9 +484,11 @@ echo "Enable dev-debug" echo "" (command_dev_debug.sh) fn_test_result_pass -grep "functionfile=" dev-debug.log +grep "functionfile=" "tests/dev-debug.log" echo "################## LS -AL" ls -al +echo "################## pwd" +pwd echo "1.0 - start - no files" echo "=================================" echo "Description:" @@ -495,7 +497,7 @@ echo "Command: ./jc2server start" echo "" (command_start.sh) fn_test_result_fail -grep "functionfile=" dev-debug.log +grep "functionfile=" "tests/dev-debug.log" echo "" echo "1.1 - getopt" @@ -506,7 +508,7 @@ echo "Command: ./jc2server" echo "" (core_getopt.sh) fn_test_result_pass -grep "functionfile=" dev-debug.log +grep "functionfile=" "tests/dev-debug.log" echo "" echo "1.2 - getopt with incorrect args" @@ -518,7 +520,7 @@ echo "" getopt="abc123" (core_getopt.sh) fn_test_result_fail -grep "functionfile=" dev-debug.log +grep "functionfile=" "tests/dev-debug.log" echo "" echo "2.0 - install" @@ -528,7 +530,7 @@ echo "install ${gamename} server." echo "Command: ./jc2server auto-install" (fn_autoinstall) fn_test_result_pass -grep "functionfile=" dev-debug.log +grep "functionfile=" "tests/dev-debug.log" echo "" echo "3.1 - start" @@ -540,7 +542,7 @@ requiredstatus="OFFLINE" fn_setstatus (command_start.sh) fn_test_result_pass -grep "functionfile=" dev-debug.log +grep "functionfile=" "tests/dev-debug.log" echo "" echo "3.2 - start - online" From 71ba149da1b14d8697a0467b5c516346c6110383 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sun, 18 Mar 2018 11:42:43 +0000 Subject: [PATCH 06/21] building tree --- .travis.yml | 1 + tests/tests_jc2server.sh | 7 ++++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 1ae96fc9c..52eda9819 100644 --- a/.travis.yml +++ b/.travis.yml @@ -31,6 +31,7 @@ addons: - net-tools - iproute2 - shellcheck + - tree jobs: include: diff --git a/tests/tests_jc2server.sh b/tests/tests_jc2server.sh index bfebce3a3..377da24a2 100644 --- a/tests/tests_jc2server.sh +++ b/tests/tests_jc2server.sh @@ -485,8 +485,8 @@ echo "" (command_dev_debug.sh) fn_test_result_pass grep "functionfile=" "tests/dev-debug.log" -echo "################## LS -AL" -ls -al +echo "################## tree" +tree echo "################## pwd" pwd echo "1.0 - start - no files" @@ -543,7 +543,8 @@ fn_setstatus (command_start.sh) fn_test_result_pass grep "functionfile=" "tests/dev-debug.log" - +echo "############## tree" +tree echo "" echo "3.2 - start - online" echo "=================================" From d7ee9c15e959a2e0e098d5afc5e0a0b732ffc0c4 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sun, 18 Mar 2018 11:47:40 +0000 Subject: [PATCH 07/21] test --- lgsm/functions/command_dev_debug.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/lgsm/functions/command_dev_debug.sh b/lgsm/functions/command_dev_debug.sh index 7c831681a..1a74ef983 100644 --- a/lgsm/functions/command_dev_debug.sh +++ b/lgsm/functions/command_dev_debug.sh @@ -13,6 +13,7 @@ if [ -f "${rootdir}/.dev-debug" ]; then fn_print_ok_nl "Disabled dev-debug" fn_script_log_info "Disabled dev-debug" else + echo "########## ${rootdir}/.dev-debug" date > "${rootdir}/.dev-debug" fn_print_ok_nl "Enabled dev-debug" fn_script_log_info "Enabled dev-debug" From 04afe6bdd9d1cabc3c3c1c80b52f1eea39903e98 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sun, 18 Mar 2018 11:50:31 +0000 Subject: [PATCH 08/21] test --- lgsm/functions/command_dev_debug.sh | 1 - tests/tests_jc2server.sh | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/lgsm/functions/command_dev_debug.sh b/lgsm/functions/command_dev_debug.sh index 1a74ef983..7c831681a 100644 --- a/lgsm/functions/command_dev_debug.sh +++ b/lgsm/functions/command_dev_debug.sh @@ -13,7 +13,6 @@ if [ -f "${rootdir}/.dev-debug" ]; then fn_print_ok_nl "Disabled dev-debug" fn_script_log_info "Disabled dev-debug" else - echo "########## ${rootdir}/.dev-debug" date > "${rootdir}/.dev-debug" fn_print_ok_nl "Enabled dev-debug" fn_script_log_info "Enabled dev-debug" diff --git a/tests/tests_jc2server.sh b/tests/tests_jc2server.sh index 377da24a2..810aa567d 100644 --- a/tests/tests_jc2server.sh +++ b/tests/tests_jc2server.sh @@ -484,6 +484,7 @@ echo "Enable dev-debug" echo "" (command_dev_debug.sh) fn_test_result_pass +echo "########## ${rootdir}/.dev-debug" grep "functionfile=" "tests/dev-debug.log" echo "################## tree" tree From fbfd3b68bfc55f94fb023af990e085947fab0e92 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sun, 18 Mar 2018 11:54:23 +0000 Subject: [PATCH 09/21] test --- tests/tests_jc2server.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/tests_jc2server.sh b/tests/tests_jc2server.sh index 810aa567d..623565338 100644 --- a/tests/tests_jc2server.sh +++ b/tests/tests_jc2server.sh @@ -484,6 +484,8 @@ echo "Enable dev-debug" echo "" (command_dev_debug.sh) fn_test_result_pass +date > tests/.dev-debug + echo "########## ${rootdir}/.dev-debug" grep "functionfile=" "tests/dev-debug.log" echo "################## tree" From 73f7ae65a7d93136f05f2002e056eb914cda8ecf Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sun, 18 Mar 2018 11:57:20 +0000 Subject: [PATCH 10/21] pwd --- tests/tests_jc2server.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/tests_jc2server.sh b/tests/tests_jc2server.sh index 623565338..f511f640c 100644 --- a/tests/tests_jc2server.sh +++ b/tests/tests_jc2server.sh @@ -484,6 +484,8 @@ echo "Enable dev-debug" echo "" (command_dev_debug.sh) fn_test_result_pass +pwd +echo "####### date > tests/.dev-debug" date > tests/.dev-debug echo "########## ${rootdir}/.dev-debug" From 71ab87c3e23f5460cb66c7611b8bf160c64fb77f Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sun, 18 Mar 2018 12:01:34 +0000 Subject: [PATCH 11/21] test --- tests/tests_jc2server.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/tests_jc2server.sh b/tests/tests_jc2server.sh index f511f640c..6336cf900 100644 --- a/tests/tests_jc2server.sh +++ b/tests/tests_jc2server.sh @@ -485,7 +485,8 @@ echo "" (command_dev_debug.sh) fn_test_result_pass pwd -echo "####### date > tests/.dev-debug" +echo "####### touch & date > tests/.dev-debug" +touch tests/.dev-debug date > tests/.dev-debug echo "########## ${rootdir}/.dev-debug" From 823ec71a08dac62241eeee876e2e2aeb2031429d Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sun, 18 Mar 2018 12:05:35 +0000 Subject: [PATCH 12/21] absolute path --- tests/tests_jc2server.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/tests_jc2server.sh b/tests/tests_jc2server.sh index 6336cf900..99efd3e89 100644 --- a/tests/tests_jc2server.sh +++ b/tests/tests_jc2server.sh @@ -485,9 +485,9 @@ echo "" (command_dev_debug.sh) fn_test_result_pass pwd -echo "####### touch & date > tests/.dev-debug" -touch tests/.dev-debug -date > tests/.dev-debug +echo "####### touch & date > /home/travis/build/GameServerManagers/LinuxGSM/tests/.dev-debug" +touch /home/travis/build/GameServerManagers/LinuxGSM/tests/.dev-debug +date > /home/travis/build/GameServerManagers/LinuxGSM/tests/.dev-debug echo "########## ${rootdir}/.dev-debug" grep "functionfile=" "tests/dev-debug.log" From 0f9c85c63f868841c360d69b26d005dc11534197 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sun, 18 Mar 2018 12:08:35 +0000 Subject: [PATCH 13/21] builf path --- tests/tests_jc2server.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/tests_jc2server.sh b/tests/tests_jc2server.sh index 99efd3e89..d109140c3 100644 --- a/tests/tests_jc2server.sh +++ b/tests/tests_jc2server.sh @@ -485,6 +485,8 @@ echo "" (command_dev_debug.sh) fn_test_result_pass pwd +echo "######travis build path" +echo "${TRAVIS_BUILD_DIR}" echo "####### touch & date > /home/travis/build/GameServerManagers/LinuxGSM/tests/.dev-debug" touch /home/travis/build/GameServerManagers/LinuxGSM/tests/.dev-debug date > /home/travis/build/GameServerManagers/LinuxGSM/tests/.dev-debug From cc9f924052d1c15666fb7b27cf56ef942ea4e563 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sun, 18 Mar 2018 12:09:37 +0000 Subject: [PATCH 14/21] date --- tests/tests_jc2server.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/tests_jc2server.sh b/tests/tests_jc2server.sh index d109140c3..75026f3a6 100644 --- a/tests/tests_jc2server.sh +++ b/tests/tests_jc2server.sh @@ -9,6 +9,7 @@ travistest="1" +date > "tests/dev-debug.log" # Debugging if [ -f ".dev-debug" ]; then exec 5>"tests/dev-debug.log" From 67c850a776a81f33d14e7a4ee08400217a234be9 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sun, 18 Mar 2018 12:12:09 +0000 Subject: [PATCH 15/21] travis build dir --- tests/tests_jc2server.sh | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/tests/tests_jc2server.sh b/tests/tests_jc2server.sh index 75026f3a6..faadd55cc 100644 --- a/tests/tests_jc2server.sh +++ b/tests/tests_jc2server.sh @@ -9,10 +9,10 @@ travistest="1" -date > "tests/dev-debug.log" +date > "${TRAVIS_BUILD_DIR}/dev-debug.log" # Debugging -if [ -f ".dev-debug" ]; then - exec 5>"tests/dev-debug.log" +if [ -f "${TRAVIS_BUILD_DIR}/.dev-debug" ]; then + exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" BASH_XTRACEFD="5" set -x fi @@ -493,7 +493,7 @@ touch /home/travis/build/GameServerManagers/LinuxGSM/tests/.dev-debug date > /home/travis/build/GameServerManagers/LinuxGSM/tests/.dev-debug echo "########## ${rootdir}/.dev-debug" -grep "functionfile=" "tests/dev-debug.log" +grep "functionfile=" "${TRAVIS_BUILD_DIR}/dev-debug.log" echo "################## tree" tree echo "################## pwd" @@ -506,7 +506,7 @@ echo "Command: ./jc2server start" echo "" (command_start.sh) fn_test_result_fail -grep "functionfile=" "tests/dev-debug.log" +grep "functionfile=" "${TRAVIS_BUILD_DIR}/dev-debug.log" echo "" echo "1.1 - getopt" @@ -517,7 +517,7 @@ echo "Command: ./jc2server" echo "" (core_getopt.sh) fn_test_result_pass -grep "functionfile=" "tests/dev-debug.log" +grep "functionfile=" "${TRAVIS_BUILD_DIR}/dev-debug.log" echo "" echo "1.2 - getopt with incorrect args" @@ -529,7 +529,7 @@ echo "" getopt="abc123" (core_getopt.sh) fn_test_result_fail -grep "functionfile=" "tests/dev-debug.log" +grep "functionfile=" "${TRAVIS_BUILD_DIR}/dev-debug.log" echo "" echo "2.0 - install" @@ -539,7 +539,7 @@ echo "install ${gamename} server." echo "Command: ./jc2server auto-install" (fn_autoinstall) fn_test_result_pass -grep "functionfile=" "tests/dev-debug.log" +grep "functionfile=" "${TRAVIS_BUILD_DIR}/dev-debug.log" echo "" echo "3.1 - start" @@ -551,7 +551,7 @@ requiredstatus="OFFLINE" fn_setstatus (command_start.sh) fn_test_result_pass -grep "functionfile=" "tests/dev-debug.log" +grep "functionfile=" "${TRAVIS_BUILD_DIR}/dev-debug.log" echo "############## tree" tree echo "" From 35177a7e95f9e958d652bbd3bd94912b37f3d148 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sun, 18 Mar 2018 12:19:50 +0000 Subject: [PATCH 16/21] moar tests --- tests/tests_jc2server.sh | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/tests/tests_jc2server.sh b/tests/tests_jc2server.sh index faadd55cc..c9885821b 100644 --- a/tests/tests_jc2server.sh +++ b/tests/tests_jc2server.sh @@ -483,7 +483,11 @@ echo "=================================" echo "Description:" echo "Enable dev-debug" 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 pwd echo "######travis build path" @@ -504,7 +508,11 @@ echo "Description:" echo "test script reaction to missing server files." echo "Command: ./jc2server start" echo "" -(command_start.sh) +( + exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" + BASH_XTRACEFD="5" + set -x + command_start.sh) fn_test_result_fail grep "functionfile=" "${TRAVIS_BUILD_DIR}/dev-debug.log" @@ -515,7 +523,11 @@ echo "Description:" echo "displaying options messages." echo "Command: ./jc2server" echo "" -(core_getopt.sh) +( + exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" + BASH_XTRACEFD="5" + set -x + core_getopt.sh) fn_test_result_pass grep "functionfile=" "${TRAVIS_BUILD_DIR}/dev-debug.log" From 07c5d2129a27c18882f7eee7c194dce860e5a208 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sun, 18 Mar 2018 12:29:47 +0000 Subject: [PATCH 17/21] cat dev-debug.log --- tests/tests_jc2server.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/tests_jc2server.sh b/tests/tests_jc2server.sh index c9885821b..597e0e210 100644 --- a/tests/tests_jc2server.sh +++ b/tests/tests_jc2server.sh @@ -529,7 +529,7 @@ echo "" set -x core_getopt.sh) fn_test_result_pass -grep "functionfile=" "${TRAVIS_BUILD_DIR}/dev-debug.log" +cat "${TRAVIS_BUILD_DIR}/dev-debug.log" echo "" echo "1.2 - getopt with incorrect args" From 753fb8766351f752e838906702be06344e4cd0ec Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sun, 18 Mar 2018 12:33:20 +0000 Subject: [PATCH 18/21] test grep --- tests/tests_jc2server.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/tests_jc2server.sh b/tests/tests_jc2server.sh index 597e0e210..3a1af18b1 100644 --- a/tests/tests_jc2server.sh +++ b/tests/tests_jc2server.sh @@ -530,7 +530,7 @@ echo "" core_getopt.sh) fn_test_result_pass cat "${TRAVIS_BUILD_DIR}/dev-debug.log" - +grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" echo "" echo "1.2 - getopt with incorrect args" echo "=================================" From 2c3a37020b5035a3421ff610f5700edf769480f1 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sun, 18 Mar 2018 14:34:04 +0000 Subject: [PATCH 19/21] test --- tests/tests_ts3server.sh | 225 +++++++++++++++++++++++++++++++++------ 1 file changed, 195 insertions(+), 30 deletions(-) diff --git a/tests/tests_ts3server.sh b/tests/tests_ts3server.sh index ebfbdb696..b6ee25f95 100644 --- a/tests/tests_ts3server.sh +++ b/tests/tests_ts3server.sh @@ -9,13 +9,6 @@ travistest="1" -# Debugging -if [ -f ".dev-debug" ]; then - exec 5>dev-debug.log - BASH_XTRACEFD="5" - set -x -fi - version="171014" shortname="ts3" gameservername="ts3server" @@ -467,16 +460,24 @@ echo "Server Tests" echo "Using: ${gamename}" echo "Testing Branch: $TRAVIS_BRANCH" echo "=================================" -echo "" +echo "" echo "0.1 - Create log dir's" echo "=================================" echo "Description:" echo "Create log dir's" 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 "=================================" echo "Description:" @@ -484,15 +485,27 @@ echo "Enable dev-debug" echo "" (command_dev_debug.sh) 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 "=================================" echo "Description:" echo "test script reaction to missing server files." echo "Command: ./ts3server start" echo "" -(command_start.sh) +( + exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" + BASH_XTRACEFD="5" + set -x + command_start.sh +) fn_test_result_fail +echo "run order" +echo "=================" +grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log"| sed 's/functionfile=//g' echo "" echo "1.1 - getopt" @@ -501,8 +514,16 @@ echo "Description:" echo "displaying options messages." echo "Command: ./ts3server" echo "" -(core_getopt.sh) +( + exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" + BASH_XTRACEFD="5" + set -x + core_getopt.sh +) fn_test_result_pass +echo "run order" +echo "=================" +grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log"| sed 's/functionfile=//g' echo "" echo "1.2 - getopt with incorrect args" @@ -512,8 +533,16 @@ echo "displaying options messages." echo "Command: ./ts3server abc123" echo "" 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 +echo "run order" +echo "=================" +grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log"| sed 's/functionfile=//g' echo "" echo "2.0 - install" @@ -521,8 +550,16 @@ echo "=================================" echo "Description:" echo "install ${gamename} server." 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 +echo "run order" +echo "=================" +grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log"| sed 's/functionfile=//g' echo "" echo "3.1 - start" @@ -532,8 +569,16 @@ echo "start ${gamename} server." echo "Command: ./ts3server start" requiredstatus="OFFLINE" 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 +echo "run order" +echo "=================" +grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log"| sed 's/functionfile=//g' echo "" echo "3.2 - start - online" @@ -543,7 +588,12 @@ echo "start ${gamename} server while already running." echo "Command: ./ts3server start" requiredstatus="ONLINE" 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 echo "" @@ -554,8 +604,16 @@ echo "will update server on start." echo "Command: ./ts3server start" requiredstatus="OFFLINE" 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 +echo "run order" +echo "=================" +grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log"| sed 's/functionfile=//g' echo "" echo "3.4 - stop" @@ -565,8 +623,16 @@ echo "stop ${gamename} server." echo "Command: ./ts3server stop" requiredstatus="ONLINE" 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 +echo "run order" +echo "=================" +grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log"| sed 's/functionfile=//g' echo "" echo "3.5 - stop - offline" @@ -576,8 +642,16 @@ echo "stop ${gamename} server while already stopped." echo "Command: ./ts3server stop" requiredstatus="OFFLINE" 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 +echo "run order" +echo "=================" +grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log"| sed 's/functionfile=//g' echo "" echo "3.6 - restart" @@ -587,8 +661,16 @@ echo "restart ${gamename}." echo "Command: ./ts3server restart" requiredstatus="ONLINE" 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 +echo "run order" +echo "=================" +grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log"| sed 's/functionfile=//g' echo "" echo "3.7 - restart - offline" @@ -598,8 +680,16 @@ echo "restart ${gamename} while already stopped." echo "Command: ./ts3server restart" requiredstatus="OFFLINE" 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 +echo "run order" +echo "=================" +grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log"| sed 's/functionfile=//g' echo "4.1 - update" echo "=================================" @@ -608,8 +698,16 @@ echo "check for updates." echo "Command: ./ts3server update" requiredstatus="OFFLINE" 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 +echo "run order" +echo "=================" +grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log"| sed 's/functionfile=//g' echo "" echo "5.1 - monitor - online" @@ -619,8 +717,16 @@ echo "run monitor server while already running." echo "Command: ./ts3server monitor" requiredstatus="ONLINE" 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 +echo "run order" +echo "=================" +grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log"| sed 's/functionfile=//g' echo "" echo "5.2 - monitor - offline - with lockfile" @@ -632,8 +738,16 @@ requiredstatus="OFFLINE" fn_setstatus fn_print_info_nl "creating lockfile." 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 +echo "run order" +echo "=================" +grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log"| sed 's/functionfile=//g' echo "" 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" requiredstatus="OFFLINE" 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 +echo "run order" +echo "=================" +grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log"| sed 's/functionfile=//g' echo "" echo "6.0 - details" @@ -654,8 +776,16 @@ echo "display details." echo "Command: ./ts3server details" requiredstatus="ONLINE" 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 +echo "run order" +echo "=================" +grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log"| sed 's/functionfile=//g' echo "" echo "6.1 - post details" @@ -665,8 +795,16 @@ echo "post details." echo "Command: ./jc2server postdetails" requiredstatus="ONLINE" 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 +echo "run order" +echo "=================" +grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log"| sed 's/functionfile=//g' echo "" echo "7.0 - backup" @@ -679,6 +817,9 @@ fn_setstatus echo "test de-activated until issue #1839 fixed" #(command_backup.sh) fn_test_result_pass +echo "run order" +echo "=================" +grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log"| sed 's/functionfile=//g' echo "" echo "8.0 - dev - detect glibc" @@ -688,8 +829,16 @@ echo "detect glibc." echo "Command: ./jc2server detect-glibc" requiredstatus="ONLINE" 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 +echo "run order" +echo "=================" +grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log"| sed 's/functionfile=//g' echo "" echo "8.1 - dev - detect ldd" @@ -699,8 +848,16 @@ echo "detect ldd." echo "Command: ./jc2server detect-ldd" requiredstatus="ONLINE" 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 +echo "run order" +echo "=================" +grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log"| sed 's/functionfile=//g' echo "" echo "8.2 - dev - detect deps" @@ -710,8 +867,16 @@ echo "detect dependencies." echo "Command: ./jc2server detect-deps" requiredstatus="ONLINE" 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 +echo "run order" +echo "=================" +grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log"| sed 's/functionfile=//g' echo "" echo "=================================" From 32c52892692b123ff412d12e2e8d13f49a6f7500 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sun, 18 Mar 2018 14:51:21 +0000 Subject: [PATCH 20/21] added feature to jc2server --- tests/tests_jc2server.sh | 318 ++++++++++++++++++++++++++++++++------- 1 file changed, 266 insertions(+), 52 deletions(-) diff --git a/tests/tests_jc2server.sh b/tests/tests_jc2server.sh index 3a1af18b1..8aa76ffc9 100644 --- a/tests/tests_jc2server.sh +++ b/tests/tests_jc2server.sh @@ -475,8 +475,15 @@ echo "=================================" echo "Description:" echo "Create log dir's" 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 "=================================" @@ -487,21 +494,14 @@ echo "" exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" BASH_XTRACEFD="5" set -x - command_dev_debug.sh) + command_dev_debug.sh +) fn_test_result_pass -pwd -echo "######travis build path" -echo "${TRAVIS_BUILD_DIR}" -echo "####### touch & date > /home/travis/build/GameServerManagers/LinuxGSM/tests/.dev-debug" -touch /home/travis/build/GameServerManagers/LinuxGSM/tests/.dev-debug -date > /home/travis/build/GameServerManagers/LinuxGSM/tests/.dev-debug - -echo "########## ${rootdir}/.dev-debug" -grep "functionfile=" "${TRAVIS_BUILD_DIR}/dev-debug.log" -echo "################## tree" -tree -echo "################## pwd" -pwd +echo "run order" +echo "=================" +grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log"| sed 's/functionfile=//g' + +echo "" echo "1.0 - start - no files" echo "=================================" echo "Description:" @@ -512,9 +512,12 @@ echo "" exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" BASH_XTRACEFD="5" set -x - command_start.sh) + command_start.sh +) fn_test_result_fail -grep "functionfile=" "${TRAVIS_BUILD_DIR}/dev-debug.log" +echo "run order" +echo "=================" +grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log"| sed 's/functionfile=//g' echo "" echo "1.1 - getopt" @@ -527,10 +530,13 @@ echo "" exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" BASH_XTRACEFD="5" set -x - core_getopt.sh) + core_getopt.sh +) fn_test_result_pass -cat "${TRAVIS_BUILD_DIR}/dev-debug.log" -grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" +echo "run order" +echo "=================" +grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log"| sed 's/functionfile=//g' + echo "" echo "1.2 - getopt with incorrect args" echo "=================================" @@ -539,9 +545,16 @@ echo "displaying options messages." echo "Command: ./jc2server abc123" echo "" 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 -grep "functionfile=" "${TRAVIS_BUILD_DIR}/dev-debug.log" +echo "run order" +echo "=================" +grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log"| sed 's/functionfile=//g' echo "" echo "2.0 - install" @@ -549,9 +562,16 @@ echo "=================================" echo "Description:" echo "install ${gamename} server." 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 -grep "functionfile=" "${TRAVIS_BUILD_DIR}/dev-debug.log" +echo "run order" +echo "=================" +grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log"| sed 's/functionfile=//g' echo "" echo "3.1 - start" @@ -561,11 +581,17 @@ echo "start ${gamename} server." echo "Command: ./jc2server start" requiredstatus="OFFLINE" 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 -grep "functionfile=" "${TRAVIS_BUILD_DIR}/dev-debug.log" -echo "############## tree" -tree +echo "run order" +echo "=================" +grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log"| sed 's/functionfile=//g' + echo "" echo "3.2 - start - online" echo "=================================" @@ -574,8 +600,16 @@ echo "start ${gamename} server while already running." echo "Command: ./jc2server start" requiredstatus="ONLINE" 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 +echo "run order" +echo "=================" +grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log"| sed 's/functionfile=//g' echo "" echo "3.3 - start - updateonstart" @@ -585,8 +619,16 @@ echo "will update server on start." echo "Command: ./jc2server start" requiredstatus="OFFLINE" 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 +echo "run order" +echo "=================" +grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log"| sed 's/functionfile=//g' echo "" echo "3.4 - stop" @@ -596,8 +638,16 @@ echo "stop ${gamename} server." echo "Command: ./jc2server stop" requiredstatus="ONLINE" 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 +echo "run order" +echo "=================" +grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log"| sed 's/functionfile=//g' echo "" echo "3.5 - stop - offline" @@ -607,8 +657,16 @@ echo "stop ${gamename} server while already stopped." echo "Command: ./jc2server stop" requiredstatus="OFFLINE" 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 +echo "run order" +echo "=================" +grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log"| sed 's/functionfile=//g' echo "" echo "3.6 - restart" @@ -618,8 +676,16 @@ echo "restart ${gamename}." echo "Command: ./jc2server restart" requiredstatus="ONLINE" 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 +echo "run order" +echo "=================" +grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log"| sed 's/functionfile=//g' echo "" echo "3.7 - restart - offline" @@ -629,8 +695,16 @@ echo "restart ${gamename} while already stopped." echo "Command: ./jc2server restart" requiredstatus="OFFLINE" 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 +echo "run order" +echo "=================" +grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log"| sed 's/functionfile=//g' echo "4.1 - update" echo "=================================" @@ -639,8 +713,16 @@ echo "check for updates." echo "Command: ./jc2server update" requiredstatus="OFFLINE" 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 +echo "run order" +echo "=================" +grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log"| sed 's/functionfile=//g' echo "" echo "4.2 - update - change buildid" @@ -652,8 +734,16 @@ requiredstatus="OFFLINE" fn_setstatus fn_print_info_nl "changed buildid to 0." 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 +echo "run order" +echo "=================" +grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log"| sed 's/functionfile=//g' echo "" echo "4.3 - update - change buildid - online" @@ -665,8 +755,16 @@ requiredstatus="ONLINE" fn_setstatus fn_print_info_nl "changed buildid to 0." 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 +echo "run order" +echo "=================" +grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log"| sed 's/functionfile=//g' echo "" echo "4.4 - update - remove appmanifest file" @@ -678,8 +776,16 @@ requiredstatus="OFFLINE" fn_setstatus fn_print_info_nl "removed 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 +echo "run order" +echo "=================" +grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log"| sed 's/functionfile=//g' echo "" echo "4.5 - force-update" @@ -689,8 +795,16 @@ echo "force-update bypassing update check." echo "Command: ./jc2server force-update" requiredstatus="OFFLINE" 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 +echo "run order" +echo "=================" +grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log"| sed 's/functionfile=//g' echo "" echo "4.6 - force-update - online" @@ -700,8 +814,16 @@ echo "force-update bypassing update check server while already running." echo "Command: ./jc2server force-update" requiredstatus="ONLINE" 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 +echo "run order" +echo "=================" +grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log"| sed 's/functionfile=//g' echo "" echo "4.7 - validate" @@ -711,8 +833,16 @@ echo "validate server files." echo "Command: ./jc2server validate" requiredstatus="OFFLINE" 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 +echo "run order" +echo "=================" +grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log"| sed 's/functionfile=//g' echo "" echo "4.8 - validate - online" @@ -723,8 +853,16 @@ echo "" echo "Command: ./jc2server validate" requiredstatus="ONLINE" 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 +echo "run order" +echo "=================" +grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log"| sed 's/functionfile=//g' echo "" echo "Inserting IP address" @@ -744,8 +882,16 @@ echo "run monitor server while already running." echo "Command: ./jc2server monitor" requiredstatus="ONLINE" 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 +echo "run order" +echo "=================" +grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log"| sed 's/functionfile=//g' echo "" echo "5.2 - monitor - offline - with lockfile" @@ -757,8 +903,16 @@ requiredstatus="OFFLINE" fn_setstatus fn_print_info_nl "creating lockfile." 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 +echo "run order" +echo "=================" +grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log"| sed 's/functionfile=//g' echo "" echo "5.3 - monitor - offline - no lockfile" @@ -768,8 +922,16 @@ echo "run monitor while server is offline with no lockfile." echo "Command: ./jc2server monitor" requiredstatus="OFFLINE" 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 +echo "run order" +echo "=================" +grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log"| sed 's/functionfile=//g' echo "" echo "5.4 - monitor - gsquery.py failure" @@ -781,8 +943,17 @@ requiredstatus="ONLINE" fn_setstatus cp "${servercfgfullpath}" "config.lua" 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 +echo "run order" +echo "=================" +grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log"| sed 's/functionfile=//g' + echo "" fn_print_info_nl "Re-generating ${servercfg}." cp -v "config.lua" "${servercfgfullpath}" @@ -796,8 +967,16 @@ echo "display details." echo "Command: ./jc2server details" requiredstatus="ONLINE" 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 +echo "run order" +echo "=================" +grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log"| sed 's/functionfile=//g' echo "" echo "6.1 - post details" @@ -807,8 +986,16 @@ echo "post details." echo "Command: ./jc2server postdetails" requiredstatus="ONLINE" 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 +echo "run order" +echo "=================" +grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log"| sed 's/functionfile=//g' echo "" echo "7.0 - backup" @@ -821,6 +1008,9 @@ fn_setstatus echo "test de-activated until issue #1839 fixed" #(command_backup.sh) fn_test_result_pass +echo "run order" +echo "=================" +grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log"| sed 's/functionfile=//g' echo "" echo "8.0 - dev - detect glibc" @@ -830,8 +1020,16 @@ echo "detect glibc." echo "Command: ./jc2server detect-glibc" requiredstatus="ONLINE" 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 +echo "run order" +echo "=================" +grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log"| sed 's/functionfile=//g' echo "" echo "8.1 - dev - detect ldd" @@ -841,8 +1039,16 @@ echo "detect ldd." echo "Command: ./jc2server detect-ldd" requiredstatus="ONLINE" 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 +echo "run order" +echo "=================" +grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log"| sed 's/functionfile=//g' echo "" echo "8.2 - dev - detect deps" @@ -852,8 +1058,16 @@ echo "detect dependencies." echo "Command: ./jc2server detect-deps" requiredstatus="ONLINE" 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 +echo "run order" +echo "=================" +grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log"| sed 's/functionfile=//g' echo "" echo "=================================" From ad6f4bb82783fb6b0fdb71e4d23a324299e921c2 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sun, 18 Mar 2018 14:52:28 +0000 Subject: [PATCH 21/21] removed debug at top --- tests/tests_jc2server.sh | 8 -------- 1 file changed, 8 deletions(-) diff --git a/tests/tests_jc2server.sh b/tests/tests_jc2server.sh index 8aa76ffc9..738da502c 100644 --- a/tests/tests_jc2server.sh +++ b/tests/tests_jc2server.sh @@ -9,14 +9,6 @@ travistest="1" -date > "${TRAVIS_BUILD_DIR}/dev-debug.log" -# Debugging -if [ -f "${TRAVIS_BUILD_DIR}/.dev-debug" ]; then - exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" - BASH_XTRACEFD="5" - set -x -fi - version="171014" shortname="jc2" gameservername="jc2server"