commit 370dd2e6a3e6f92f4dad349235c7b9d3f4f1a583 from: Omar Polo via: Thomas Adam date: Mon Dec 18 21:54:36 2023 UTC got-build-regress.sh: ron gotd regress suite too with -G Needs doas to elevate privileges. ok stsp@ commit - cd292c73dd8b6a746eb45b8f4026240442026e98 commit + 370dd2e6a3e6f92f4dad349235c7b9d3f4f1a583 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