#!/bin/sh interval=15 cs_out=cimserver.out cs_err=cimserver.err to_collect="$cs_out $cs_err listener.out" default_out=out installdir=$(dirname $0) ## cim_start() { cimserver "daemon=false" "forceProviderProcesses=false" \ >$cs_out \ 2>$cs_err \ & } cim_stop() { killall cimserver } ## The Git Monitor tgm_init() { echo Initializing TGM yum -y -q install git &>/dev/null pushd $out git init echo The Git Monitor > README git add README git commit -qm "Initial commit" popd } tgm_add() { pushd $out git add . git commit -qm "Regular commit" popd } ## test_prepare() { true mkdir -p $out cim_start $installdir/subscribe.py tgm_init } test_setup() { true } test_run() { $installdir/trigger.sh -N -o $out -u joe } test_collect() { cp $to_collect $out tgm_add } test_teardown() { true } test_cleanup() { true cim_stop } ## stamp() { date +%Y%m%d-%H%M%S } handler_stop() { go_on=false } trap handler_stop SIGINT out=$default_out test_prepare go_on=true while $go_on; do echo new round echo out=$out test_setup test_run test_collect test_teardown echo waiting ${interval}s for next round sleep $interval done test_cleanup