mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-28 06:49:43 +00:00
3f3d37ca09
http://www.mail-archive.com/lyx-devel@lists.lyx.org/msg152211.html git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@30148 a592a061-630c-0410-9148-cb99ea01b6c8
61 lines
1.5 KiB
Bash
Executable File
61 lines
1.5 KiB
Bash
Executable File
#!/bin/bash
|
|
# This script starts LyX, and restarts LyX if it is closed
|
|
# it logs all output, including backtraces to development/keystest/out/GDB
|
|
|
|
#Setting the following may give better screen shots
|
|
#gconftool-2 /apps/metacity/general/compositing_manager -s -t bool true
|
|
|
|
DIRNAME0=`dirname "$0"`
|
|
OUTDIR="$DIRNAME0/out"
|
|
|
|
#rename other windows to avoid confusion.
|
|
wmctrl -N __renamed__ -r lyx
|
|
wmctrl -N __renamed__ -r lyx
|
|
wmctrl -N __renamed__ -r lyx
|
|
wmctrl -N __renamed__ -r lyx
|
|
|
|
(
|
|
while true
|
|
do
|
|
SEC=`date +%s`
|
|
GDB=$OUTDIR/$SEC.GDB
|
|
KEYCODE=$OUTDIR/$SEC.KEYCODE
|
|
( sleep 20 && python $DIRNAME0/test.py | tee $KEYCODE) &
|
|
CHILD_PID="$!"
|
|
ls src/lyx ; sleep 1
|
|
pwd
|
|
#sleep 10
|
|
|
|
#You may want to use the following to simulate SIGFPE
|
|
#(sleep 90 && killall -8 lyx) &
|
|
|
|
(echo "
|
|
shell svn info src/
|
|
run
|
|
bt
|
|
shell kill $CHILD_PID
|
|
shell import -window root '$GDB.png'
|
|
shell wmctrl -l
|
|
shell sleep 1
|
|
shell kill -9 $CHILD_PID
|
|
shell wmctrl -r __renamed__ -b add,shaded
|
|
shell wmctrl -r term -b add,shaded
|
|
shell wmctrl -r term -b add,shaded
|
|
shell wmctrl -R lyx
|
|
shell import -window root '$GDB..png'
|
|
" ; yes q) | gdb src/lyx 2>&1 | strings| tee $GDB
|
|
kill $CHILD_PID
|
|
#sleep 2 kill -9 $CHILD_PID
|
|
grep " signal " $GDB || (
|
|
rm $OUTDIR/*GDB*.bak
|
|
rm $OUTDIR/*KEYCODE*.bak
|
|
mv $KEYCODE $KEYCODE.bak
|
|
mv $GDB $GDB.bak
|
|
mv $GDB.png $GDB.png.bak
|
|
mv $GDB..png $GDB..png.bak
|
|
#rm $OUTDIR/KEYCODE.$SEC
|
|
#rm $OUTDIR/GDB.$SEC
|
|
)
|
|
done
|
|
) 2>&1 |tee $OUTDIR/log
|