This is the mail archive of the systemtap@sourceware.org mailing list for the systemtap project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

nightly checkout and testing script


To make sure systemtap tests are run on a regular basis I have set up cron jobs on my local machines (FC4/Rawhide and a couple RHEL4-U3 beta machines) to check out the current systemtap sources and tests, configure them, build them, and run the tests nightly at 4:30am Eastern Time. The attached simple-minded script is what is run. The script expects that there is a copy of the elfutils sources around in the appropriate place. The script sets up a clean directory to do this work in, systemtap_${date_time}

The script doesn't send report back the results yet. That is the next step.

Any comments on the script would be appreciated.

-Will
#! /bin/bash
#
# A simple script to automate checkup and running of the tests
#
#
# Will Cohen
# 20060116

#variable definitions

export DATE_TIME=`date +%Y%m%d%H%M`
export SYSTEMTAP=~/systemtap_${DATE_TIME}
export ELFUTILS=~/rh-rpms/BUILD/elfutils-0.118
export STAP_OBJ=${SYSTEMTAP}/obj
export STAP_SRC=${SYSTEMTAP}/src
export LD_LIBRARY_PATH=${STAP_OBJ}/lib-elfutils:${STAP_OBJ}/lib-elfutils/systemtap:$LD_LIBRARY_PATH
export PATH=${STAP_OBJ}:$PATH
export SYSTEMTAP_TAPSET=${STAP_SRC}/tapset
export SYSTEMTAP_RUNTIME=${STAP_SRC}/runtime
export STAP_TESTS=${SYSTEMTAP}/tests
export CVSROOT=:pserver:anoncvs@sources.redhat.com:/cvs/systemtap

check_error()
{
  if test $1 != 0; then
    echo $2
    exit $1
  fi
}


#check out src and test directory
mkdir -p ${STAP_OBJ}
cd ${SYSTEMTAP}
#echo "anonymous\n" > cvs login
cvs co src
check_error $? "problem checking out src"
cvs co tests
check_error $? "problem checking out tests"

#configure and build
cd ${STAP_OBJ}
${STAP_SRC}/configure --with-elfutils=${ELFUTILS}
check_error $? "problem configure"
make gcov >& ${DATE_TIME}.problems
check_error $? "problem building stap"

# do the runtime tests with test coverage
cd ${STAP_TESTS}/testsuite
mkdir -p ./coverage
#lcov --directory $STAP_OBJ --zerocounters
runtest --tool=systemtap
#lcov --directory $STAP_OBJ --capture --output-file ./coverage/stap.info
#genhtml -o ./coverage ./coverage/stap.info

# FIXME Extract the bits of information and report the results
# Pull out the FAILS and summary from the testsuite
# list architecture
# send the email

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]