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