changeset 76:e58ce2aebd18 emscripten

Merge from default branch
author Chris Cannam
date Thu, 30 Oct 2014 13:25:25 +0000
parents 7ad02f9ac051 (current diff) a76b96026c2d (diff)
children 5f61994de79a
files SCRIPTS/process.sh
diffstat 3 files changed, 137 insertions(+), 42 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/SCRIPTS/include.sh	Thu Oct 30 13:25:25 2014 +0000
@@ -0,0 +1,17 @@
+#!/bin/bash
+
+vcs_id() {
+    dir="$1"
+    ( cd "$dir" ;
+	if [ -d .hg ]; then
+	    hg id | awk '{ print $1; }'
+	elif [ -d .git ]; then
+	    git rev-parse --short HEAD
+	elif [ -d .svn ]; then
+	    svn info | grep ^Revision | awk '{ print $2; }'
+	else
+	    echo "unknown"
+	fi
+    )
+}
+
--- a/SCRIPTS/process.sh	Thu Oct 30 11:07:40 2014 +0000
+++ b/SCRIPTS/process.sh	Thu Oct 30 13:25:25 2014 +0000
@@ -12,6 +12,8 @@
 mydir=$(dirname "$0")
 case "$mydir" in /*);; *) mydir=$(pwd)/"$mydir";; esac
 
+. "$mydir"/include.sh
+
 have_all=true
 for program in make perl git svn hg zip tar ; do
     if ! $program --version >/dev/null 2>&1; then
@@ -514,21 +516,6 @@
     fi
 }
 
-vcs_id() {
-    dir="$1"
-    ( cd "$dir" ;
-	if [ -d .hg ]; then
-	    hg id | awk '{ print $1; }'
-	elif [ -d .git ]; then
-	    git rev-parse --short HEAD
-	elif [ -d .svn ]; then
-	    svn info | grep ^Revision | awk '{ print $2; }'
-	else
-	    echo "unknown"
-	fi
-    )
-}
-
 package() {
     dir="$1"
     id=$(vcs_id "$dir")
--- a/SCRIPTS/summarise.sh	Thu Oct 30 11:07:40 2014 +0000
+++ b/SCRIPTS/summarise.sh	Thu Oct 30 13:25:25 2014 +0000
@@ -3,6 +3,8 @@
 mydir=$(dirname "$0")
 case "$mydir" in /*);; *) mydir=$(pwd)/"$mydir";; esac
 
+. "$mydir"/include.sh
+
 plugindirs="$@"
 if [ -z "$plugindirs" ]; then
     plugindirs=$(cat .hgsub | grep -v vamp-plugin-sdk | grep -v vamp-plugin-tester | awk '{ print $1; }')
@@ -21,64 +23,153 @@
 <head>
 <style type="text/css">
 .good { color: blue; }
+.dl { color: green; }
 .bad { color: red; }
+table { border: 1px solid black; }
+tr { padding: 0px; background-color: #f0f0f0; }
+tr.odd { background-color: #fafafa; }
+td, th { text-align: center; min-width: 4em; margin: 0px; padding: 0.4em; }
+td.pluginname { text-align: right; }
+td.build, th.build { border-left: 1px solid black; }
+th { border-bottom: 1px solid black; }
 a, a:link, a:visited, a:hover, a:active { text-decoration: none; }
 </style>
 </head>
 <body>
-<table>
-<tr><th>Plugin&nbsp;Library</th>
+<table cellspacing=0>
+<tr><th></th>
 EOF
 
 for p in $platforms ; do
-    echo "<th>$p</th>"
+    echo "<th colspan=4 class=build>$p</th>"
 done
 
-echo "</tr>";
+echo "</tr>"
+echo "<tr><td></td>"
+
+for p in $platforms ; do
+    echo "<th class=build>Build</th>"
+    echo "<th>Test</th>"
+    echo "<th>Check</th>"
+    echo "<th>Package</th>"
+done
+
+echo "</tr>"
 
 yes="<span class=good>&#x2714;</span>"
 no="<span class=bad>&#x2718;</span>"
 unknown="<span class=unknown>?</span>"
+missing="<span class=missing>&ndash;</span>"
+dl="<span class=dl>&#x21a7;</span>"
 
-for dir in $plugindirs ; do
-    dir=${dir%/*}
-    echo "<tr><td>$dir</td>"
-    for p in $platforms ; do
-	reportdir="REPORTS/$p"
-	summary="$reportdir/$dir.summary.txt"
-	echo "<td>"
-	if [ -f "$summary" ]; then
-	    outcome=$(cat "$summary" | awk -F: '{ print $2; }' | sed 's/^ *//')
-	    echo "<a href='$reportdir/$dir.build.txt'>"
-	    case "$outcome" in
-		BUILD_FAILED) echo "$no";;
-		*_FAILED*) echo "$yes";;
-		OK) echo "$yes";;
-		*) echo "$unknown";;
-	    esac
-	    echo "</a>"
+# The possible outcomes are:
+#
+# OK - built, passed tests, passed env checks
+# BUILD_FAILED - build failed so unable to test
+# TEST_FAILED - build succeeded, tests failed, env checks passed
+# ENV_FAILED - build succeeded, tests passed, env checks failed
+# TEST_FAILED ENV_FAILED - build succeeded, tests and env checks failed
+
+emit_build() {
+    reportdir="$1"
+    dir="$2"
+    outcome="$3"
+    echo "<a href='$reportdir/$dir.build.txt'>"
+    case "$outcome" in
+	BUILD_FAILED) echo "$no";;
+	*_FAILED*) echo "$yes";;
+	OK) echo "$yes";;
+	*) echo "$unknown";;
+    esac
+    echo "</a>"
+}
+
+emit_test() {
+    reportdir="$1"
+    dir="$2"
+    outcome="$3"
+    case "$outcome" in
+	BUILD_FAILED) echo "$missing";;
+	*)
 	    echo "<a href='$reportdir/$dir.test.txt'>"
 	    case "$outcome" in
-		BUILD_FAILED) echo "$no";;
 		*TEST_FAILED*) echo "$no";;
 		*_FAILED*) echo "$yes";;
 		OK) echo "$yes";;
 		*) echo "$unknown";;
 	    esac
-	    echo "</a>"
+	    echo "</a>" ;;
+    esac
+}
+
+emit_env() {
+    reportdir="$1"
+    dir="$2"
+    outcome="$3"
+    echo "<a href='$reportdir/$dir.envtest.txt'>"
+    case "$outcome" in
+	BUILD_FAILED) echo "$missing";;
+	*)
 	    echo "<a href='$reportdir/$dir.envtest.txt'>"
 	    case "$outcome" in
-		*FAILED*) echo "$no";;
+		*ENV_FAILED*) echo "$no";;
+		*FAILED*) echo "$yes";;
 		OK) echo "$yes";;
 		*) echo "$unknown";;
 	    esac
-	    echo "</a>"
+	    echo "</a>" ;;
+    esac
+}
+
+emit_package() {
+    platform="$1"
+    dir="$2"
+    outcome="$3"
+    case "$outcome" in
+	OK)
+	    id=$(vcs_id "$dir")
+	    package=$(echo "PACKAGES/$platform/$dir-$platform-$id".*)
+	    echo "package is $package" 1>&2
+	    if [ -f "$package" ]; then
+		echo "<a href='$package'>$dl</a>"
+	    fi
+	    ;;
+	*) ;;
+    esac
+}
+
+oddeven=odd
+
+for dir in $plugindirs ; do
+    dir=${dir%/*}
+    echo "<tr class=$oddeven><td class=pluginname>$dir</td>"
+    for p in $platforms ; do
+	reportdir="REPORTS/$p"
+	summary="$reportdir/$dir.summary.txt"
+	if [ -f "$summary" ]; then
+	    outcome=$(cat "$summary" | awk -F: '{ print $2; }' | sed 's/^ *//' | fmt -100)
+	    echo "<td class=build>"
+	    emit_build "$reportdir" "$dir" "$outcome"
+	    echo "</td><td>"
+	    emit_test "$reportdir" "$dir" "$outcome"
+	    echo "</td><td>"
+	    emit_env "$reportdir" "$dir" "$outcome"
+	    echo "</td><td>"
+	    emit_package "$p" "$dir" "$outcome"
+	    echo "</td>"
 	else
-	    echo "$unknown"
+	    echo "<td class=build>$missing</td>"
+	    echo "<td>$missing</td>"
+	    echo "<td>$missing</td>"
+	    echo "<td>$missing</td>"
 	fi
-	echo "</td>"
     done
     echo "</tr>"
+    if [ "$oddeven" = odd ]; then
+	oddeven=even
+    else
+	oddeven=odd
+    fi
 done
 
 echo "</table></body>"