Skip to content

Commit

Permalink
Trying to exploit the process group to kill modelsim at the end of th…
Browse files Browse the repository at this point in the history
…e job

See ipbus#53
  • Loading branch information
alessandrothea committed Jul 4, 2018
1 parent 39ba7dc commit e3074c6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tests/ci/test_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -66,14 +66,15 @@ if [[ "$PROJ" == "sim" ]]; then
set -x
./vsim -c work.top -gIP_ADDR='X"c0a8c902"' -do 'run 60sec' -do 'quit' > /dev/null 2>&1 &
VSIM_PID=$!
VSIM_PGRP=$(ps -p ${VSIM_PID} -o pgrp=)
# tickle the simulation
sleep 10
ping 192.168.201.2 -c 5
# Cleanup, send sigint to the whole process group
# (that is the parent PID, put a - in front to indicate it's the group you're after)
pstree -p ${VSIM_PID}
ps x -o "%p %r %y %x %c " | grep vsim
kill -SIGINT -- -${VSIM_PID}
pkill -SIGINT -g ${VSIM_PGRP} vsimk
set +x
else
ipbb proj create vivado -t top_${PROJ}.dep ${PROJ} ipbus-firmware:projects/example
Expand Down

0 comments on commit e3074c6

Please sign in to comment.