]> git.lyx.org Git - features.git/commitdiff
Added emergency STOP button in tcl/tk window for immediate & painless termination...
authorTommaso Cucinotta <tommaso@lyx.org>
Mon, 7 Feb 2011 23:32:27 +0000 (23:32 +0000)
committerTommaso Cucinotta <tommaso@lyx.org>
Mon, 7 Feb 2011 23:32:27 +0000 (23:32 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@37551 a592a061-630c-0410-9148-cb99ea01b6c8

development/autotests/run-tests.sh
development/autotests/stop.gif [new file with mode: 0644]
development/autotests/stop_autotests.tcl [new file with mode: 0755]

index 8514aa1668794576b8acb41e0c3008ac69de3f6f..8b807c2f04163e5ab3742ffcb9c6a3aba94e81c7 100755 (executable)
@@ -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 (file)
index 0000000..907beed
Binary files /dev/null and b/development/autotests/stop.gif differ
diff --git a/development/autotests/stop_autotests.tcl b/development/autotests/stop_autotests.tcl
new file mode 100755 (executable)
index 0000000..5784e8e
--- /dev/null
@@ -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