From: Omar Polo Subject: Re: gotadmin: add a flag to force the usage of ref-delta To: Omar Polo Cc: Stefan Sperling , gameoftrees@openbsd.org Date: Fri, 17 Feb 2023 17:18:33 +0100 and here's the regress bits too diff /home/op/w/gotd commit - bcfa81c7d30bcafdd71a03b1ca679ad735fd0a80 path + /home/op/w/gotd blob - 4febc6122401f6f47ac76d69b9db67f578229f64 file + regress/cmdline/common.sh --- regress/cmdline/common.sh +++ regress/cmdline/common.sh @@ -50,7 +50,12 @@ maybe_pack_repo() { local repo="$1" if [ -n "$GOT_TEST_PACK" ]; then - (cd $repo && gotadmin pack -a > /dev/null) + arg="" + if [ "$GOT_TEST_PACK" = "ref-delta" ]; then + arg="-D" + fi + + (cd $repo && gotadmin pack -a $arg > /dev/null) (cd $repo && gotadmin cleanup -a -q) fi } blob - 40a3eba474b4a8fe35b9669596fb6994cc3739ae file + util/got-build-regress.sh --- util/got-build-regress.sh +++ util/got-build-regress.sh @@ -130,6 +130,19 @@ printf "\n\n\tTesting a release build\n\n" >> build.lo exit 0 fi +printf "\n\n\tRunning tests with pack files using ref-delta\n\n" >> build.log +log_cmd regress.log env PATH=$HOME/bin:$PATH make regress GOT_TEST_ROOT="$testroot" GOT_TEST_PACK=ref-delta +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 + printf "\n\n\tTesting a release build\n\n" >> build.log log_cmd build.log make clean log_cmd build.log make obj