summaryrefslogtreecommitdiff
path: root/tests/virtualfb.sh
diff options
context:
space:
mode:
authordon bright <hugh.m.bright@gmail.com>2013-02-03 00:21:47 (GMT)
committerdon bright <hugh.m.bright@gmail.com>2013-02-03 00:21:47 (GMT)
commit8c9c9adfe0f0fa5c1ade561a61f3f8add3600c22 (patch)
tree12378cbef04ee47dfc4263a5679acd339049d508 /tests/virtualfb.sh
parent1a545b75f6bd05a0eca42e1f797aa4853aca88d6 (diff)
improve Xvfb handling when ctest is cancelled partway through
Diffstat (limited to 'tests/virtualfb.sh')
-rwxr-xr-xtests/virtualfb.sh8
1 files changed, 6 insertions, 2 deletions
diff --git a/tests/virtualfb.sh b/tests/virtualfb.sh
index e0d8320..d34a4f9 100755
--- a/tests/virtualfb.sh
+++ b/tests/virtualfb.sh
@@ -47,8 +47,12 @@ stop()
isrunning()
{
isrunning_result=
- if [ -e ./virtualfb.PID ]; then isrunning_result=1 ; fi
- if [ -e ./virtualfb.DISPLAY ]; then isrunning_result=1 ; fi
+ if [ -e ./virtualfb.PID ]; then
+ VFB_PID=`cat ./virtualfb.PID`
+ if [ "`ps cax | awk ' { print $1 } ' | grep ^$VFB_PID\$`" ]; then
+ isrunning_result=1
+ fi
+ fi
}
isrunning
contact: Jan Huwald // Impressum