You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spamassassin.apache.org by jm...@apache.org on 2008/04/16 22:20:15 UTC
svn commit: r648832 - in /spamassassin/trunk/build/automc: run_nightly
run_one_nightly
Author: jm
Date: Wed Apr 16 13:20:14 2008
New Revision: 648832
URL: http://svn.apache.org/viewvc?rev=648832&view=rev
Log:
split out the per-user bit of run_nightly
Added:
spamassassin/trunk/build/automc/run_one_nightly (with props)
Modified:
spamassassin/trunk/build/automc/run_nightly
Modified: spamassassin/trunk/build/automc/run_nightly
URL: http://svn.apache.org/viewvc/spamassassin/trunk/build/automc/run_nightly?rev=648832&r1=648831&r2=648832&view=diff
==============================================================================
--- spamassassin/trunk/build/automc/run_nightly (original)
+++ spamassassin/trunk/build/automc/run_nightly Wed Apr 16 13:20:14 2008
@@ -13,10 +13,6 @@
traps
"
-# and where the $HOMEs are:
-nightly_trees="/export/home/bbmass/mc-nightly"
-
-
# Ensure we're running after 0900 UTC; complex due to daylight savings. If
# we're running in the 08xx UTC hour-space, sleep for 1 hour; when we wake, we
# will be in 09xx. By doing it this way, we'll work both for (a) mass-checks
@@ -30,52 +26,13 @@
fi
)
-. /etc/profile
-
# create the targets files:
/export/home/automc/svn/spamassassin/build/automc/populate_cor_nightly
echo "run_nightly starting at" ; date
-realhome=/export/home/bbmass
# and run each mass-check using "corpus-nightly"
for user in $nightly_users ; do
- dir="$nightly_trees/$user"
-
- echo "Starting corpus-nightly for $user ($dir)"
-
- (
- HOME=$dir
-
- # ensure we use the user-wide SVN permissions and server identities,
- # otherwise we won't be able to perform noninteractive SVN ops
- rm -rf $dir/.subversion
- ln -s $realhome/.subversion $dir/.subversion
-
- # oh Solaris, you really suck
- PERL=/local/perl586/bin/perl
- TMPDIR=/tmpfs
-
- export HOME PERL TMPDIR
-
- # create the .corpus file, keeping the rsync password secret;
- # the string __RSYNC_PASSWORD__ will be replaced with the
- # contents of /export/home/bbmass/mc-nightly/USERNAME/rsync_password
- perl -pe '
- s{__RSYNC_PASSWORD__}{ incfile("rsync_password") }eg;
- s{__CLIENTHOSTS__}{ incfile("svn/build/nightlymc/clienthosts") }eg;
-
- sub incfile {
- my $file = shift;
- my $new=`cat '"$dir"'/$file`; chop $new; $new =~ s/\s+/ /gs;
- return "\"".$new."\"";
- }
- ' $dir/svn/build/nightlymc/corpus.$user > $dir/.corpus
-
- # use bash to work around Solaris breakage
- nice bash $dir/svn/masses/rule-qa/corpus-nightly
-
- ) 2>&1 | tee "$dir/corpus-nightly.log"
-
+ /export/home/automc/svn/spamassassin/build/automc/run_one_nightly $user
done
Added: spamassassin/trunk/build/automc/run_one_nightly
URL: http://svn.apache.org/viewvc/spamassassin/trunk/build/automc/run_one_nightly?rev=648832&view=auto
==============================================================================
--- spamassassin/trunk/build/automc/run_one_nightly (added)
+++ spamassassin/trunk/build/automc/run_one_nightly Wed Apr 16 13:20:14 2008
@@ -0,0 +1,43 @@
+#!/bin/sh
+
+user="$1"
+[ "$user" != "" ] || echo "usage: run_one_nightly username"
+[ "$user" != "" ] || exit 99
+
+# where the $HOMEs are:
+dir="/export/home/bbmass/mc-nightly/$user"
+
+echo "Starting corpus-nightly for $user ($dir): $dir/corpus-nightly.log"
+exec 2>&1 | tee "$dir/corpus-nightly.log"
+
+. /etc/profile
+
+# ensure we use the user-wide SVN permissions and server identities,
+# otherwise we won't be able to perform noninteractive SVN ops
+rm -rf $dir/.subversion
+ln -s /export/home/bbmass/.subversion $dir/.subversion
+
+# oh Solaris, you really suck
+HOME=$dir
+PERL=/local/perl586/bin/perl
+TMPDIR=/tmpfs
+
+export HOME PERL TMPDIR
+
+# create the .corpus file, keeping the rsync password secret;
+# the string __RSYNC_PASSWORD__ will be replaced with the
+# contents of /export/home/bbmass/mc-nightly/USERNAME/rsync_password
+perl -pe '
+ s{__RSYNC_PASSWORD__}{ incfile("rsync_password") }eg;
+ s{__CLIENTHOSTS__}{ incfile("svn/build/nightlymc/clienthosts") }eg;
+
+ sub incfile {
+ my $file = shift;
+ my $new=`cat '"$dir"'/$file`; chop $new; $new =~ s/\s+/ /gs;
+ return "\"".$new."\"";
+ }
+' $dir/svn/build/nightlymc/corpus.$user > $dir/.corpus
+
+# use bash to work around Solaris breakage
+exec nice bash $dir/svn/masses/rule-qa/corpus-nightly
+
Propchange: spamassassin/trunk/build/automc/run_one_nightly
------------------------------------------------------------------------------
svn:executable = *