From 22af60a7fb424a8605f2edd982a8e99f9621ba04 Mon Sep 17 00:00:00 2001 From: Lucas Briese Date: Tue, 15 Oct 2019 12:40:02 +0200 Subject: [PATCH] ~ separate test for build and run --- test/testBuild.sh | 22 ++++++++++++++++++++++ test/testCaseQuick.sh | 15 ++------------- 2 files changed, 24 insertions(+), 13 deletions(-) create mode 100644 test/testBuild.sh diff --git a/test/testBuild.sh b/test/testBuild.sh new file mode 100644 index 0000000..0604928 --- /dev/null +++ b/test/testBuild.sh @@ -0,0 +1,22 @@ +#!/bin/bash + +if [ "${DEBUGGING}" = "true" ]; then + set -o xtrace +else + DEBUGGING="false" +fi + +set -o errexit +set -o nounset +set -o pipefail + +echo "[testBuild][INFO]build" + +docker rmi "jusito/docker-ttt:lgsm_debian" || true +docker build -t "jusito/docker-ttt:lgsm_debian" "./lgsm/" + +docker rmi "jusito/docker-ttt:gmod_debian" || true +docker build -t "jusito/docker-ttt:gmod_debian" "./gmod/" + +docker rmi "jusito/docker-ttt:gmod_ttt_debian" || true +docker build -t "jusito/docker-ttt:gmod_ttt_debian" "./TTT/" \ No newline at end of file diff --git a/test/testCaseQuick.sh b/test/testCaseQuick.sh index 85876d5..64b2082 100644 --- a/test/testCaseQuick.sh +++ b/test/testCaseQuick.sh @@ -12,16 +12,7 @@ set -o pipefail #bash test/testStyle.sh -echo "[testBuild][INFO]build" - -docker rmi "jusito/docker-ttt:lgsm_debian" || true -docker build -t "jusito/docker-ttt:lgsm_debian" "./lgsm/" - -docker rmi "jusito/docker-ttt:gmod_debian" || true -docker build -t "jusito/docker-ttt:gmod_debian" "./gmod/" - -docker rmi "jusito/docker-ttt:gmod_ttt_debian" || true -docker build -t "jusito/docker-ttt:gmod_ttt_debian" "./TTT/" +bash testBuild.sh echo "[testRun][INFO]running" @@ -30,6 +21,4 @@ if ! docker run -ti --name "JusitoTesting" --rm -e TEST_MODE=true -e DEBUGGING=" exit 1 fi docker stop "JusitoTesting" || true -docker rm "JusitoTesting" || true - -#docker run -ti --name "JusitoTesting" -p 27015:27015/udp -p 27015:27015/tcp --rm -e TEST_MODE=true -e DEBUGGING="$DEBUGGING" -e SERVER_PASSWORD="testpw" -e SERVER_MAX_PLAYERS="10" "jusito/docker-ttt:gmod_ttt_debian" \ No newline at end of file +docker rm "JusitoTesting" || true \ No newline at end of file