# HG changeset patch # User Sebastien Decugis # Date 1278575141 -32400 # Node ID 3ed2c84d9e23460e71e235dc94a8523b8fa75fa4 # Parent 9a9a9e1ed4cbc31c2450b87f24120d15d67477a5 Couple of fixes and improvements diff -r 9a9a9e1ed4cb -r 3ed2c84d9e23 contrib/nightly_tests/README --- 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 diff -r 9a9a9e1ed4cb -r 3ed2c84d9e23 contrib/nightly_tests/cronjob.sh --- /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 diff -r 9a9a9e1ed4cb -r 3ed2c84d9e23 contrib/nightly_tests/runtests.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