TT#139455 test: define cache_dir inside results

* remove support for local result

We need to force using /code volumen as read-only
to detect problems with the test environment

Change-Id: Idce04b1b00caf22562fc4161eb52317459aee03d
mr10.2
Victor Seva 5 years ago
parent cad3178c35
commit 63d80c5213

@ -61,5 +61,5 @@ perlcheck:
test:
mkdir -p $(RESULTS)
cd t ; py.test-3 --junit-xml=../$(RESULTS)/pytest.xml -vv -l
cd t ; py.test-3 --junit-xml=$(RESULTS)/pytest.xml -vv -l
# EOF

@ -24,11 +24,11 @@ WORKDIR /code/
# (jump to the next section if you don't want to build yourself!):
#
# % docker build --tag="ngcpcfg-bullseye" -f ./t/Dockerfile .
# % docker run --rm -i -t -v $(pwd):/code:rw ngcpcfg-bullseye:latest bash
# % docker run --rm -i -t -v /tmp/results:/results:rw -v $(pwd):/code:rw ngcpcfg-bullseye:latest bash
#
# Use the existing docker image:
# % docker pull docker.mgm.sipwise.com/ngcpcfg-bullseye
# % docker run --rm -i -t -v $(pwd):/code:rw docker.mgm.sipwise.com/ngcpcfg-bullseye:latest bash
# % docker run --rm -i -t -v /tmp/results:/results:rw -v $(pwd):/code:ro docker.mgm.sipwise.com/ngcpcfg-bullseye:latest bash
#
# Inside docker (the command is in history, just press UP button):
# cd /code && ./t/testrunner

@ -1,6 +1,7 @@
[pytest]
junit_family=xunit2
python_files=*.py
cache_dir = /results/.cache/pytest
markers =
apply
build

@ -5,15 +5,4 @@
set -e
set -u
if [ -d /results ] ; then
# Running from Jenkins (RW)
RESULTS="/results"
cd "/code"
else
# Running locally in Docker
RESULTS="./results"
mkdir -p "${RESULTS}"
fi
RESULTS=${RESULTS} make test
RESULTS=/results make test

Loading…
Cancel
Save