diff options
| author | don bright <hugh.m.bright@gmail.com> | 2013-02-02 19:04:05 (GMT) | 
|---|---|---|
| committer | don bright <hugh.m.bright@gmail.com> | 2013-02-02 19:04:05 (GMT) | 
| commit | 52cb3b00c2ce6981e3d3e7588fb11ab44b7c962f (patch) | |
| tree | ec0334584c38a19cfadfdc4bb548e5516b43bd5e | |
| parent | e9e62272a6cda04c453dd2d27b1a7e91be05f242 (diff) | |
start Xvfb on random DISPLAY number.
| -rw-r--r-- | tests/CTestCustom.template | 6 | ||||
| -rwxr-xr-x | tests/virtualfb.sh | 5 | 
2 files changed, 7 insertions, 4 deletions
| diff --git a/tests/CTestCustom.template b/tests/CTestCustom.template index 72e6443..0e51e21 100644 --- a/tests/CTestCustom.template +++ b/tests/CTestCustom.template @@ -37,8 +37,10 @@ if( __cmake_system_name__ MATCHES "Linux|BSD")      message("Process ID of vfb: ${VFB_PID}")    endif()    if ("${VFB_DISPLAY}" STREQUAL "" OR "${VFB_PID}" STREQUAL "") -    message("Virtual framebuffer had a problem starting.") -    execute_process("cat virtualfblog") +    set(VFBLOG "virtualfb.log") +    message("Virtual framebuffer had a problem starting. Printing ${VFBLOG}") +    execute_process(COMMAND cat virtualfb.log OUTPUT_VARIABLE VFBLOGTXT) +    message("Log: ${VFBLOGTXT}")    else()      message("Virtual framebuffer started. DISPLAY=${VFB_DISPLAY}, PID=${VFB_PID}")    endif() diff --git a/tests/virtualfb.sh b/tests/virtualfb.sh index 3c0cf0e..e745765 100755 --- a/tests/virtualfb.sh +++ b/tests/virtualfb.sh @@ -13,8 +13,9 @@ if [ ! $VFB_BINARY ]; then    exit 1  fi -DISPLAY=:98 -$VFB_BINARY $DISPLAY -screen 0 800x600x24 &> virtualfblog & +DISPLAY=`echo | awk 'BEGIN{srand();} {printf ":%.0f", rand()*1000+100};'` +#DISPLAY=:98 +$VFB_BINARY $DISPLAY -screen 0 800x600x24 &> virtualfb.log &  echo PID=$! " "  echo DISPLAY=$DISPLAY  # trap "kill -KILL $xpid ||:" EXIT | 
