tests revision 34274c3cd60edd969a34004012aed0b2cc2ab441
a47331123450129c1ad7d5326eecb7484b3e7348Andreas GustafssonWe do hourly test builds of the bind9 tree. This is an attempt to
a47331123450129c1ad7d5326eecb7484b3e7348Andreas Gustafssondocument how they work.
a47331123450129c1ad7d5326eecb7484b3e7348Andreas Gustafsson* How things work
a47331123450129c1ad7d5326eecb7484b3e7348Andreas GustafssonThe scripts driving the build system are in ~wpk/b9t. They are not
a47331123450129c1ad7d5326eecb7484b3e7348Andreas Gustafssonunder CVS control. The builds are driven by cron jobs separately
a47331123450129c1ad7d5326eecb7484b3e7348Andreas Gustafssoninstalled on each build system, running as user wpk. Here is a
a47331123450129c1ad7d5326eecb7484b3e7348Andreas Gustafssonrelevant extract from wpk's crontab on bb.rc.vix.com (reformatted to
a47331123450129c1ad7d5326eecb7484b3e7348Andreas Gustafssonfit in 80 columns):
a47331123450129c1ad7d5326eecb7484b3e7348Andreas GustafssonThe sources are checked out, and the web reports are generated,
a47331123450129c1ad7d5326eecb7484b3e7348Andreas Gustafssonon bb, as driven by the following cron jobs:
a47331123450129c1ad7d5326eecb7484b3e7348Andreas Gustafsson # check out the current bind 9 version and make the source tarball
a47331123450129c1ad7d5326eecb7484b3e7348Andreas Gustafsson 45 2-21 * * * PLATFORM=BSD-3.1 && . $HOME/b9t/hosts/$PLATFORM/env && \
a47331123450129c1ad7d5326eecb7484b3e7348Andreas Gustafsson nice make PLATFORM=$PLATFORM -e -f $HOME/b9t/bin/b9t.mk tarsrc \
a47331123450129c1ad7d5326eecb7484b3e7348Andreas Gustafsson > $HOME/b9t/hosts/$PLATFORM/b9t-status 2>&1
a47331123450129c1ad7d5326eecb7484b3e7348Andreas Gustafsson # run the bind 9 build status report generator
a47331123450129c1ad7d5326eecb7484b3e7348Andreas Gustafsson 30 3-22 * * * perl $HOME/b9t/bin/b9status.pl \
a47331123450129c1ad7d5326eecb7484b3e7348Andreas Gustafsson > /proj/build-reports/bind9/bind9.html 2> /dev/null
a47331123450129c1ad7d5326eecb7484b3e7348Andreas GustafssonEach host has a separate crontab entry for building the server and
a47331123450129c1ad7d5326eecb7484b3e7348Andreas Gustafssonrunning tests. Here are examples from bb and sol:
a47331123450129c1ad7d5326eecb7484b3e7348Andreas Gustafsson # build the BSD-3.1 version of bind 9
a47331123450129c1ad7d5326eecb7484b3e7348Andreas Gustafsson 0 3-22 * * * $HOME/b9t/bin/b9t.cron BSD-3.1
a47331123450129c1ad7d5326eecb7484b3e7348Andreas Gustafsson # bind 9 build for Solaris 5.6
a47331123450129c1ad7d5326eecb7484b3e7348Andreas Gustafsson 0 3-22 * * * $HOME/b9t/bin/b9t.cron SunOS-5.6
a47331123450129c1ad7d5326eecb7484b3e7348Andreas GustafssonDo not confuse the shell script ~wpk/b9t/bin/b9t.cron with the crontab
a47331123450129c1ad7d5326eecb7484b3e7348Andreas Gustafssontemplate (?) ~wpk/b9t/b9t.cron. Although they have the same name,
785cb9cf4f6f42d4e1da4bf27aaf750a021be13dMichael Sawyerthey are not related. The shell script b9t.cron then calls make,
785cb9cf4f6f42d4e1da4bf27aaf750a021be13dMichael Sawyerusing the makefile b9t.mk in the same location. This makefile moves
785cb9cf4f6f42d4e1da4bf27aaf750a021be13dMichael Sawyerthe old status files out of the way and runs through the tests.
a47331123450129c1ad7d5326eecb7484b3e7348Andreas GustafssonThe actual builds take place in a directory whose location differs
a47331123450129c1ad7d5326eecb7484b3e7348Andreas Gustafssonamong systems. On most of them, it's on a local disk, under /build.
a47331123450129c1ad7d5326eecb7484b3e7348Andreas GustafssonOn some, it's on NFS; in this case the location is defined in
34274c3cd60edd969a34004012aed0b2cc2ab441Andreas GustafssonThe output from the make process is in
34274c3cd60edd969a34004012aed0b2cc2ab441Andreas Gustafsson~wpk/b9t/hosts/$PLATFORM/b9t-status, and the output from
34274c3cd60edd969a34004012aed0b2cc2ab441Andreas GustafssonThe output from the later stages of the process is under
34274c3cd60edd969a34004012aed0b2cc2ab441Andreas Gustafsson/proj/build-reports/bind9/hosts/$PLATFORM. To make the files
34274c3cd60edd969a34004012aed0b2cc2ab441Andreas Gustafssonharder to find (?), they have names starting with a period:
a47331123450129c1ad7d5326eecb7484b3e7348Andreas Gustafsson* Common problems
a47331123450129c1ad7d5326eecb7484b3e7348Andreas GustafssonSometime named processes fail to die when the tests are done,
a47331123450129c1ad7d5326eecb7484b3e7348Andreas Gustafssoninterfering with the next test. Just kill them.
a47331123450129c1ad7d5326eecb7484b3e7348Andreas GustafssonOn hp.rc.vix.com, the tests often fail because of NFS I/O errors.
a47331123450129c1ad7d5326eecb7484b3e7348Andreas GustafssonWhen this happens, the machine needs to be rebooted. It will not
a47331123450129c1ad7d5326eecb7484b3e7348Andreas Gustafssoncome up again without manually entering commands on the console.
a47331123450129c1ad7d5326eecb7484b3e7348Andreas GustafssonOn bb, the tests sometimes fail because .nfs* files stuck in the build
a47331123450129c1ad7d5326eecb7484b3e7348Andreas Gustafssontree keep it from being completely deleted when the next test runs.
a47331123450129c1ad7d5326eecb7484b3e7348Andreas GustafssonThe .nfs* files cannot be deleted, but they can be moved, so one way
a47331123450129c1ad7d5326eecb7484b3e7348Andreas Gustafssonof fixing this is to move them to ~wpk.