[smolder-users] bash script to run automated tests
Brought to you by:
michael_peters
From: Michael P. <mp...@pl...> - 2007-02-14 16:18:51
|
Someone on IRC asked me to post the shell script that I use to run an automated test through to smolder. Here's the cleaned up version of the one I use to test Krang (http://krang.sourceforge.net) and you can see the results at http://smolder.plusthree.com/app/public_projects/smoke_reports/3 #!/bin/bash TEST_ROOT=/usr/local/arcos_test # upload the krang tests results to smolder function krang_results_to_smolder { cd $TEST_ROOT perl -I$KRANG_ROOT/lib -I$KRANG_ROOT/lib/i686-linux smolder_smoke_signal \ --server 'smolder.plusthree.com' \ --project 'Krang' \ --username 'changeme' \ --password 'changeme' \ --file "$KRANG_ROOT/test_run.xml" \ --architecture "`uname -m`" \ --platform "`cat /etc/redhat-release`" } # don't run the tests if we're already running cd $TEST_ROOT if ls tests_running 2>/dev/null then echo "Tests are currently running. Exiting." exit fi # don't let another run go while we're going touch tests_running # needed by Krang to know how/where it's running export KRANG_ROOT=$TEST_ROOT/krang export KRANG_INSTANCE=test1 # get the latest Krang from SVN cd $KRANG_ROOT if svn update | grep 'Updated to' then # stop any possible previous runs bin/krang_ctl stop # gives us a clean slate to start make build bin/krang_createdb --destroy --no_prompt test1 bin/krang_createdb --destroy --no_prompt test2 # run the tests bin/krang_ctl start bin/krang_test --xml > test_run.xml bin/krang_ctl stop # now send the results off to smolder krang_results_to_smolder else echo "No updates to Krang" fi -- Michael Peters Developer Plus Three, LP |