2 # --- T2-COPYRIGHT-NOTE-BEGIN ---
3 # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
5 # T2 SDE: misc/archive/RegressionsReport.sh
6 # Copyright (C) 2004 - 2005 The T2 SDE Project
8 # More information can be found in the files COPYING and README.
10 # This program is free software; you can redistribute it and/or modify
11 # it under the terms of the GNU General Public License as published by
12 # the Free Software Foundation; version 2 of the License. A copy of the
13 # GNU General Public License can be found in the file COPYING.
14 # --- T2-COPYRIGHT-NOTE-END ---
17 revision
=`svn info | sed -n 's,^Revision: \(.*\),\1,p'`
19 if [ "$1" == "-cfg" ]; then
23 eval `grep '^export SDECFG_ID=' config/$config/config`
25 if [ -z "$SDECFG_ID" ]; then
26 echo "Invalid config '$cfg'."
32 echo "[$( date +%T )] Auditing '$config' to '$TARGET/' ..."
33 sh misc
/archive
/AuditBuild.sh
-w $TARGET -cfg $config --no-enabled-too -repository package
/* \
34 |
grep '\(CHANGED\|UPDATED\|ADDED\|FAILED\|PENDING\|DISABLED\)' > $TARGET/regressions.
$config.$$
35 echo "[$( date +%T )] Auditing completed."
37 if [ ! -d $TARGET/$config ]; then
38 echo "Something weird happened running AuditBuild.sh. $TARGET/$config was not created."
42 echo "[$( date +%T )] Rendering report..."
47 <head><title>T2 r$revision - $( date )</title></head>
50 <tr><th colspan="2">$SDECFG_ID ($revision)</th></tr>
52 <table border="1" cellspacing="0" width="100%">
53 <tr><td>revision</td><td>:</td><td>$revision</td></tr>
54 <tr><td>config</td><td>:</td><td>
57 mkdir
-p $TARGET/$config/config
58 for x
in config
/$config/*; do
59 cp $x $TARGET/$config/${x##config/$config/}.txt
60 echo -e "\t\t<a href=\"${x##config/$config/}.txt\">${x##config/$config/}</a><br />"
63 pkgenabled
=$
( grep '^X' config
/$config/packages |
wc -l )
64 pkgdisabled
=$
( grep '^O' config
/$config/packages |
wc -l )
65 pkgtotal
=$
( ls -1 package
/*/*/*.desc |
wc -l )
68 <tr><td>Enabled</td><td>:</td><td>$pkgenabled</td></tr>
69 <tr><td>Disabled</td><td>:</td><td>$pkgdisabled</td></tr>
70 <tr><td>Hidden</td><td>:</td><td>$( expr $pkgtotal - $pkgenabled - $pkgdisabled )</td></tr>
71 <tr><td>Total</td><td>:</td><td>$pkgtotal</td></tr>
78 pkgtotal
=0 pkgerr
=0 pkgok
=0
79 for stagelevel
in 0 1 2 3 4 5 6 7 8 9; do
80 while read x x x repo pkg x
; do
82 if [ -f build
/$SDECFG_ID/var
/adm
/logs
/$stagelevel-$pkg.err
]; then
85 <tr><td>$stagelevel</td><td><a href="log/$stagelevel-$pkg.err.txt">$repo/$pkg</a></td></tr>
87 elif [ -f build
/$SDECFG_ID/var
/adm
/logs
/$stagelevel-$pkg.log
]; then
90 done < <( grep -e "$pattern$stagelevel.*" config
/$config/packages
)
93 } > $TARGET/regressions.
$config.$$
-2
96 <table border="1" cellspacing="0" width="100%">
97 <tr><td>Total</td><td>:</td><td align="right">$pkgtotal</td></tr>
98 <tr><td>Built Fine</td><td>:</td><td align="right">$pkgok</td></tr>
99 <tr><td>Broken Builds</td><td>:</td><td align="right">$pkgerr</td></tr>
100 <tr><td>Pending Builds</td><td>:</td><td align="right">$( expr $pkgtotal - $pkgok - $pkgerr )</td></tr>
103 <table border="1" cellspacing="0" width="100%">
104 <tr><th colspan="2">Failed Builds</th></tr>
105 $( cat $TARGET/regressions.$config.$$-2 )
109 <tr><th>Package</th><th>SVN Status</th><th>Version</th><th>Audit</th><th>Status</th></tr>
112 grep -v DISABLED
$TARGET/regressions.
$config.$$
116 <tr><th>Package</th><th>SVN Status</th><th>Version</th><th>Audit</th><th>Status</th></tr>
119 grep DISABLED
$TARGET/regressions.
$config.$$
126 } > $TARGET/regressions.
$config.html
128 echo "[$( date +%T )] Rendering finished."
130 rm -f $TARGET/regressions.
$config.$$
$TARGET/regressions.
$config.$$
-2
131 mv -f $TARGET/regressions.
$config.html
$TARGET/$config/regressions.html