|
|
64459f3 |
#!/bin/sh
|
|
|
64459f3 |
|
|
|
64459f3 |
if test "$#" -eq 0
|
|
|
64459f3 |
then
|
|
|
fa9ba05 |
echo >&2 "Usage: $0 [ /mnt/brew/packages/gdb/VERSION/DIST/data/logs/ARCH/build.log ]"
|
|
|
fa9ba05 |
echo >&2 " [ /mnt/brew/scratch/USERNAME/task_TASKID/logs/ARCH/build.log ]"
|
|
|
fa9ba05 |
echo >&2 " [ /mnt/brew/work/tasks/TASKID/build.log ] ..."
|
|
|
64459f3 |
exit 1
|
|
|
64459f3 |
fi
|
|
|
64459f3 |
|
|
|
fa9ba05 |
if [ -d tests ];then
|
|
|
fa9ba05 |
if [ ! -f tests/.v2 ];then
|
|
|
fa9ba05 |
echo >&2 "Directory will be deleted!: tests"
|
|
|
fa9ba05 |
exit 1
|
|
|
fa9ba05 |
fi
|
|
|
fa9ba05 |
rm -rf tests
|
|
|
fa9ba05 |
fi
|
|
|
fa9ba05 |
mkdir tests
|
|
|
fa9ba05 |
touch tests/.v2 # Marker for this temporary directory type
|
|
|
fa9ba05 |
|
|
|
fa9ba05 |
find "$@" -path '*/build.log' -print | while read f
|
|
|
64459f3 |
do
|
|
|
fa9ba05 |
echo "$f" >&2
|
|
|
fa9ba05 |
ver=`echo "$f" | sed -n -e 's,^.*gdb/\([-0-9\.]*\)/\([^/]*\)/data/logs/\([^/]*\)/.*$,-\1,p'`
|
|
|
fa9ba05 |
rel=`echo "$f" | sed -n -e 's,^.*gdb/\([-0-9\.]*\)/\([^/]*\)/data/logs/\([^/]*\)/.*$,-\2,p'`
|
|
|
fa9ba05 |
isa=`echo "$f" | sed -n -e 's,^.*gdb/\([-0-9\.]*\)/\([^/]*\)/data/logs/\([^/]*\)/.*$,.\3,p'`
|
|
|
fa9ba05 |
if test -z "$ver" ; then
|
|
|
fa9ba05 |
ver=`echo "$f" | sed -n -e 's,^.*/scratch/.*/task_\([0-9]*\)/logs/\([^/]*\)/.*$,-\1,p'`
|
|
|
fa9ba05 |
fi
|
|
|
f0d366b |
if test -z "$ver" ; then
|
|
|
f0d366b |
ver=`echo "$f" | sed -n -e 's,^.*/build-\([0-9]*\)/.*$,-\1,p'`
|
|
|
f0d366b |
fi
|
|
|
fa9ba05 |
if test -z "$isa" ; then
|
|
|
fa9ba05 |
isa=`echo "$f" | sed -n -e 's,^.*/scratch/.*/task_\([0-9]*\)/logs/\([^/]*\)/.*$,-\2,p'`
|
|
|
fa9ba05 |
fi
|
|
|
2c3eddc |
if test -z "$ver" ; then
|
|
|
2c3eddc |
ver=`echo "$f" | sed -n -e 's,^.*/work/tasks/\([0-9]*\)/.*$,-\1,p'`
|
|
|
2c3eddc |
fi
|
|
|
64459f3 |
# begin 644 gdb-i386-redhat-linux-gnu.tar.bz2
|
|
|
2b428b9 |
for t in sum log ; do
|
|
|
2c3eddc |
if test -z "$isa" ; then
|
|
|
2c3eddc |
isa=`uudecode < "$f" -o /dev/stdout | bunzip2 \
|
|
|
2c3eddc |
| tar -t -f - "gdb-*-redhat-linux-gnu.$t" 2>&1 \
|
|
|
2c3eddc |
| sed -n 's/^gdb-\(.*\)-redhat-linux-gnu[.].*$/-\1/p' \
|
|
|
2c3eddc |
`
|
|
|
2c3eddc |
fi
|
|
|
2c3eddc |
line="gdb${ver}${rel}${isa}"
|
|
|
fa9ba05 |
uudecode < "$f" -o /dev/stdout | bunzip2 \
|
|
|
2c3eddc |
| tar -xpvvO -f - "gdb-*-redhat-linux-gnu.$t" \
|
|
|
fa9ba05 |
> "tests/$line.$t"
|
|
|
2b428b9 |
done
|
|
|
64459f3 |
done
|
|
|
fa9ba05 |
|
|
|
fa9ba05 |
( cd tests && /home/cygnus/cagney/bin/do-analize-tests *.sum )
|
|
|
fa9ba05 |
|
|
|
fa9ba05 |
echo "$PWD/tests/*.html"
|
|
|
fa9ba05 |
ls -1 tests/*.html 1>&2
|