Hi - (ping)
commit 23c3100e992029994f33eb4a1465570b476c1df4 (HEAD -> master) Author: Frank Ch. Eigler <f...@redhat.com> Date: Mon Sep 23 18:03:31 2024 -0400 contrib/test_summary: Add bunsen uploading mode This makes it easy for someone to push gcc dejagnu/autoconf test results to a bunsen [1] system, as an alternative or supplement to sending a subset by email to <gcc-testresu...@gcc.gnu.org>. Bunsen allows minimum-infrastructure archiving, indexing, and analysis of test results. % contrib/test_summary -b echo 'master' > .bunsen.source.gitbranch && echo 'basepoints/gcc-15-3524-ga523c2ba5862' > .bunsen.source.gitdescribe && echo 'a523c2ba58621c3630a1cd890d6db82879f92c90' > .bunsen.source.gitname && echo 'git://gcc.gnu.org/git/gcc.git' > .bunsen.source.gitrepo && (find . -name '*.log' -o -name '*.sum' -o -name '.bunsen.*' | t-upload-git-sh 'ssh://sourceware.org/git/bunsendb.git/' 'fche/gcc/x86_64-pc-linux-gnu/x86_6pc-linux-gnu/20240923-1817') Commit access to the sourceware bunsen database [2] is available on request [3], so uploads automatically show up in the web interface [4], but one may also operate a private copy of the system to use it entirely locally. A unique tag name is generated from one's userid, the gcc host/target triplets, and a timestamp, but these defaults may be overridden with contrib/test_summary options. The git commit/tag/push machinery is wrapped into a tiny "t-upload-git-push" shell script, which may be downloaded from bunsen.git into your $PATH. [1] https://sourceware.org/bunsen/ [2] https://sourceware.org/git/bunsendb.git [3] <admin-reque...@sourceware.org> [4] https://builder.sourceware.org/testruns/ https://inbox.sourceware.org/bunsen/20240913201848.gc25...@redhat.com/ ChangeLog: * Makefile.tpl, Makefile.in: Add bunsen-report.log target. contrib/ChangeLog: * test_summary: Add -b (bunsen) mode to report all test results into a https://sourceware.org/bunsen/-like system instead of emailing extracts. Signed-Off-By: Frank Ch. Eigler <f...@redhat.com> diff --git a/Makefile.in b/Makefile.in index 966d60454960..8c352f7a2956 100644 --- a/Makefile.in +++ b/Makefile.in @@ -2852,6 +2852,11 @@ mail-report-with-warnings.log: warning.log chmod +x $@ echo If you really want to send e-mail, run ./$@ now +bunsen-report.log: + $(srcdir)/contrib/test_summary -b >$@ + chmod +x $@ + echo If you really want to send to bunsen, run ./$@ now + # Local Vim config $(srcdir)/.local.vimrc: diff --git a/Makefile.tpl b/Makefile.tpl index da38dca697ad..9816fcd6f5b2 100644 --- a/Makefile.tpl +++ b/Makefile.tpl @@ -1034,6 +1034,11 @@ mail-report-with-warnings.log: warning.log chmod +x $@ echo If you really want to send e-mail, run ./$@ now +bunsen-report.log: + $(srcdir)/contrib/test_summary -b >$@ + chmod +x $@ + echo If you really want to send to bunsen, run ./$@ now + # Local Vim config $(srcdir)/.local.vimrc: diff --git a/contrib/test_summary b/contrib/test_summary index 5760b053ec27..b4a9c92b753e 100755 --- a/contrib/test_summary +++ b/contrib/test_summary @@ -39,6 +39,10 @@ if test x"$1" = "x-h"; then should be selected from the log files. -f: force reports to be mailed; if omitted, only reports that differ from the sent.* version are sent. + -b: instead of emailing, push test logs into a bunsen git repo + -bg REPO: specify the bunsen git repo to override default + -bi TAG1: specify the bunsen tag prefix (user name) + -bt TAG2: specify the bunsen tag suffix (build name) _EOF exit 0 fi @@ -57,6 +61,10 @@ fi : ${filesuffix=}; export filesuffix : ${move=true}; export move : ${forcemail=false}; export forcemail +: ${bunsen=false}; +: ${bunsengit=ssh://sourceware.org/git/bunsendb.git/}; +: ${bunsentag1=`whoami`}; +: ${bunsentag2=gcc/`grep ^host= config.log | tr -d "'" | cut -f2 -d=`/`grep ^tget= config.log | tr -d "'" | cut -f2 -d=`/`date +%Y%m%d-%H%M`}; while true; do case "$1" in -o) filesuffix=.sent; move=false; : ${mailto=nobody}; shift;; @@ -64,10 +72,31 @@ while true; do -p) prepend_logs=${prepend_logs+"$prepend_logs "}"$2"; shift 2;; -i) append_logs=${append_logs+"$append_logs "}"$2"; shift 2;; -m) mailto=$2; forcemail=true; shift 2;; + -b) bunsen=true; shift;; + -bg) bunsengit=$2; shift 2;; + -bi) bunsentag1=$2; shift 2;; + -bt) bunsentag2=$2; shift 2;; -f) unset mailto; forcemail=true; shift;; *) break;; esac done +if [ "x$bunsen" = "xtrue" ]; then + gitsrcdir=`dirname "$0"` # this script, contrib/test_summary + gitsrcdir=`dirname "$gitsrcdir"` # and the parent directory + if [ -d "$gitsrcdir/.git" ]; then # is this a git-hosted source tree? + # gather basic build metadata for sourceware-buildbot-style .bunsen da + gitbranch=`cd "$gitsrcdir"; git rev-parse --abbrev-ref HEAD` + echo "echo '$gitbranch' > .bunsen.source.gitbranch &&" + gitdescribe=`cd "$gitsrcdir"; git describe` + echo "echo '$gitdescribe' > .bunsen.source.gitdescribe &&" + gitname=`cd "$gitsrcdir"; git rev-parse HEAD` + echo "echo '$gitname' > .bunsen.source.gitname &&" + gitremote=`cd "$gitsrcdir"; git config --get remote.origin.url` + echo "echo '$gitremote' > .bunsen.source.gitrepo &&" + fi + echo "(find . -name '*.log' -o -name '*.sum' -o -name '.bunsen.*' | t-uplo-git-push '$bunsengit' '$bunsentag1/$bunsentag2')" + exit 0 +fi : ${mailto="\" address \""}; export mailto files=`find . -name \*.sum$filesuffix -print | sort` anyfile=false anychange=$forcemail &&