X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=development%2Fkeystest%2Freport_html.sh;h=0940c0606df6e18d8dd99b7ab4cd5c10c28ae78b;hb=0a868fb846f5b1196e5572eca0bdff3bbf12b707;hp=a1bbf72ce35db626380fd7cb998b8d74da2260ae;hpb=149bd1ab7b0970b66a856ddffca1ac5efb5bf0aa;p=lyx.git
diff --git a/development/keystest/report_html.sh b/development/keystest/report_html.sh
old mode 100644
new mode 100755
index a1bbf72ce3..0940c0606d
--- a/development/keystest/report_html.sh
+++ b/development/keystest/report_html.sh
@@ -1,28 +1,18 @@
#!/bin/bash
-LT=development/keystest
+#LT=development/keystest
+LT=`dirname $0`
GEOM=320x200
-convert -normalize -scale $GEOM -quality $QUALITY $f $GEOM/$f
-
-UNIQUE_LINE=1
-SRC=
-
-
-if [ -e out/log ]
-then
- LT=.
+QUALITY=85
+if [ -z "$KEYCODE_DIR" ]
+then
+ KEYCODE_DIR=out
fi
+#convert -normalize -scale $GEOM -quality $QUALITY $f $GEOM/$f
-while [ ! -e $LT/out/log ]
-do
- cd ..
- if [ `pwd` = '/' ]
- then
- exit
- fi
-done
+UNIQUE_LINE=1
-OUT=$LT/out/html
+OUT=$LT/out/html4
mkdir -p $OUT
rm $OUT/index*.html
ls $OUT/*.html
@@ -46,7 +36,7 @@ do
then
echo -n '\[!Loop]'
else
- echo -n "$k" | sed s/^KK:\ //
+ echo -n "$k" | sed 's/^KK: //'
fi
done
}
@@ -55,24 +45,33 @@ html_keycode() {
cat "$f_base.KEYCODEpure" | tidy_keycode
echo -n ''
cat "$f_base.KEYCODEpure+" | tidy_keycode
- echo -n '
'
+ echo -n ''
+
}
gdb2html() {
+echo g $g
cat $g | sed 's/&/&/g' | sed 's/</g' | while read -r l
do
+ #c=`echo $l | grep -i -o "at [[:alnum:]./]*:[0-9]*"`
+ #We may want to support slashes later, but we'd have to support browsing
+ #Qt source for that to be useful for LyX
+
c=`echo $l | grep -i -o "at [[:alnum:].]*:[0-9]*"`
if [ -z "$c" ]
then
echo -- "$l" | sed s/--//
else
- cpp=`echo "$c" | sed s/at\ // | sed s/:.*//g`
- lineno=`echo "$c" | sed s/.*://g`
+ cpp=`echo "$c" | sed 's/at //' | sed 's/:.*//g'`
+ #cpp=`basename $cpp`
+ echo cpp $cpp
+ lineno=`echo "$c" | sed 's/.*://g'`
echo $cpp,$lineno 1>&2
#if [ -e "$CPP_HTML_DIR/$cpp.html" ]
if true
then
- echo "$l" | sed "s/$c/$c<\/a>/"
+ #echo "$l" | sed "s/$c/$c<\/a>/"
+ echo "$l" | sed "s?$c?$c<\/a>?"
else
echo "$l"
fi
@@ -80,12 +79,24 @@ do
done | sed 's/^/
/'
}
-for file in `find $LT/out/ | grep replay/last_crash_sec`
+echo beginning
+#for file in `find $LT/out/ -anewer $LT/out/html | grep replay/last_crash_sec`
+#for file in `find $KEYCODE_DIR | grep save/.*KEYCODEpure`
+for file in `find $KEYCODE_DIR -anewer oldfile | grep save/.*KEYCODEpure$`
do
- echo last_crash_sec file: $file
- SEC=`cat $file`
+ lcs_file=`echo $file | sed 's/save\/.*//g'`last_crash_sec
+ echo last_crash_sec file: $lcs_file
+ SEC2=`cat $lcs_file`
+ SEC=`basename $file | sed s/[.].*$//g`
+ echo SEC .$SEC. .$SEC2.
+ #if [ ! $SEC -eq $SEC2 ]
+ #then
+ #break
+ #fi
echo SEC $SEC
- f_base=`echo $file | sed s/last_crash_sec/$SEC/g`
+ #f_base=`echo $file | sed s/last_crash_sec/$SEC/g`
+ f_base=`dirname $file`'/'$SEC
+ echo f_base $f_base
NUM_KEYCODES=`wc -l < "$f_base.KEYCODEpure"`
echo NUM_KEYCODES=$NUM_KEYCODES...
if [ "$NUM_KEYCODES" -lt 80 ]
@@ -94,7 +105,6 @@ do
f=$f_base.GDB
echo $f
g=$f.short
- #if egrep '([Ii][Nn] .*[:[:alnum:]][:][0-9]*[^0-9]|#0 | signal SIG[^T])' -A9999 <$f >$g
egrep '([Ii][Nn] .*[:[:alnum:]][:][0-9]*[^0-9]|#0 | signal SIG[^T])' -A9999 <$f >$g
if true
then
@@ -109,13 +119,22 @@ do
echo '' >> $LT/out/$INDEX
echo -n "$TITLE " >> $OUT/indexreport.html
html_keycode >> $OUT/indexreport.html
+ if ls $f_base.s*.png
+ then
+ echo -n "screenshots" >> $OUT/indexreport.html
+ fi
+ echo -n '
'>> $OUT/indexreport.html
echo >> $OUT/indexreport.html
+ echo -n '
'>> $LT/out/$INDEX
+ echo >> $LT/out/$INDEX
+
( echo ''
echo "