Commit 8acc15dc authored by Martin Jeřábek's avatar Martin Jeřábek

run-docker-test: autoremove container, allow for direct command execution

parent d10d8186
Pipeline #2051 passed with stages
in 5 minutes and 37 seconds
......@@ -4,6 +4,9 @@
# Run docker with vunit and ghdl with current directory mounted in /build.
# It is ready to run tests via, for example, `make test_fast coverage`
#
# Can also be run directly with command to run:
# ./run-docker-test make test_fast
#
if [ -d /build ]; then
export PATH=/opt/ghdl/bin:$PATH
......@@ -11,8 +14,12 @@ if [ -d /build ]; then
export LANG=C.UTF-8
export PYTHONUNBUFFERED=1
cd /build/test
exec bash
if [ $# -gt 0 ]; then
exec "$@"
else
exec bash
fi
else
docker run -ti -v $PWD:/build mjerabek/ghdl:upstream-gcc /build/run-docker-test
docker run --rm -ti -v $PWD:/build mjerabek/ghdl:upstream-gcc /build/run-docker-test "$@"
fi
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment