Forum .LRN Q&A: Response to .LRN can now be installed automatically with the help of tclwebtest

Concerning automated installation it would of course be nice to have the test script check out the most recent version from CVS automatically. In case you haven't written it already, here is a little test script that does that:
set DIR "/tmp/"
cd $DIR

# Checkout a fresh copy from CVS. Note extra colon behind anonymous
# for empty password
exec cvs -d:pserver:anonymous:@cvs.tclwebtest.sourceforge.net:/cvsroot/tclwebtest checkout tclwebtest >> $DIR/tclwebtest.cvs.out 2>> $DIR/tclwebtest.cvs.err

# run selftests using the newly downloaded version
catch {
    exec sh $DIR/tclwebtest/tclwebtest $DIR/tclwebtest/selftest/ >> $DIR/tclwebtest.run.out 2>> $DIR/tclwebtest.run.err
}

puts "----- output of checked out version: -------"
set f [open $DIR/tclwebtest.run.out]
puts [read $f]
close $f
set f [open $DIR/tclwebtest.run.err]
puts [read $f]
close $f
This checks out a copy of itself and starts an instance of the checked out version that runs the selftests. Oops, 1/17 failing, damn!

Instead of the second exec call one could for example set it up to call recurse $DIR/modulename/tests/ to run the suite of tests that was included in the checkout.