common/ttcn3-docker-run.sh: add TEST_NAME env var

Make it possible to run only one test by setting an environment
variable.

Change-Id: I1f45a05e089b429918096fcd64f7c02033d5a9dd
This commit is contained in:
Oliver Smith 2023-10-13 11:26:35 +02:00 committed by osmith
parent 0b97785ceb
commit ba1385fe60
2 changed files with 25 additions and 1 deletions

View File

@ -26,6 +26,16 @@ Environment variables:
Osmocom project. Defaults to `master`.
* `NO_DOCKER_IMAGE_BUILD`: when set to `1`, it won't try to update the
containers (see "caching" below)
* `DOCKER_ARGS`: pass extra arguments to docker, e.g. to mount local sources
for building as done in osmo-dev.git/ttcn3/ttcn3.sh
### Run only one test
```
$ cd ttcn3-hlr-test
$ export DOCKER_ARGS="-e TEST_NAME=TC_gsup_sai"
$ ./jenkins.sh
```
### Using nightly packages from a different date

View File

@ -33,7 +33,21 @@ fi
cd /data
/osmo-ttcn3-hacks/start-testsuite.sh "/osmo-ttcn3-hacks/$SUBDIR/$SUITE"
# Use TEST_NAME to only run one test instead of all. Set it like this:
# $ cd ttcn3-hlr-test
# $ export DOCKER_ARGS="-e TEST_NAME=TC_gsup_sai"
# $ ./jenkins.sh
EXTRA_ARGS=""
if [ -n "$TEST_NAME" ]; then
EXTRA_ARGS="$SUITE.$TEST_NAME"
fi
/osmo-ttcn3-hacks/start-testsuite.sh \
"/osmo-ttcn3-hacks/$SUBDIR/$SUITE" \
"$SUITE.cfg" \
$EXTRA_ARGS
exit_code=$?
/osmo-ttcn3-hacks/log_merge.sh "$SUITE" --rm