ttcn3.sh: support IMAGE_SUFFIX=latest

Add the image suffix to the marker in run_docker() which indicates if
the testsuite docker container was already built (with all its
dependencies), so the script doesn't assume that everything is already
built if using without IMAGE_SUFFIX first and then switching to
IMAGE_SUFFIX=latest.

Add an usage example to README for IMAGE_SUFFIX=latest.

Change-Id: I867740831810324a7f5906a0548f0d04ecb9a0a1
This commit is contained in:
Oliver Smith 2021-08-10 15:41:47 +02:00
parent f03dfa30a2
commit f3eb0ba445
2 changed files with 2 additions and 1 deletions

1
README
View File

@ -152,6 +152,7 @@ feasible).
Example usage:
./ttcn3/ttcn3.sh mgw
IMAGE_SUFFIX=latest ./ttcn3/ttcn3.sh mgw
More about the testsuites:
https://osmocom.org/projects/cellular-infrastructure/wiki/Titan_TTCN3_Testsuites

View File

@ -236,7 +236,7 @@ run_docker() {
local hacks="${DIR_OSMODEV}/src/osmo-ttcn3-hacks"
local docker_dir="$(get_testsuite_dir_docker)"
local docker_name="$(basename "$docker_dir")"
local marker="${DIR_OSMODEV}/ttcn3/make/.docker.$docker_name"
local marker="${DIR_OSMODEV}/ttcn3/make/.docker.$docker_name.$IMAGE_SUFFIX"
# Skip building docker containers if this already ran
if [ -e "$marker" ]; then