diff --git a/debian-stretch-titan/Dockerfile b/debian-stretch-titan/Dockerfile index daa0f8c8..512b4ac5 100644 --- a/debian-stretch-titan/Dockerfile +++ b/debian-stretch-titan/Dockerfile @@ -63,3 +63,4 @@ RUN if ! diff -q /tmp/deps-Makefile /osmo-ttcn3-hacks/deps/Makefile; then \ fi ADD ttcn3-docker-prepare.sh /usr/local/bin/ttcn3-docker-prepare +ADD ttcn3-docker-run.sh /usr/local/bin/ttcn3-docker-run diff --git a/debian-stretch-titan/ttcn3-docker-run.sh b/debian-stretch-titan/ttcn3-docker-run.sh new file mode 100755 index 00000000..0cda8a5a --- /dev/null +++ b/debian-stretch-titan/ttcn3-docker-run.sh @@ -0,0 +1,23 @@ +#!/bin/sh +if [ $# -lt 2 ]; then + echo + echo "usage: ttcn3-docker-run SUBDIR SUITE" + echo "arguments:" + echo " SUBDIR: directory in osmo-ttcn3-hacks, e.g. 'msc'" + echo " SUITE: name of the testsuite, e.g. 'MSC_Tests'" + echo + exit 1 +fi + +set -x +SUBDIR=$1 +SUITE=$2 + +cd /data + +/osmo-ttcn3-hacks/start-testsuite.sh "/osmo-ttcn3-hacks/$SUBDIR/$SUITE" +exit_code=$? + +/osmo-ttcn3-hacks/log_merge.sh "$SUITE" --rm + +exit $exit_code diff --git a/ttcn3-bsc-test/Dockerfile b/ttcn3-bsc-test/Dockerfile index c56f3a58..10b7267f 100644 --- a/ttcn3-bsc-test/Dockerfile +++ b/ttcn3-bsc-test/Dockerfile @@ -9,8 +9,4 @@ VOLUME /data COPY BSC_Tests.cfg /data/BSC_Tests.cfg -CMD cd /data && \ - /osmo-ttcn3-hacks/start-testsuite.sh /osmo-ttcn3-hacks/bsc/BSC_Tests; \ - exit_code=$?; \ - /osmo-ttcn3-hacks/log_merge.sh BSC_Tests --rm; \ - exit $exit_code +CMD ttcn3-docker-run bsc BSC_Tests diff --git a/ttcn3-bscnat-test/Dockerfile b/ttcn3-bscnat-test/Dockerfile index 405c0a6a..d9704823 100644 --- a/ttcn3-bscnat-test/Dockerfile +++ b/ttcn3-bscnat-test/Dockerfile @@ -9,8 +9,4 @@ VOLUME /data COPY BSCNAT_Tests.cfg /data/BSCNAT_Tests.cfg -CMD cd /data && \ - /osmo-ttcn3-hacks/start-testsuite.sh /osmo-ttcn3-hacks/bsc-nat/BSCNAT_Tests; \ - exit_code=$?; \ - /osmo-ttcn3-hacks/log_merge.sh BSCNAT_Tests --rm; \ - exit $exit_code +CMD ttcn3-docker-run bsc-nat BSCNAT_Tests diff --git a/ttcn3-bts-test/Dockerfile b/ttcn3-bts-test/Dockerfile index 4aa38256..7abf1a90 100644 --- a/ttcn3-bts-test/Dockerfile +++ b/ttcn3-bts-test/Dockerfile @@ -9,8 +9,4 @@ VOLUME /data COPY BTS_Tests.cfg /data/BTS_Tests.cfg -CMD cd /data && \ - /osmo-ttcn3-hacks/start-testsuite.sh /osmo-ttcn3-hacks/bts/BTS_Tests; \ - exit_code=$?; \ - /osmo-ttcn3-hacks/log_merge.sh BTS_Tests --rm; \ - exit $exit_code +CMD ttcn3-docker-run bts BTS_Tests diff --git a/ttcn3-ggsn-test/Dockerfile b/ttcn3-ggsn-test/Dockerfile index e38e9d5c..e67dc9fa 100644 --- a/ttcn3-ggsn-test/Dockerfile +++ b/ttcn3-ggsn-test/Dockerfile @@ -9,8 +9,4 @@ VOLUME /data COPY GGSN_Tests.cfg /data/GGSN_Tests.cfg -CMD cd /data && \ - /osmo-ttcn3-hacks/start-testsuite.sh /osmo-ttcn3-hacks/ggsn_tests/GGSN_Tests; \ - exit_code=$?; \ - /osmo-ttcn3-hacks/log_merge.sh GGSN_Tests --rm; \ - exit $exit_code +CMD ttcn3-docker-run ggsn_tests GGSN_Tests diff --git a/ttcn3-hlr-test/Dockerfile b/ttcn3-hlr-test/Dockerfile index b180567a..36761a77 100644 --- a/ttcn3-hlr-test/Dockerfile +++ b/ttcn3-hlr-test/Dockerfile @@ -9,8 +9,4 @@ VOLUME /data COPY HLR_Tests.cfg /data/HLR_Tests.cfg -CMD cd /data && \ - /osmo-ttcn3-hacks/start-testsuite.sh /osmo-ttcn3-hacks/hlr/HLR_Tests; \ - exit_code=$?; \ - /osmo-ttcn3-hacks/log_merge.sh HLR_Tests --rm; \ - exit $exit_code +CMD ttcn3-docker-run hlr HLR_Tests diff --git a/ttcn3-mgw-test/Dockerfile b/ttcn3-mgw-test/Dockerfile index b05fa216..bd74f799 100644 --- a/ttcn3-mgw-test/Dockerfile +++ b/ttcn3-mgw-test/Dockerfile @@ -9,8 +9,4 @@ VOLUME /data COPY MGCP_Test.cfg /data/MGCP_Test.cfg -CMD cd /data && \ - /osmo-ttcn3-hacks/start-testsuite.sh /osmo-ttcn3-hacks/mgw/MGCP_Test; \ - exit_code=$?; \ - /osmo-ttcn3-hacks/log_merge.sh MGCP_Test --rm; \ - exit $exit_code +CMD ttcn3-docker-run mgw MGCP_Test diff --git a/ttcn3-msc-test/Dockerfile b/ttcn3-msc-test/Dockerfile index 06c07cac..8ce98286 100644 --- a/ttcn3-msc-test/Dockerfile +++ b/ttcn3-msc-test/Dockerfile @@ -9,8 +9,4 @@ VOLUME /data COPY MSC_Tests.cfg /data/MSC_Tests.cfg -CMD cd /data && \ - /osmo-ttcn3-hacks/start-testsuite.sh /osmo-ttcn3-hacks/msc/MSC_Tests; \ - exit_code=$?; \ - /osmo-ttcn3-hacks/log_merge.sh MSC_Tests --rm; \ - exit $exit_code +CMD ttcn3-docker-run msc MSC_Tests diff --git a/ttcn3-nitb-sysinfo/Dockerfile b/ttcn3-nitb-sysinfo/Dockerfile index 4d0cf73c..026a4654 100644 --- a/ttcn3-nitb-sysinfo/Dockerfile +++ b/ttcn3-nitb-sysinfo/Dockerfile @@ -9,8 +9,4 @@ VOLUME /data COPY Test.cfg /data/Test.cfg -CMD cd /data && \ - /osmo-ttcn3-hacks/start-testsuite.sh /osmo-ttcn3-hacks/sysinfo/Test; \ - exit_code=$?; \ - /osmo-ttcn3-hacks/log_merge.sh Test --rm; \ - exit $exit_code +CMD ttcn3-docker-run sysinfo Test diff --git a/ttcn3-pcu-test/Dockerfile b/ttcn3-pcu-test/Dockerfile index 2c7d52f4..2a35db36 100644 --- a/ttcn3-pcu-test/Dockerfile +++ b/ttcn3-pcu-test/Dockerfile @@ -9,8 +9,4 @@ VOLUME /data COPY PCU_Tests.cfg /data/PCU_Tests.cfg -CMD cd /data && \ - /osmo-ttcn3-hacks/start-testsuite.sh /osmo-ttcn3-hacks/pcu/PCU_Tests; \ - exit_code=$?; \ - /osmo-ttcn3-hacks/log_merge.sh PCU_Tests --rm; \ - exit $exit_code +CMD ttcn3-docker-run pcu PCU_Tests diff --git a/ttcn3-remsim-test/Dockerfile b/ttcn3-remsim-test/Dockerfile index c826d7c6..0391d0ab 100644 --- a/ttcn3-remsim-test/Dockerfile +++ b/ttcn3-remsim-test/Dockerfile @@ -9,8 +9,4 @@ VOLUME /data COPY REMSIM_Tests.cfg /data/REMSIM_Tests.cfg -CMD cd /data && \ - /osmo-ttcn3-hacks/start-testsuite.sh /osmo-ttcn3-hacks/remsim/REMSIM_Tests; \ - exit_code=$?; \ - /osmo-ttcn3-hacks/log_merge.sh REMSIM_Tests --rm; \ - exit $exit_code +CMD ttcn3-docker-run remsim REMSIM_Tests diff --git a/ttcn3-sccp-test/Dockerfile b/ttcn3-sccp-test/Dockerfile index 3fc4ca3b..a818d8bc 100644 --- a/ttcn3-sccp-test/Dockerfile +++ b/ttcn3-sccp-test/Dockerfile @@ -9,8 +9,4 @@ VOLUME /data COPY SCCP_Tests.cfg /data/SCCP_Tests.cfg -CMD cd /data && \ - /osmo-ttcn3-hacks/start-testsuite.sh /osmo-ttcn3-hacks/sccp/SCCP_Tests; \ - exit_code=$?; \ - /osmo-ttcn3-hacks/log_merge.sh SCCP_Tests --rm; \ - exit $exit_code +CMD ttcn3-docker-run sccp SCCP_Tests diff --git a/ttcn3-sgsn-test/Dockerfile b/ttcn3-sgsn-test/Dockerfile index 2cc9778d..2a2e66e5 100644 --- a/ttcn3-sgsn-test/Dockerfile +++ b/ttcn3-sgsn-test/Dockerfile @@ -9,8 +9,4 @@ VOLUME /data COPY SGSN_Tests.cfg /data/SGSN_Tests.cfg -CMD cd /data && \ - /osmo-ttcn3-hacks/start-testsuite.sh /osmo-ttcn3-hacks/sgsn/SGSN_Tests; \ - exit_code=$?; \ - /osmo-ttcn3-hacks/log_merge.sh SGSN_Tests --rm; \ - exit $exit_code +CMD ttcn3-docker-run sgsn SGSN_Tests diff --git a/ttcn3-sip-test/Dockerfile b/ttcn3-sip-test/Dockerfile index 4d138ce3..bce215a8 100644 --- a/ttcn3-sip-test/Dockerfile +++ b/ttcn3-sip-test/Dockerfile @@ -9,8 +9,4 @@ VOLUME /data COPY SIP_Tests.cfg /data/SIP_Tests.cfg -CMD cd /data && \ - /osmo-ttcn3-hacks/start-testsuite.sh /osmo-ttcn3-hacks/sip/SIP_Tests; \ - exit_code=$?; \ - /osmo-ttcn3-hacks/log_merge.sh SIP_Tests --rm; \ - exit $exit_code +CMD ttcn3-docker-run sip SIP_Tests diff --git a/ttcn3-smlc-test/Dockerfile b/ttcn3-smlc-test/Dockerfile index d2a081f4..21d77a49 100644 --- a/ttcn3-smlc-test/Dockerfile +++ b/ttcn3-smlc-test/Dockerfile @@ -9,8 +9,4 @@ VOLUME /data COPY SMLC_Tests.cfg /data/SMLC_Tests.cfg -CMD cd /data && \ - /osmo-ttcn3-hacks/start-testsuite.sh /osmo-ttcn3-hacks/smlc/SMLC_Tests; \ - exit_code=$?; \ - /osmo-ttcn3-hacks/log_merge.sh SMLC_Tests --rm; \ - exit $exit_code +CMD ttcn3-docker-run smlc SMLC_Tests diff --git a/ttcn3-stp-test/Dockerfile b/ttcn3-stp-test/Dockerfile index 0ae2c5e1..073753bb 100644 --- a/ttcn3-stp-test/Dockerfile +++ b/ttcn3-stp-test/Dockerfile @@ -9,8 +9,4 @@ VOLUME /data COPY STP_Tests.cfg /data/STP_Tests.cfg -CMD cd /data && \ - /osmo-ttcn3-hacks/start-testsuite.sh /osmo-ttcn3-hacks/stp/STP_Tests; \ - exit_code=$?; \ - /osmo-ttcn3-hacks/log_merge.sh STP_Tests --rm; \ - exit $exit_code +CMD ttcn3-docker-run stp STP_Tests