From 51f50a54b43dbd60f525ce6e6540ac90de98d5cd Mon Sep 17 00:00:00 2001 From: Anna Schumaker Date: Mon, 31 Jan 2022 15:02:30 -0500 Subject: [PATCH] xfstests: Check if the current commit is a git tag And create a link to the test results in a specific spot if it is so we can eventually browse results by tag. Signed-off-by: Anna Schumaker --- makelinux.zsh | 6 ++++++ report-xfstests.py | 2 +- xfstests.zsh | 12 +++++++++++- 3 files changed, 18 insertions(+), 2 deletions(-) diff --git a/makelinux.zsh b/makelinux.zsh index f0d4310..341dcf9 100755 --- a/makelinux.zsh +++ b/makelinux.zsh @@ -2,4 +2,10 @@ set -eo pipefail let jobs=$(nproc)-2 + +if [ -f .git/config ] && [ -f .git/HEAD ]; then + REV=$(git rev-parse --short HEAD)$(git diff --quiet || echo "-dirty") + scripts/config --set-str CONFIG_LOCALVERSION "-g$REV" +fi + make -j$jobs $* | python /home/anna/bin/colors/make.py diff --git a/report-xfstests.py b/report-xfstests.py index da41666..e4a28b5 100755 --- a/report-xfstests.py +++ b/report-xfstests.py @@ -12,7 +12,7 @@ from gi.repository import Gtk from gi.repository import GObject from gi.repository import Gio -XFSTESTS = pathlib.Path(xdg.BaseDirectory.xdg_data_home) / "xfstests" +XFSTESTS = pathlib.Path(xdg.BaseDirectory.xdg_data_home) / "xfstests" / "date" class Calendar(Gtk.Calendar): def __init__(self): diff --git a/xfstests.zsh b/xfstests.zsh index 92f4302..105d788 100755 --- a/xfstests.zsh +++ b/xfstests.zsh @@ -23,10 +23,16 @@ COLOR=$BIN/colors/xfstests.py RUN_XFSTESTS="sudo run-xfstests.zsh" OPTIONS="sec=sys" USER=$(whoami) +RESULT_BASE=$HOME/.local/share/xfstests/ +DATE=$(date +%Y-%m-%d-%H:%M:%S%z) TODAY=$(date +%Y/%m/%d) NOW=$(date +%H:%M:%S%z) REMOTE_RESULTS=xfstests-dev/results/ -RESULTS=$HOME/.local/share/xfstests/$TODAY/${SERVER[-1]}/$NOW +RESULTS=$RESULT_BASE/date/$TODAY/${SERVER[-1]}/$NOW +TAG=$(kernel-tag.zsh ${CLIENT[-1]}) +if [ ! -z $TAG ]; then + TAGRES=$RESULT_BASE/tags/$TAG/${SERVER[-1]} +fi # # Prepare to test @@ -76,4 +82,8 @@ done wait +if [ ! -z "$TAG" ]; then + mkdir -p $TAGRES + ln -s $RESULTS $TAGRES/$DATE +fi optirun report-xfstests.py $RESULTS