-
Notifications
You must be signed in to change notification settings - Fork 18
Expand file tree
/
Copy pathrun-docker-test
More file actions
executable file
·32 lines (28 loc) · 898 Bytes
/
run-docker-test
File metadata and controls
executable file
·32 lines (28 loc) · 898 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#!/bin/bash
#
# 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:/opt/nvc/bin:$PATH
export LC_ALL=C.UTF-8
export LANG=C.UTF-8
export PYTHONUNBUFFERED=1
export HOME=$(mktemp -d /tmp/home.XXXXX)
cd /build/test
if [ $# -gt 0 ]; then
exec "$@"
else
exec bash
fi
else
d="$(realpath "$(dirname "$0")")"
#"
docker run --rm -ti --user=root -e DISPLAY=$DISPLAY -e CTU_TB_TOP_TARGET="tb_ctu_can_fd_rtl_vunit" -v /tmp/.X11-unix:/tmp/.X11-unix \
-v "$d:/build" --user $(id -u):$(id -g) --memory 32G \
registry.gitlab.com/canfd/server-tools/ghdl:latest \
/build/run-docker-test "$@"
fi