changeset 410:3ed2c84d9e23

Couple of fixes and improvements
author Sebastien Decugis <sdecugis@nict.go.jp>
date Thu, 08 Jul 2010 16:45:41 +0900
parents 9a9a9e1ed4cb
children 46b562be4533
files contrib/nightly_tests/README contrib/nightly_tests/cronjob.sh contrib/nightly_tests/runtests.sh
diffstat 3 files changed, 14 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/contrib/nightly_tests/README	Thu Jul 08 15:16:11 2010 +0900
+++ b/contrib/nightly_tests/README	Thu Jul 08 16:45:41 2010 +0900
@@ -12,7 +12,7 @@
 INSTRUCTIONS to setup a new build slave for the freeDiameter buildserver:
 
 1) Install all dependencies for freeDiameter. See the "prereqs" file (for Debian/Ubuntu).
-	$ sudo aptitude install `wget http://www.freediameter.net/hg/freeDiameter/raw-file/tip/contrib/nightly_tests/prereqs -O - | grep -v -e "$#"`
+	$ sudo aptitude install `wget http://www.freediameter.net/hg/freeDiameter/raw-file/tip/contrib/nightly_tests/prereqs -O - | grep -v -e "^#"`
 
 2) Create the "test" database for app_acct test (we assume the tests are run as user "test" here)
 	# su - postgres
@@ -55,5 +55,7 @@
 6) Run the script once to check it works properly
 
 7) Set up a crontab to run the script
+	$ wget http://www.freediameter.net/hg/freeDiameter/raw-file/tip/contrib/nightly_tests/cronjob.sh
+	$ chmod +x cronjob.sh
 	$ crontab -l
-0 0 * * * /home/test/fDbuild/runtests.sh > /home/test/fDbuild/runtests.log 2>&1
+0 0 * * * /home/test/fDbuild/cronjob.sh > /home/test/fDbuild/cronjob.log 2>&1
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/contrib/nightly_tests/cronjob.sh	Thu Jul 08 16:45:41 2010 +0900
@@ -0,0 +1,9 @@
+#!/bin/bash 
+
+# This script will simply retrieve the latest "runtest" script and run it.
+pushd ~/fDbuild
+mv -f runtest.sh runtest.sh.prev
+wget "http://www.freediameter.net/hg/freeDiameter/raw-file/tip/contrib/nightly_tests/runtest.sh"
+chmod +x runtest.sh
+popd
+~/fDbuild/runtest.sh
--- a/contrib/nightly_tests/runtests.sh	Thu Jul 08 15:16:11 2010 +0900
+++ b/contrib/nightly_tests/runtests.sh	Thu Jul 08 16:45:41 2010 +0900
@@ -47,7 +47,7 @@
 # Now, for each test in the list
 for t in $(cat $WORKDIR/2_tests.list | grep -v -e "^#"); do
    # Create the work environment if needed
-   if [ ! -d $WORKDIR/$t]; then 
+   if [ ! -d $WORKDIR/$t ]; then 
        mkdir $WORKDIR/$t
    fi
    
"Welcome to our mercurial repository"