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 <Anna.Schumaker@Netapp.com>
This commit is contained in:
Anna Schumaker 2022-01-31 15:02:30 -05:00
parent e2c8b731d7
commit 51f50a54b4
3 changed files with 18 additions and 2 deletions

View File

@ -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

View File

@ -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):

View File

@ -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