commit 125fc911a4943d3daac3707911900bbeb7413db8 from: Omar Polo date: Mon Dec 18 12:04:18 2023 UTC got-build-regress.sh: ron gotd regress suite too with -G Needs doas to elevate privileges. ok stsp@ commit - 0c6bdfca5ba9050d77d0984aee14f03aabd64bfc commit + 125fc911a4943d3daac3707911900bbeb7413db8 blob - 7edb5fbb0f79762a8be9b626fcc9eb2c407c4c7a blob + c447b65a6196740ce07a6f0acc44497aa30b38c3 --- 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