From: Ian Jackson Date: Thu, 18 Oct 2007 18:13:20 +0000 (+0100) Subject: * cfg and adt-testreport-runloop: do not cd in config files. X-Git-Tag: converted-from-bzr~14^2~6 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;ds=sidebyside;h=3a561dd1d09c791e2a8c9378d2c1bde8e34031a1;p=autopkgtest.git * cfg and adt-testreport-runloop: do not cd in config files. --- diff --git a/debian/changelog b/debian/changelog index c17479c..7fa8c88 100644 --- a/debian/changelog +++ b/debian/changelog @@ -12,6 +12,7 @@ autopkgtest (1.1.0~) unstable; urgency=low * hosts/* installed as examples with a big fat warning. * adt-testreport-cronjob: renamed from hosts/cadmium/cronjob * adt-testreport-runloop: copyright message. + * cfg and adt-testreport-runloop: do not cd in config files. * hosts/cadmium/*, debian/rules: onepackage_config renamed to cfg. -- Ian Jackson Thu, 18 Oct 2007 17:17:31 +0100 diff --git a/hosts/cadmium/cfg b/hosts/cadmium/cfg index 08f012c..4da106e 100644 --- a/hosts/cadmium/cfg +++ b/hosts/cadmium/cfg @@ -1,4 +1,3 @@ -cd /home/iwj/adt-play PATH=/home/iwj/autopkgtest/runner:/usr/local/sbin:/usr/sbin:$PATH export PATH diff --git a/hosts/cadmium/crontab b/hosts/cadmium/crontab index 7afdce3..cee9cf0 100644 --- a/hosts/cadmium/crontab +++ b/hosts/cadmium/crontab @@ -1,4 +1,4 @@ # m h dom mon dow command -4-59/5 * * * * autopkgtest/runner/adt-testreport-cronjob adt-play/cfg +4-59/5 * * * * autopkgtest/runner/adt-testreport-cronjob adt-play cfg 22 0 * * Mon savelog -n7 adt-play/var/log adt-play/var/overall.log 58 7 * * * adt-play/cleanup diff --git a/runner/adt-testreport-cronjob b/runner/adt-testreport-cronjob index 9d35760..833753a 100755 --- a/runner/adt-testreport-cronjob +++ b/runner/adt-testreport-cronjob @@ -1,14 +1,15 @@ #!/bin/bash # -# This script expects to be given one argument, the name -# of the config file which will set the PATH if necessary -# and cd to the appropriate playground. This and all -# remaining arguments are passed to a-t-r. +# This script expects to be given at least two arguments: +# directory to cd to +# main config file for adt-testreport-runloop which sets PATH if need be +# remaining arguments are passed through to a-t-r unchanged set -e +cd "$1" +shift . "$1" - exec >>var/overall.log 2>&1 test -f go with-lock-ex -q cronjob-lock \ - adt-testreport-runloop "$@" max_test_count=100 + adt-testreport-runloop max_test_count=100 "$@" diff --git a/runner/adt-testreport-runloop.1 b/runner/adt-testreport-runloop.1 index 9536c7f..d3a64b0 100644 --- a/runner/adt-testreport-runloop.1 +++ b/runner/adt-testreport-runloop.1 @@ -30,8 +30,8 @@ manpage for such information about its configuration as is available. Configuration fragment authors should bear in mind that both programs use \fBset -e\fR. -It can be a good idea to \fBcd\fR, and set PATH, in the configuration -file. +It is quite permissible to set PATH and other needed environmnet +variables in the configuration file. The following variables may be set: .TP