-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathrun-test
More file actions
executable file
·34 lines (25 loc) · 874 Bytes
/
run-test
File metadata and controls
executable file
·34 lines (25 loc) · 874 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
32
33
#!/bin/bash
set -e
run-daemon() {
if [[ `docker ps|grep ghdld_vlsi|wc -l` = 0 ]]; then
echo running container daemon...
docker run --rm -it -d -v "`pwd`":"`pwd`" -w "`pwd`" -u 1000:1000 --name ghdld_vlsi ghdl/ext sleep 1h >/dev/null
echo daemon is up
echo -n 'vunit version: '
docker exec -w "$PWD" ghdld_vlsi python3 scripts/vunit-main.py --version
echo write out/project.json
mkdir -p out
docker exec -w "$PWD" ghdld_vlsi python3 scripts/vunit-main.py --export-json out/project.json -o out
fi
}
main() {
run-daemon
echo "run tests for project.$TEST"
docker exec -w "$PWD" ghdld_vlsi python3 scripts/vunit-main.py project.$TEST -p 5 -x out/report.xml --minimal --keep-compiling --gtkwave-fmt vcd -o out -q
}
if [[ "$1" = "" ]]; then
TEST='*'
else
TEST="$1.*"
fi
main