- initial attempt at styling up the IBM Checker output
authorvance <vance@1e5ffdc8-eadd-0310-9daa-9cb4117fe24b>
Thu, 13 Apr 2006 03:33:07 +0000 (03:33 +0000)
committervance <vance@1e5ffdc8-eadd-0310-9daa-9cb4117fe24b>
Thu, 13 Apr 2006 03:33:07 +0000 (03:33 +0000)
- move checker output to a whole new action

Vance

git-svn-id: file:///home/svn/build-farm/trunk@303 1e5ffdc8-eadd-0310-9daa-9cb4117fe24b

build_test.fns
snab.fns
web/build.pl
web/build_farm.css

index 7a23a4e6bdeda1ccafcaab2548bac4746ef733e9..b57879c97ace56bff14c0a69b8235517776c55bb 100644 (file)
@@ -170,9 +170,6 @@ action_build() {
                # in netbsd make. 
                do_make proto showflags everything
                do_make everything
-               if [ -f ibm_checker.out ]; then
-                   cat ibm_checker.out
-               fi
                ;;
        samba|samba_3_0)
            do_make proto everything torture
@@ -187,6 +184,22 @@ action_build() {
        return $bstatus
 }
 
+############################
+# show static analysis results
+action_cc_checker() {
+
+       # default to passing the cc_checker
+        cccstatus=0
+
+       if [ -f ibm_checker.out ]; then
+               cat ibm_checker.out
+               cccstatus=`cat ibm_checker.out | grep '^ \-\-' | wc -l`
+       fi
+
+       echo "CC_CHECKER STATUS: $cccstatus"
+       return $cccstatus;      
+}
+
 ############################
 # install the tree
 action_install() {
index 57245b959f010b3ff64288b1e7a2e3f79b2a44ca..6d49d371fb43f189289dca03ea0cc6422dd529ac 100644 (file)
--- a/snab.fns
+++ b/snab.fns
@@ -11,4 +11,4 @@ export LD_LIBRARY_PATH=/home/tridge/beam-3.1.1/dll
 export CFLAGS="-Wall"
 export CC_CHECKER="/home/tridge/beam-3.1.1/bin/beam_compile --beam::source=/home/tridge/beam/samba4/config.tcl -c --beam::parser_file=$BP --beam::complaint_file=$BC"
 
-test_tree samba4 source gcc
+test_tree samba4 source gcc configure build cc_checker install test
index 74d2785a53940e8da89c83a1acd113d26aa28ec8..e9380751304285b2aa93ae83d739d83a1f3ab5a8 100755 (executable)
@@ -345,6 +345,10 @@ sub build_status($$$$)
        $sstatus = "";
     }
 
+    if ($log =~ /CC_CHECKER STATUS: (.*)/ && $1 > 0) {
+       $sstatus .= "/<span class=\"status checker\">$1</span>";
+    }
+
     $ret = "<a href=\"$myself?function=View+Build;host=$host;tree=$tree;compiler=$compiler";
     if ($rev) {
            $ret .= ";revision=$rev";
@@ -888,6 +892,11 @@ sub print_log_pretty() {
              ==========================================\s+
             }{make_collapsible_html('test', $1, $4, $id++, $5)}exgs;
 
+  $log =~ s{
+             --\ ((ERROR|WARNING|MISTAKE).*?)\n
+             (.*?)
+             \n{3,}
+           }{make_collapsible_html('cc_checker', $1, $3, $id++, $2)}exgs;
 
   print "<tt><pre>" .join('', $log) . "</pre></tt><p>\n";
 }
index 92fed34fd63b468ff2b7ee15bb4221eb98679354..d9e997c63fe925755565eb09e6d3f8c864e686a5 100644 (file)
@@ -5,15 +5,12 @@
        font-weight: bold;
        font-family: sans-serif;
 }
-#log .status.failed {
-       color: rgb(153, 0, 0);;
-}
-#log .status.passed {
-       color: rgb(0, 153, 0);
-}
-#log .status.skipped {
-       color: rgb(0, 0, 153);
-}
+#log .status.failed {  color: rgb(153, 0,   0);   }
+#log .status.passed {  color: rgb(0,   153, 0);   }
+#log .status.skipped { color: rgb(0,   0,   153); }
+#log .status.error {   color: rgb(153, 0,   0);   }
+#log .status.warning { color: rgb(153, 75,  0);   }
+#log .status.mistake { color: rgb(0,   0,   153); }
 #log .output {
        color: rgb(0, 0, 0);
        font-family: monospace;
        padding: 10px;
        border: 2px solid black;
 }
-#log div.unit.passed {
-       background-color: rgb(180, 255, 180);
-}
-#log div.unit.failed {
-       background-color: rgb(255, 180, 180);
-}
-#log div.unit.skipped {
-       background-color: rgb(180, 180, 255);
-}
-#log .unit.failed .output {
-       display: block;
-}
-#log .unit.skipped .output {
-       display: block;
-}
-#log .unit.passed .output {
-       display: none;
-}
+#log div.unit.passed { background-color: rgb(180, 255, 180); }
+#log div.unit.failed { background-color: rgb(255, 180, 180); }
+#log div.unit.skipped {        background-color: rgb(180, 180, 255); }
+#log div.unit.warning {        background-color: rgb(255, 180, 125); }
+#log div.unit.error {  background-color: rgb(255, 180, 180); }
+#log div.unit.mistake {        background-color: rgb(180, 180, 255); }
+
+#log .unit.failed  .output {   display: block;}
+#log .unit.skipped .output {   display: block;}
+#log .unit.passed  .output {   display: none;}
+#log .unit.error   .output {   display: none;}
+#log .unit.mistake .output {   display: none;}
+#log .unit.warning .output {   display: none;}
+
 #log div.output-stderr-0 {
        display: none;
 }
         color: rgb(255, 0, 0);
 }
 
-.panic { 
+.status.panic { 
         color: rgb(255, 0, 0);
         font-weight: bold;
 }
+.status.checker { 
+        color: rgb(255, 127, 0);
+}
+.status.checker:before { 
+        content: "Checker: ";
+}
 .status.unknown { 
         color: rgb(0, 0, 255);
 }