Gary Benson wrote:
On Thu, 13 Sep 2001, john sachs wrote:
On Thu, Sep 13, 2001 at 09:16:38AM -0700, Ian Holsman wrote: + error: cgi log not created! + not ok 2 + # Failed test 2 in modules/cgi.t at line 85
+ error: cgi log does not exist! + not ok 4 + # Failed test 4 in modules/cgi.t at line 97
+ dubious + Test returned status 2 (wstat 512, 0x200) + DIED. FAILED tests 2, 4, 10-36 + Failed 29/36 tests, 19.44% okay
ok, all these errors deal with the cgi log. at first i thought the script was using relative paths to find the log, but thats not the case. so the only thing i can think of is permissions? the test is dying because its trying to do a stat on a non-existant file. i will fix this, but it still doesnt tell us why the log file is not getting created. any ideas anyone?
What user is the cronjob running as? It may be that the cronjob is running as a different user...
the cronjob first pulls the CVS Head from httpd-2, apr, apr-util, proxy & test.
it then builds & installs HTTP.
it then builds/runs the test program.
I've attached the script here.
..Ian
Gary
[ Gary Benson, Red Hat Europe ][ [EMAIL PROTECTED] ][ GnuPG 85A8F78B ]
#!/bin/sh # # nightly2 - build httpd-2.0 complete and log everything # # uses pwd for everything # mails errorlog iff errors occur # can be extended to read script fragments to add modules for # rollup builds #
# canonical date for naming things date=`date +%C%y%m%d%H%M%S` # OS for logging opsys=`uname -sr` # where were we now? everything builds here origdir=/usr/local/src/nightly # CVS checkout dir indir=$origdir/src # build dir outdir=httpd-2.0-nightly # test dir testdir=httpd-2.0-test # install dir installdir=/usr/local/src/nightly/httpd-2.0-install # logs go here destdir=/usr/local/src/nightly/logs # error log errfile=$origdir/$date.errlog # output log outfile=$origdir/$date.outlog # testerr log testerrfile=$origdir/$date.test_errlog # testout log testoutfile=$origdir/$date.test_outlog # last symlink last_testoutfile=$origdir/last.test_outlog # serverout log serveroutfile=$origdir/$date.server_outlog # base packages basepkgs="httpd-2.0" # additional packages to check out and merge addpkgs="apr apr_util httpd_proxy httpd_test" addpkgs_name="apr apr-util httpd-proxy httpd-test" # packages to check out pkgs="$basepkgs $addpkgs_name" # where to get them psvr=":pserver:[EMAIL PROTECTED]:/home/cvspublic" # server config cfgopts="--enable-so --enable-shared --enable-maintainer-mode --enable-auth-anon --enable-auth-dbm --enable-auth-db --enable-auth-digest --enable-file-cache --enable-echo --enable-cache --enable-mime-magic --enable-cern-meta --enable-expires --enable-headers --enable-usertrack --enable-unique-id --enable-proxy --enable-proxy-connect --enable-proxy-ftp --enable-proxy-http --enable-dav --enable-info --enable-suexec --enable-cgi --enable-cgid --enable-dav-fs --enable-vhost-alias --enable-rewrite --enable-case-filter --enable-case-filter-in -prefix=$installdir " #--with-tls=/usr --with-ssl=/usr --enable-ssl --enable-tls " # what we don't turn on nocfgopts="--enable-charset-lite --enable-disk-cache --with-tls=/usr --with-ssl=/usr --enable-ssl --enable-tls " # who to bother (CHANGE FOR TESTING) #mailto="[EMAIL PROTECTED]" mailto="[EMAIL PROTECTED]" #mail to send test messages to testmailto="[EMAIL PROTECTED]" # link to logs thelink="http://cvs.apache.org/builds/httpd-proxy/logs/" # number of lines of fixed output fixlines=10 # number of additional (merged) modules addlines=`echo $addpkgs | wc -w` # number of lines in errorless output msglines=`expr $fixlines + $addlines` # vars for building releases later tarname=$outdir"_"$date compressext=".tar.Z" gzipext=".tar.gz" zipext=".zip" emitmsg () { # local msg; local errfile; local outfile # echo $msg; echo $msg >> $errfile; echo $msg >> $outfile return $? } build2main () { # local indir; local outdir cp -R $indir/httpd-2.0 . mv httpd-2.0 $outdir return $? } build_apr () { # local indir; local outdir; local repdir cp -R $indir/$repdir $outdir/srclib/ return $? } build_apr_util () { cp -R $indir/apr-util $outdir/srclib/ return $? } build_httpd_proxy () { mkdir $outdir/modules/proxy cp -R $indir/httpd-proxy/module-2.0/* $outdir/modules/proxy cp -R $indir/httpd-proxy/module-2.0/.[a-z]* $outdir/modules/proxy cp $indir/httpd-proxy/docs/mod_proxy.html $outdir/docs/manual/mod return $? } build_httpd_test() { mkdir $testdir cp -R $indir/httpd-test/perl-framework/* $testdir return $? } datenow=`date` msg="Build started $datenow on $opsys"; emitmsg msg="Checking out $pkgs"; emitmsg mkdir $indir cd $indir cvs -q -d $psvr co $pkgs 2>> $errfile >> $outfile cd $origdir msg="Building $outdir"; emitmsg build2main 2>> $errfile >> $outfile # this loop should eventually execute a script fragment in each additional # module's repository merging it into the big build automagically for repdir in $addpkgs; do msg="Merging package $repdir"; emitmsg build_$repdir 2>> $errfile >> $outfile done cd $outdir msg="Building config in $outdir"; emitmsg ./buildconf 2>> $errfile >> $outfile msg="Configuring in $outdir w/options $cfgopts"; emitmsg msg="Not configured: $nocfgopts"; emitmsg ./configure $cfgopts 2>> $errfile >> $outfile msg="Making in $outdir"; emitmsg make -k 2>> $errfile >> $outfile datenow=`date` msg="Build finished $datenow"; emitmsg make >/dev/null 2>/dev/null if [ "$?" != "0" ]; then msg="Build failed $datenow";emitmsg else msg="Install in $installdir"; emitmsg make install 2>> $errfile >> $outfile cd $origdir msg="Building testing framework"; emitmsg cd $testdir perl Makefile.PL apxs $installdir/bin/apxs 2>>$errfile >>$outfile make 2>>$errfile >>$outfile msg="running the test framework"; emitmsg # remove the spam compiling messages from outfile. export APACHE_TEST_NO_COLOR=1 export PATH=$installdir/bin:$PATH set >> $testoutfile t/TEST >/dev/null 2>&1 t/TEST -v 2>>$testerrfile >>$testoutfile cp t/logs/error_log $serveroutfile fi cd $origdir echo >> $errfile echo $thelink >> $errfile # any number of lines other than an empty run is an error errlines=`wc -l $errfile | tr -s " " | cut -d " " -f 2` # XXX if [ "${errlines}" != "${msglines}" ]; then mail -s"httpd-2.0 nightly build log" $mailto < $errfile fi if [ -f $testdir/t/core ]; then echo "Subject: CORE DUMP - httpd-2.0 automated test log" > /tmp/out.$$ /usr/local/bin/gdb --core=$testdir/t/core -now $installdir/bin/httpd < gdb.cmd 2>&1 >>/tmp/out.$$ else fail=$(grep -i fail $testoutfile |wc -l) if [ "${fail}" != "0" ]; then echo "Subject: FAILURE httpd-2.0 automated test log" > /tmp/out.$$ else dubious =$(grep -i dubious $testoutfile |wc -l ) if [ "${dubious}" != "0" ]; then echo "Subject: DUBIOUS httpd-2.0 automated test log" > /tmp/out.$$ else echo "Subject: OK httpd-2.0 automated test log" > /tmp/out.$$ fi fi fi echo "Server built with" >> /tmp/out.$$ echo $cfgopts >>/tmp/out.$$ echo "---" >>/tmp/out.$$ grep -v ^make $testoutfile >> /tmp/out.$$ echo "-- error log --" >> /tmp/out.$$ cat $testerrfile >> /tmp/out.$$ hour=$(date +%H) lines=$(diff -b $testoutfile $last_testoutfile|wc -l ) if [ "${lines}" -ne "0" ]; then msg="lines ${lines} != 0";emitmsg /usr/sbin/sendmail -f [EMAIL PROTECTED] $testmailto < /tmp/out.$$ elif [ "${hour}" -eq "00" ]; then msg="hour eq 00";emitmsg /usr/sbin/sendmail -f [EMAIL PROTECTED] $testmailto < /tmp/out.$$ fi cp $testoutfile $last_testoutfile # COMMENT OUT FOR TESTING - leaves logs in $origdir mv $date* $destdir msg="cleaning up"; emitmsg rm -rf $outdir rm -rf $indir rm -rf $testdir rm -rf $installdir rm -f /tmp/acin* # leftover autoconf crud find $destdir -mtime +2 -exec rm -f {} \; msg="done";emitmsg exit 0