blob: f816182368f9090f9b69584abedaec02f0f42929 [file] [log] [blame]
#!/usr/local/bin/bash
#
# $Id: genxviews 601595 2007-12-06 01:33:50Z sebor $
#
########################################################################
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed
# with this work for additional information regarding copyright
# ownership. The ASF licenses this file to you under the Apache
# License, Version 2.0 (the "License"); you may not use this file
# except in compliance with the License. You may obtain a copy of
# the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
# implied. See the License for the specific language governing
# permissions and limitations under the License.
#
########################################################################
# extract the script's revision number
myrev='$Revision$'
myrev=${myrev#'$Revision: '} # strip leading text
myrev=${myrev%' $'} # strip trailing text
# form the URL to this version of the script in the repository
myurl='$HeadURL: https://svn.apache.org/repos/asf/incubator/stdcxx/trunk/bin/genxviews $'
myurl=${myurl#'$HeadURL: '} # strip leading text
myurl=${myurl##*asf/} # strip svn prefix
myurl=${myurl%' $'} # strip trailing text
# prepend ViewVC prefix
myurl="http://svn.apache.org/viewvc/$myurl"
# extract program name from the url (used in diagnostic messages)
readonly myname=${myurl##*/}
myurl="$myurl?view=markup&rev=$myrev"
# program to invoke to process detailed results
CROSS=$HOME/stdcxx/bin/xbuildgen
# output directory
outdir=$HOME/public_html/stdcxx/results
dryrun=0
quiet=0
# start the clock measuring the amount of wall clock time to process
# all logs and generate the page
start_time=`LC_ALL=C date`
# process command line options
while getopts "dqD:o:" opt_name; do
case $opt_name in
# options with no arguments
d) # dry run (do not invoke xbuildgen)
dryrun=1
;;
q) # quiet mode
quiet=1
;;
# options with arguments
D) # output directory
outdir=$OPTARG
;;
o) # argument is the name of output file (stdout by default)
outfile=$OPTARG
;;
esac;
done
cd $outdir
if [ $quiet -eq 0 ]; then
readonly scripturl="<a href=\"$myurl\"><code>$myname</code></a>"
cat<<EOF
<html>
<body>
<style type="text/css">
table {
border-width:0px;
background:#000000;
font-size:smaller;
}
th {
font-size:smaller;
background:#cccccc;
text-align:center;
}
td {
font-size:smaller;
padding: 3px;
text-align: center;
background-color: lightblue;
}
</style>
<h1>Available Multi-platform Build Result Views</h1>
Generated `date` by $scripturl on `hostname` running `uname -sr`
<hr>
<table>
<thead>
<tr>
<th>Operating System</td>
<th>Architecture</td>
<th>Compiler</td>
<th>Build Results</td>
<th>Logs</td>
<th>Time<br>(sec)</td>
</tr>
</thead>
<tbody>
EOF
fi # [ $quiet -eq 0 ]
process_results ()
{
osname="$1"
arch="$2"
compiler="$3"
alllogs="$4"
outfile="$5"
if [ $quiet -eq 0 ]; then
cat<<EOF
<tr>
<td>$osname</td>
<td>$arch</td>
<td>$compiler</td>
EOF
fi # [ quiet -eq 0 ]
# build types:
# 8: not reentrant, optimized, no debugging info
# 11: not reentrant, not optimized with debugging info
# 12: reentrant, optimized, no debugging info
# 15: reentrant, not optimized, with debugging info
btypes="8 11 12 15"
# a, A: AIX shared archive (32-bit and 64-bit, respectively)
# d, D: shared library (.sl, .so, or .dll)
# s, S: archive library (.a or .lib(
suffixes="a A d D s S"
unset buildlogs
count=0
for b in $btypes; do
for s in $suffixes; do
log=`echo $alllogs | tr ' ' '\n' | grep "[-]$b$s-" \
| sort | tail -n 1`
if [ "$log" != "" ]; then
buildlogs="$buildlogs $log"
count=`expr $count + 1`
fi
done
done
# create a title for the page
title="$compiler results on $osname/$arch"
# start the clock
duration=`expr \( $(date +%M) \* 60 \) + $(date +%S)`
if [ "$buildlogs" = "" ]; then
echo "$myname: no logs for $compiler on $osname/$arch." >&2
if [ $quiet -eq 0 ]; then
echo " <td><i>$outfile</i></td>"
fi
else
if [ $dryrun -eq 1 ]; then
echo "$myname: $CROSS -o$outdir/$outfile -T\"$title\" $buildlogs # $count logs"
else
if [ $quiet -eq 0 ]; then
echo " <td><a href="$outfile">$outfile</a></td>"
fi
$CROSS -o$outdir/$outfile -T"$title" $buildlogs
fi
fi
# compute the number of seconds it took to process the logs
end=`expr \( \( $(date +%M) \* 60 \) + $(date +%S) \)`
if [ $end -lt $duration ]; then
# adjust for overflow
end=`expr $end + 60`
fi
duration=`expr $end - $duration`
if [ $quiet -eq 0 ]; then
cat<<EOF
<td>$count</td>
<td>$duration</td>
</tr>
EOF
fi # [ quiet -eq 0 ]
}
########################################################################
# operating systems and compilers below are listed alphabetically
# starting with the most recent version first
# AIX ##################################################################
process_results "AIX 5.3" "PowerPC" "IBM XLC++ 9.0" \
"aix-5.3-ppc-vacpp-9.0-*-*-log.gz.txt" \
aix-5.3-ppc-vacpp-9.0.html
process_results "AIX 5.3" "PowerPC" "IBM XLC++ 8.0" \
"aix-5.3-ppc-vacpp-8.0-*-*-log.gz.txt" \
aix-5.3-ppc-vacpp-8.0.html
process_results "AIX 5.3" "PowerPC" "IBM XLC++ 7.0" \
"aix-5.3-ppc-vacpp-7.0-*-*-log.gz.txt" \
aix-5.3-ppc-vacpp-7.0.html
process_results "AIX 5.2" "PowerPC" "IBM VisualAge C++ 6.0" \
"aix-5.2-ppc-vacpp-6.0-*-*-log.gz.txt" \
aix-5.2-ppc-vacpp-6.0.html
# FreeBSD ##############################################################
process_results "FreeBSD 6.2" "x86" "gcc 3.4.4" \
"freebsd-6.2-x86-gcc-3.4.4-*-*-log.gz.txt" \
freebsd-6.2-x86-gcc-3.4.4.html
# HP-UX ################################################################
process_results "HP-UX 11.31" "PA-RISC" "HP aCC 3.74" \
"hpux-11.31-pa-acc-3.74-*-*-log.gz.txt" \
hpux-11.31-pa-acc-3.74.html
process_results "HP-UX 11.31" "PA-RISC" "HP aCC 3.73" \
"hpux-11.31-pa-acc-3.73-*-*-log.gz.txt" \
hpux-11.31-pa-acc-3.73.html
process_results "HP-UX 11.23" "IPF" "HP aCC 6.13" \
"hpux-11.23-ia64-acc-6.13-*-*-log.gz.txt" \
hpux-11.23-ia64-acc-6.13.html
process_results "HP-UX 11.23" "IPF" "HP aCC 6.00" \
"hpux-11.23-ia64-acc-6.00-*-*-log.gz.txt" \
hpux-11.23-ia64-acc-6.00.html
process_results "HP-UX 11.23" "IPF" "HP aCC 5.57" \
"hpux-11.23-ia64-acc-5.57-*-*-log.gz.txt" \
hpux-11.23-ia64-acc-5.57.html
process_results "HP-UX 11.23" "PA-RISC" "HP aCC 3.73" \
"hpux-11.23-pa-acc-3.73-*-*-log.gz.txt" \
hpux-11.23-pa-acc-3.73.html
process_results "HP-UX 11.23" "PA-RISC" "HP aCC 3.63" \
"hpux-11.23-pa-acc-3.63-*-*-log.gz.txt" \
hpux-11.23-pa-acc-3.63.html
process_results "HP-UX 11.11" "PA-RISC" "HP aCC 3.73" \
"hpux-11.11-pa-acc-3.73-*-*-log.gz.txt" \
hpux-11.11-pa-acc-3.73.html
process_results "HP-UX 11.11" "PA-RISC" "HP aCC 3.63" \
"hpux-11.11-pa-acc-3.63-*-*-log.gz.txt" \
hpux-11.11-pa-acc-3.63.html
# IRIX #################################################################
process_results "IRIX 6.5" "MIPS" "SGI MIPSpro 7.41" \
"irix-6.5-mips-mipspro-7.41-*-*-log.gz.txt" \
irix-6.5-mips-mipspro-7.41.htm
# Red Hat Linux ########################################################
# Red Hat Enterprise Linux 5.0
process_results "Red Hat Enterprise Linux 5.0" "EM64T" "EDG eccp 3.9" \
"linux_redhat_el-5.0-em64t-eccp-3.9-*-*-log.gz.txt" \
linux_redhat_el-5.0-em64t-eccp-3.9.html
process_results "Red Hat Enterprise Linux 5.0" "EM64T" "gcc 4.1.1" \
"linux_redhat_el-5.0-em64t-gcc-4.1.1-*-*-log.gz.txt" \
linux_redhat_el-5.0-em64t-gcc-4.1.1.html
process_results "Red Hat Enterprise Linux 5.0" "EM64T" "Intel C++ 10.0" \
"linux_redhat_el-5.0-em64t-icc-10.0-*-*-log.gz.txt" \
linux_redhat_el-5.0-em64t-icc-10.0.html
process_results "Red Hat Enterprise Linux 5.0" "EM64T" "Intel C++ 9.1" \
"linux_redhat_el-5.0-em64t-icc-9.1-*-*-log.gz.txt" \
linux_redhat_el-5.0-em64t-icc-9.1.html
# Red Hat Enterprise Linux 4 Update 4
process_results "Red Hat Enterprise Linux 4 Update 4" "AMD64" "gcc 3.4.6" \
"linux_redhat_el-4.4-amd64-gcc-3.4.6-*-*-log.gz.txt" \
linux_redhat_el-4.4-amd64-gcc-3.4.6.html
process_results "Red Hat Enterprise Linux 4 Update 4" "EM64T" "Intel C++ 10.0" \
"linux_redhat_el-4.4-em64t-icc-10.0-*-*-log.gz.txt" \
linux_redhat_el-4.4-em64t-icc-10.0.html
process_results "Red Hat Enterprise Linux 4 Update 4" "EM64T" "Intel C++ 9.1" \
"linux_redhat_el-4.4-em64t-icc-9.1-*-*-log.gz.txt" \
linux_redhat_el-4.4-em64t-icc-9.1.html
# Red Hat Enterprise Linux 4 Update 2
process_results "Red Hat Enterprise Linux 4 Update 4" "AMD64" "gcc 3.4.6" \
"linux_redhat_el-4.4-amd64-gcc-3.4.6-*-*-log.gz.txt" \
linux_redhat_el-4.4-amd64-gcc-3.4.6.html
process_results "Red Hat Enterprise Linux 4 Update 2" "IA64" "gcc 3.4.4" \
"linux_redhat_el-4.2-ia64-gcc-3.4.4-*-*-log.gz.txt" \
linux_redhat_el-4.2-ia64-gcc-3.4.4.html
process_results "Red Hat Enterprise Linux 4 Update 2" "IA64" "Intel C++ 9.1" \
"linux_redhat_el-4.2-ia64-icc-9.1-*-*-log.gz.txt" \
linux_redhat_el-4.2-ia64-icc-9.1.html
# Red Hat Enterprise Linux 3 Update 8
process_results "Red Hat Enterprise Linux 3 Update 8" "EM64T" "gcc 3.2.3" \
"linux_redhat_el-3.8-em64t-gcc-3.2.3-*-*-log.gz.txt" \
linux_redhat_el-3.8-em64t-gcc-3.2.3.html
# Solaris ##############################################################
process_results "Solaris 10" "SPARC" "EDG eccp 3.9" \
"solaris-10-sparc-eccp-3.9-*-*-log.gz.txt" \
solaris-10-sparc-eccp-3.9.html
process_results "Solaris 10" "SPARC" "gcc 4.1.1" \
"solaris-10-sparc-gcc-4.1.1-*-*-log.gz.txt" \
solaris-10-sparc-gcc-4.1.1.html
process_results "Solaris 10" "SPARC" "Sun C++ 5.9" \
"solaris-10-sparc-sunpro-5.9-*-*-log.gz.txt" \
solaris-10-sparc-sunpro-5.9.html
process_results "Solaris 10" "SPARC" "Sun C++ 5.8" \
"solaris-10-sparc-sunpro-5.8-*-*-log.gz.txt" \
solaris-10-sparc-sunpro-5.8.html
process_results "Solaris 10" "SPARC" "Sun C++ 5.7" \
"solaris-10-sparc-sunpro-5.7-*-*-log.gz.txt" \
solaris-10-sparc-sunpro-5.7.html
process_results "Solaris 9" "SPARC" "EDG eccp 3.9" \
"solaris-9-sparc-eccp-3.9-*-*-log.gz.txt" \
solaris-9-sparc-eccp-3.9.html
process_results "Solaris 9" "SPARC" "Sun C++ 5.9" \
"solaris-9-sparc-sunpro-5.9-*-*-log.gz.txt" \
solaris-9-sparc-sunpro-5.9.html
process_results "Solaris 9" "SPARC" "Sun C++ 5.6" \
"solaris-9-sparc-sunpro-5.6-*-*-log.gz.txt" \
solaris-9-sparc-sunpro-5.6.html
process_results "Solaris 8" "SPARC" "Sun C++ 5.8" \
"solaris-8-sparc-sunpro-5.8-*-*-log.gz.txt" \
solaris-8-sparc-sunpro-5.8.html
process_results "Solaris 8" "SPARC" "Sun C++ 5.3" \
"solaris-8-sparc-sunpro-5.3-*-*-log.gz.txt" \
solaris-8-sparc-sunpro-5.3.html
process_results "Solaris 10" "AMD64" "Sun C++ 5.9" \
"solaris-10-amd64-sunpro-5.9-*-*-log.gz.txt" \
solaris-10-amd64-sunpro-5.9.html
process_results "Solaris 10" "AMD64" "Sun C++ 5.8" \
"solaris-10-amd64-sunpro-5.8-*-*-log.gz.txt" \
solaris-10-amd64-sunpro-5.8.html
# SuSE Linux ###########################################################
# SuSE Enterprise Server 10
process_results "SuSE Enterprise Server 10.0" "EM64T" "EDG eccp 3.9" \
"linux_suse-10.0-em64t-eccp-3.9-*-*-log.gz.txt" \
linux_suse-10.0-em64t-eccp-3.9.html
process_results "SuSE Enterprise Server 10.0" "EM64T" "gcc 4.1.0" \
"linux_suse-10.0-em64t-gcc-4.1.0-*-*-log.gz.txt" \
linux_suse-10.0-em64t-gcc-4.1.0.html
process_results "SuSE Enterprise Server 10.0" "EM64T" "Intel C++ 10.0" \
"linux_suse-10.0-em64t-icc-10.0-*-*-log.gz.txt" \
linux_suse-10.0-em64t-icc-10.0.html
process_results "SuSE Enterprise Server 10.0" "EM64T" "Intel C++ 9.1" \
"linux_suse-10.0-em64t-icc-9.1-*-*-log.gz.txt" \
linux_suse-10.0-em64t-icc-9.1.html
# SuSE Enterprise Server 9.1
process_results "SuSE Enterprise Server 9.1" "AMD64" "gcc 3.3.3" \
"linux_suse-9.1-amd64-gcc-3.3.3-43.28-*-*-log.gz.txt" \
linux_suse-9.1-amd64-gcc-3.3.3.html
process_results "SuSE Enterprise Server 9.1" "AMD64" "Intel C++ 10.0" \
"linux_suse-9.1-amd64-icc-10.0-*-*-log.gz.txt" \
linux_suse-9.1-amd64-icc-10.0.html
process_results "SuSE Enterprise Server 9.1" "AMD64" "Intel C++ 9.1" \
"linux_suse-9.1-amd64-icc-9.1-*-*-log.gz.txt" \
linux_suse-9.1-amd64-icc-9.1.html
process_results "SuSE Enterprise Server 9.1" "AMD64" "EDG eccp 3.9" \
"linux_suse-9.1-amd64-eccp-3.9-*-*-log.gz.txt" \
linux_suse-9.1-amd64-eccp-3.9.html
process_results "SuSE Enterprise Server 9.1" "AMD64" "Sun C++ 5.9" \
"linux_suse-9.1-amd64-sunpro-5.9-*-*-log.gz.txt" \
linux_suse-9.1-amd64-sunpro-5.9.html
# CygWin ###############################################################
process_results "CygWin/Windows XP" "x86" "gcc 3.4.4" \
"win_xp-2-x86-gcc-3.4.4-*-*-log.gz.txt" \
win_xp-2-x86-gcc-3.4.4.html
# Windows ##############################################################
process_results "Windows Vista" "EM64T" "MSVC 8.0" \
"win_vista-0-em64t-msvc-8.0-*-*-log.gz.txt" \
win_vista_0-em64t-msvc-8.0.html
process_results "Windows Vista" "EM64T" "Intel C++ 10.0" \
"win_vista-0-em64t-icl-10.0-*-*-log.gz.txt" \
win_vista_0-em64t-icl-10.0.html
process_results "Windows XP, SP2" "x86" "MSVC 8.0" \
"win_xp-2-x86-msvc-8.0-*-*-log.gz.txt" \
win_xp_2-x86-msvc-8.0.html
process_results "Windows XP, SP2" "x86" "MSVC 7.1" \
"win_xp-2-x86-msvc-7.1-*-*-log.gz.txt" \
win_xp_2-x86-msvc-7.1.html
process_results "Windows XP, SP2" "x86" "Intel C++ 10.0" \
"win_xp-2-x86-icl-10.0-*-*-log.gz.txt" \
win_xp_2-x86-icl-10.0.html
process_results "Windows XP, SP2" "x86" "Intel C++ 9.1" \
"win_xp-2-x86-icl-9.1-*-*-log.gz.txt" \
win_xp_2-x86-icl-9.1.html
process_results "Windows XP, SP1" "EM64T" "MSVC 8.0" \
"win_xp-1-em64t-msvc-8.0-*-*-log.gz.txt" \
win_xp_1-em64t-msvc-8.0.html
process_results "Windows XP, SP1" "EM64T" "Intel C++ 10.0" \
"win_xp-1-em64t-icl-10.0-*-*-log.gz.txt" \
win_xp_1-em64t-icl-10.0.html
process_results "Windows 2003, SP1" "EM64T" "MSVC 8.0" \
"win_2003-1-em64t-msvc-8.0-*-*-log.gz.txt" \
win_2003_1-em64t-msvc-8.0.html
process_results "Windows 2003, SP1" "EM64T" "Intel C++ 10.0" \
"win_2003-1-em64t-icl-10.0-*-*-log.gz.txt" \
win_2003_1-em64t-icl-10.0.html
process_results "Windows 2000, SP4" "x86" "MSVC 7.1" \
"win_2000-4-x86-msvc-7.1-*-*-log.gz.txt" \
win_2000_4-x86-msvc-7.1.html
process_results "Windows 2000, SP4" "x86" "Intel C++ 9.1" \
"win_2000-4-x86-icl-9.1-*-*-log.gz.txt" \
win_2000_4-x86-icl-9.1.html
# compute the number of seconds it took to process all logs
readonly now=`date`
processing_time=`$HOME/stdcxx/bin/duration "$start_time" "$now"`
cat<<EOF
</table>
<hr>
<i>Generated in $processing_time.</i>
</body>
</html>
EOF