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
changes/22/22822/2
Oliver Smith 2 years ago
parent 914a486ef1
commit 2b38b8e779
  1. 1
      debian-stretch-titan/Dockerfile
  2. 23
      debian-stretch-titan/ttcn3-docker-run.sh
  3. 6
      ttcn3-bsc-test/Dockerfile
  4. 6
      ttcn3-bscnat-test/Dockerfile
  5. 6
      ttcn3-bts-test/Dockerfile
  6. 6
      ttcn3-ggsn-test/Dockerfile
  7. 6
      ttcn3-hlr-test/Dockerfile
  8. 6
      ttcn3-mgw-test/Dockerfile
  9. 6
      ttcn3-msc-test/Dockerfile
  10. 6
      ttcn3-nitb-sysinfo/Dockerfile
  11. 6
      ttcn3-pcu-test/Dockerfile
  12. 6
      ttcn3-remsim-test/Dockerfile
  13. 6
      ttcn3-sccp-test/Dockerfile
  14. 6
      ttcn3-sgsn-test/Dockerfile
  15. 6
      ttcn3-sip-test/Dockerfile
  16. 6
      ttcn3-smlc-test/Dockerfile
  17. 6
      ttcn3-stp-test/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

@ -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

@ -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

@ -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

@ -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

@ -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

@ -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

@ -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

@ -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

@ -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

@ -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

@ -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

@ -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

@ -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

@ -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

@ -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

@ -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

Loading…
Cancel
Save