From commits-return-2926-apmail-stdcxx-commits-archive=stdcxx.apache.org@stdcxx.apache.org Wed May 14 23:30:39 2008 Return-Path: Delivered-To: apmail-stdcxx-commits-archive@www.apache.org Received: (qmail 20557 invoked from network); 14 May 2008 23:30:39 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 14 May 2008 23:30:39 -0000 Received: (qmail 31568 invoked by uid 500); 14 May 2008 23:30:41 -0000 Delivered-To: apmail-stdcxx-commits-archive@stdcxx.apache.org Received: (qmail 31545 invoked by uid 500); 14 May 2008 23:30:41 -0000 Mailing-List: contact commits-help@stdcxx.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@stdcxx.apache.org Delivered-To: mailing list commits@stdcxx.apache.org Received: (qmail 31534 invoked by uid 99); 14 May 2008 23:30:41 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 14 May 2008 16:30:41 -0700 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 14 May 2008 23:30:03 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id C9D612388A09; Wed, 14 May 2008 16:30:18 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r656465 - in /stdcxx/trunk/bin: genxviews xbuildgen xcomp.awk Date: Wed, 14 May 2008 23:30:18 -0000 To: commits@stdcxx.apache.org From: sebor@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20080514233018.C9D612388A09@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: sebor Date: Wed May 14 16:30:18 2008 New Revision: 656465 URL: http://svn.apache.org/viewvc?rev=656465&view=rev Log: 2008-05-14 Martin Sebor STDCXX-682 * bin/genxviews (XBUILDGEN): Defined variable to (the best guess of) pathname of the xbuildgen utility. (logdir): Added a variable and the -L command line option to set the directory containing build logs. (outdir): Set to /www/stdcxx.apache.org/builds, the "official" default location of the cross build result pages. (myurl): Avoided using shell variables in definition. Added argument validation and more (verbose) progress output. * bin/xbuildgen (logdir): Determined from log pathnames passed in on the command line and passed to xcomp.awk. (process_builds): Removed unused function. * bin/xcomp.awk (get_gzlogfname): Used logdir. Modified: stdcxx/trunk/bin/genxviews stdcxx/trunk/bin/xbuildgen stdcxx/trunk/bin/xcomp.awk Modified: stdcxx/trunk/bin/genxviews URL: http://svn.apache.org/viewvc/stdcxx/trunk/bin/genxviews?rev=656465&r1=656464&r2=656465&view=diff ============================================================================== --- stdcxx/trunk/bin/genxviews (original) +++ stdcxx/trunk/bin/genxviews Wed May 14 16:30:18 2008 @@ -30,6 +30,16 @@ fi fi +readonly www_stdcxx_dir="/www/stdcxx.apache.org/builds" + +XBUILDGEN=`which xbuildgen 2>/dev/null` + +if [ "$XBUILDGEN" = "" ]; then + XBUILDGEN=`dirname $0`/xbuildgen +fi + +# default directory where to look for build logs to process +logdir=. # show the command line to invoke xbuildgen without actually # invoking the script @@ -38,9 +48,8 @@ # write verbose progress output to stdout? verbose=0 - # process command line options -while getopts "dvD:o:V:" opt_name; do +while getopts "dvD:L:o:V:" opt_name; do case $opt_name in # options with no arguments @@ -54,10 +63,14 @@ # options with arguments - D) # output directory + D) # argument names the directory where to create output files outdir=$OPTARG ;; + L) # argument names the directory containing build logs + logdir=$OPTARG + ;; + o) # argument is the name of output file (stdout by default) outfile=$OPTARG ;; @@ -72,30 +85,27 @@ # set the Subversion and output directories based on version -if [ "$version" == "" ]; then +if [ "$version" = "" ]; then # Subversion (sub)directory under stdcxx/ svndir="trunk" # set output directory unless already set on the command line - if [ "$outdir" = "" ]; then - outdir="$HOME/public_html/stdcxx/results/builds" + if [ "$outdir" = "" -a -w $www_stdcxx_dir ]; then + outdir="/www/stdcxx.apache.org/builds/$svndir" fi else # Subversion (sub)directory under stdcxx/ svndir="branches/$version" # set output directory unless already set on the command line - if [ "$outdir" = "" ]; then - outdir="$HOME/public_html/stdcxx-$version/results/builds" + if [ "$outdir" = "" -a -w $www_stdcxx_dir ]; then + outdir="/www/stdcxx.apache.org/builds/$version" fi verarg="-V$version" fi -# program to invoke to process detailed results -CROSS=$HOME/stdcxx/bin/xbuildgen - # extract the script's revision number myrev='$Revision$' @@ -103,7 +113,7 @@ myrev=${myrev%' $'} # strip trailing text # form the URL to this version of the script in the repository -myurl='$HeadURL: http://svn.apache.org/repos/asf/stdcxx/$svndir/bin/genxviews $' +myurl='$HeadURL: http://svn.apache.org/repos/asf/stdcxx/trunk/bin/genxviews $' myurl=${myurl#'$HeadURL: '} # strip leading text myurl=${myurl##*asf/} # strip svn prefix myurl=${myurl%' $'} # strip trailing text @@ -116,9 +126,24 @@ myurl="$myurl?view=markup&rev=$myrev" +###################################################################### +# validate arguments + +if [ ! -x $XBUILDGEN ]; then + echo "$myname $error: cannot find xbuildgen" >&1 + exit 2 +fi + + +if [ ! -d "$logdir" -o ! -r "$logdir" ]; then + echo "$myname error: \"$logdir\" does not exist or isn't readable" >&2 + exit 2 +fi + if [ $verbose -ne 0 ]; then echo "$myname: using output directory: \"$outdir\"" + echo "$myname: reading logs from: \"$logdir\"" fi ###################################################################### @@ -144,10 +169,7 @@ # start the clock measuring the amount of wall clock time to process # all logs and generate the page -start_time=`LC_ALL=C date` - - -cd $outdir/.. +readonly start_time=`LC_ALL=C date` readonly scripturl="$myname" @@ -201,7 +223,8 @@ xfile="$5" if [ $verbose -ne 0 ]; then - echo "$myname: processing logs for $osname-$arch-$compiler: $alllogs" + echo "$myname: processing logs for $compiler on $osname, $arch" + echo "$myname: searching for files matching \"$alllogs\"" fi cat<$xfile" else if [ $verbose -ne 0 ]; then - echo "$myname: $CROSS $verarg -s -o$outdir/$xfile -T\"$title\" $buildlogs" + echo "$myname: $XBUILDGEN $verarg -s -o$outdir/$xfile -T\"$title\" $buildlogs" fi output " $xfile" if [ $dryrun -eq 0 ]; then - $CROSS $verarg -s -o$outdir/$xfile -T"$title" $buildlogs + $XBUILDGEN $verarg -s -o$outdir/$xfile -T"$title" $buildlogs fi fi @@ -355,7 +378,7 @@ # 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 + irix-6.5-mips-mipspro-7.41.html # Red Hat Linux ######################################################## # Red Hat Enterprise Linux 5.0 @@ -587,7 +610,7 @@ readonly now=`date` processing_time=`$HOME/stdcxx/bin/duration "$start_time" "$now"` -cat<
Generated in $processing_time. Modified: stdcxx/trunk/bin/xbuildgen URL: http://svn.apache.org/viewvc/stdcxx/trunk/bin/xbuildgen?rev=656465&r1=656464&r2=656465&view=diff ============================================================================== --- stdcxx/trunk/bin/xbuildgen (original) +++ stdcxx/trunk/bin/xbuildgen Wed May 14 16:30:18 2008 @@ -878,13 +878,6 @@ ###################################################################### -# the location of the logs -if [ -z $version ]; then - logdir="http://people.apache.org/~sebor/stdcxx/results" -else - logdir="http://people.apache.org/~sebor/stdcxx-$version/results" -fi - # the name of a temporary file containing the build timings timings_file=$TMPDIR/.stdcxx-timings.$$ @@ -905,6 +898,7 @@ # space-separated list of names of text logs processed in loop below textlogs="" +logdir="" for l in $gzlogs; do logcount=$((logcount + 1)) @@ -917,6 +911,12 @@ # set temporary variables (valid only within the loop) txtlog=$TMPDIR/`basename $l .gz.txt`.txt.$$ + if [ "$logdir" = "" ]; then + logdir=`dirname $l` + elif [ $logdir != `dirname $l` ]; then + echo "$myname: not implemented: logs in multiple directories" >&2 + fi + # append the name of the log to the list textlogs="$textlogs $txtlog" @@ -936,74 +936,14 @@ ###################################################################### -# process a list of builds, one build per row -process_builds() -{ - component_type=$1 # example, locale, or test - component_list=$2 # list of component names - - cat <Results of ${component_type}s - - - - $table_header - -EOF - - for l in $textlogs; do - - fname=`basename $l .$$` - cat < - -EOF - - for c in $component_list; do - - line=`grep "^$c *[^-]" $l` - if [ $? -eq 0 -a "$line" != "" ]; then - echo $line \ - | awk -f $xcomp component=$component_type \ - name=$c verbose=$verbose expect="$expect" \ - | output - else - output " " - fi - done - - output " " - done - output "
log
- $fname - N/A
" -} - - -if [ $components_in_rows -ne 0 ]; then - - # check to see - if [ -r $xfailfile ]; then - xfails=$xfailfile - else - xfails="" - fi - - awk -f $xcomp bodyonly=1 $xfails $textlogs | output +# check to see +if [ -r $xfailfile ]; then + xfails=$xfailfile else - if [ "$examples_list" != "" ]; then - process_builds "example" "$examples_list" - fi - - if [ "$test_list" != "" ]; then - process_builds "test" "$test_list" - fi - - if [ "$locale_list" != "" ]; then - process_builds "locale" "$locale_list" - fi + xfails="" fi +awk -f $xcomp bodyonly=1 logdir=$logdir $xfails $textlogs | output ###################################################################### # output the rest of the HTML file Modified: stdcxx/trunk/bin/xcomp.awk URL: http://svn.apache.org/viewvc/stdcxx/trunk/bin/xcomp.awk?rev=656465&r1=656464&r2=656465&view=diff ============================================================================== --- stdcxx/trunk/bin/xcomp.awk (original) +++ stdcxx/trunk/bin/xcomp.awk Wed May 14 16:30:18 2008 @@ -23,7 +23,7 @@ ######################################################################## # # SYNOPSIS -# myname [bodyonly=0|1] logs... +# myname [bodyonly=0|1 logdir=] logs... # # VARIABLES: # bodyonly when non-zero, suppresses the tags @@ -1777,7 +1777,7 @@ # replace the trailing .txt suffix with .gz.txt sub("\\.txt$", ".gz.txt", fref) - return "../" fref + return logdir "/" fref }