From 939796f137f745efaa3e88697f635c8dbe03b0f9 Mon Sep 17 00:00:00 2001 From: Tommaso Cucinotta Date: Mon, 7 Feb 2011 23:32:27 +0000 Subject: [PATCH] Added emergency STOP button in tcl/tk window for immediate & painless termination of the tests. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@37551 a592a061-630c-0410-9148-cb99ea01b6c8 --- development/autotests/run-tests.sh | 3 +++ development/autotests/stop.gif | Bin 0 -> 896 bytes development/autotests/stop_autotests.tcl | 17 +++++++++++++++++ 3 files changed, 20 insertions(+) create mode 100644 development/autotests/stop.gif create mode 100755 development/autotests/stop_autotests.tcl diff --git a/development/autotests/run-tests.sh b/development/autotests/run-tests.sh index 8514aa1668..8b807c2f04 100755 --- a/development/autotests/run-tests.sh +++ b/development/autotests/run-tests.sh @@ -38,6 +38,9 @@ if [ ! -d $LYX_HOME ]; then cd .. fi +# Launch the emergency STOP button +./stop_autotests.tcl & + echo "Running test cases . . ." failed=0 for t in $(echo "$TESTS" | sed -e 's/-in.txt//g'); do diff --git a/development/autotests/stop.gif b/development/autotests/stop.gif new file mode 100644 index 0000000000000000000000000000000000000000..907beed8ead513c66f84c949fb26b111b501d5cc GIT binary patch literal 896 zcmZ?wbhEHbRA5kG_?FMG$H;V_k?9^Ivm-`k$BfKQ7@3_iGCN~rddA4?91vOAT`)4c zXl#Dj*!+r-*)=1x8%Acgjm_@>1ubo#7@0jYGJ9cU{?gd|wXwxlWAnep=08j<{#)9e zv2nOyy!?K7`G58e z{N@+*%P;69exR zCsnmitLyI8H$JFqyw=omzq$2JOWVW7=4UPKPdd6DboD&x>Uq@D_oA!!QQw3oeG?u{ znDlJYl&4dtznC=T$((u5=FEFFW7dm#3!W`m_F}=J*DF`QUcd3px(%;4ZhpIY>zggx z-frLZVc-6bM~{6taq<%oojLRM@|CYwuYS35?d$D3-|pP~cJKbr=P!Q0efR6#yFcH) z{r~@;fkdGAlZBCip@2aLqz@D)4DA0J3YwZ*THD$?Iyt*JdOQ1DcqVc33kvY}va?TU zpTsL7DP!d7>82zt!rMKkd6Jk+aB^7e*FIN^VhT#gR`xi zIy#cZZt{C|ScIk4n7eiBHSmNr%=B2Fw6`-s?9yzHmV?V2*)?=tI$cUSsuOE+>9$iV z2WwfgP|5)%zd0wH&F_C@ zxNdW9x5I{nk4Ybs)_mcb|6qY`8k@)rW9M}zzP3E)1Kg+@00 zr2Pj@o2KW8@NR3|Q*gMgclN$!=IslWN)|G6roD;CE3E8$dPZBXJ@94#6RX`briIJ* z{*HO)P~-EXLgOHZviqgg@#p__OcXpOs;RK3#j{rJ$LH7lj~=QocU7}sY!zV|2_%F0z=v3V{!$X0= F8US`kl)?Z2 literal 0 HcmV?d00001 diff --git a/development/autotests/stop_autotests.tcl b/development/autotests/stop_autotests.tcl new file mode 100755 index 0000000000..5784e8ea93 --- /dev/null +++ b/development/autotests/stop_autotests.tcl @@ -0,0 +1,17 @@ +#! /usr/bin/wish8.5 + +wm attributes . -topmost 1 + +image create photo .stop -format GIF -file stop.gif +button .stop_autotests -image .stop -text "STOP LyX Tests" -compound left -command { + set status 0 + if {[catch {exec killall --wait run-tests.sh single-test.sh lyx} results]} { + if {[lindex $::errorCode 0] eq "CHILDSTATUS"} { + set status [lindex $::errorCode 2] + } else { + # Some kind of unexpected failure + } + } + exit +} +pack .stop_autotests