diff options
author | Oliver Smith <osmith@sysmocom.de> | 2021-02-10 16:25:40 +0100 |
---|---|---|
committer | Oliver Smith <osmith@sysmocom.de> | 2021-02-11 15:45:40 +0100 |
commit | 2b38b8e7791706216c489d63b6190cbeef027138 (patch) | |
tree | 485b7ea8a3603a0e8da0d1fc5460d839d33ee715 | |
parent | 914a486ef1c5a5b16f6f0f3bce2c327ea54fcac2 (diff) |
ttcn3: move shared run code to script
While I'm at it with tidying up the Dockerfiles, create a
ttcn3-docker-run.sh with shared run code.
Related: OS#5017
Change-Id: Id90769707158f0488eca2313c57b99ea7a4a27c8
-rw-r--r-- | debian-stretch-titan/Dockerfile | 1 | ||||
-rwxr-xr-x | debian-stretch-titan/ttcn3-docker-run.sh | 23 | ||||
-rw-r--r-- | ttcn3-bsc-test/Dockerfile | 6 | ||||
-rw-r--r-- | ttcn3-bscnat-test/Dockerfile | 6 | ||||
-rw-r--r-- | ttcn3-bts-test/Dockerfile | 6 | ||||
-rw-r--r-- | ttcn3-ggsn-test/Dockerfile | 6 | ||||
-rw-r--r-- | ttcn3-hlr-test/Dockerfile | 6 | ||||
-rw-r--r-- | ttcn3-mgw-test/Dockerfile | 6 | ||||
-rw-r--r-- | ttcn3-msc-test/Dockerfile | 6 | ||||
-rw-r--r-- | ttcn3-nitb-sysinfo/Dockerfile | 6 | ||||
-rw-r--r-- | ttcn3-pcu-test/Dockerfile | 6 | ||||
-rw-r--r-- | ttcn3-remsim-test/Dockerfile | 6 | ||||
-rw-r--r-- | ttcn3-sccp-test/Dockerfile | 6 | ||||
-rw-r--r-- | ttcn3-sgsn-test/Dockerfile | 6 | ||||
-rw-r--r-- | ttcn3-sip-test/Dockerfile | 6 | ||||
-rw-r--r-- | ttcn3-smlc-test/Dockerfile | 6 | ||||
-rw-r--r-- | ttcn3-stp-test/Dockerfile | 6 |
17 files changed, 39 insertions, 75 deletions
diff --git a/debian-stretch-titan/Dockerfile b/debian-stretch-titan/Dockerfile index daa0f8c..512b4ac 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 0000000..0cda8a5 --- /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 c56f3a5..10b7267 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 405c0a6..d970482 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 4aa3825..7abf1a9 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 e38e9d5..e67dc9f 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 b180567..36761a7 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 b05fa21..bd74f79 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 06c07ca..8ce9828 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 4d0cf73..026a465 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 2c7d52f..2a35db3 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 c826d7c..0391d0a 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 3fc4ca3..a818d8b 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 2cc9778..2a2e66e 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 4d138ce..bce215a 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 d2a081f..21d77a4 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 0ae2c5e..073753b 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 |