Download raw body.
got-build-regress.sh: run gotd regress suite too
gotd regress suite needs some set up so can't work out-of-the-box. However, assuming it was set up and doas is configured without password it can work. It's not great, but it's the only way to have the regress running automatically (and periodically). I'd like to have this so I can run gotd regress in my regress machine. diff /home/op/w/got commit - 452d8310907a64cc34ef0d0f1258a3ddc8bb5aea path + /home/op/w/got blob - 7edb5fbb0f79762a8be9b626fcc9eb2c407c4c7a file + util/got-build-regress.sh --- util/got-build-regress.sh +++ util/got-build-regress.sh @@ -15,19 +15,22 @@ # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. prog=`basename $0` -usage="$prog [-f] [-b branch] [-R testroot] [-r from-address] [-w worktree] email-address ..." +usage="$prog [-fG] [-b branch] [-R testroot] [-r from-address] [-w worktree] email-address ..." branch=main worktree=$HOME/got fromaddr_arg= force=0 +gotd=0 testroot="/tmp" -while getopts b:fR:r:w: arg; do +while getopts b:fGR:r:w: arg; do case $arg in b) branch="$OPTARG" ;; f) force=1 ;; + G) + gotd=1 ;; w) worktree="$OPTARG" ;; r) @@ -149,6 +152,21 @@ if [ "$regress_status" -ne 0 -o "$regress_failure_grep exit 0 fi +if [ $gotd -ne 0 ]; then + printf "\n\n\tRunning gotd tests\n\n" >> build.log + log_cmd regress.log doas env PATH=$HOME/bin:$PATH make server-regress + regress_status=$? + cat regress.log >> build.log + egrep "test.*failed" regress.log > failures.log + regress_failure_grep="$?" + if [ "$regress_status" -ne 0 -o "$regress_failure_grep" -eq 0 ]; then + printf "\n\n\t Test failures:\n\n" >> build.log + cat failures.log >> build.log + mail $fromaddr_arg -s "$prog regress failure" $recipients < build.log + exit 0 + fi +fi + printf "\n\n\tTesting a release build\n\n" >> build.log log_cmd build.log make clean log_cmd build.log make obj
got-build-regress.sh: run gotd regress suite too