Commit ae586e72 authored by Vincent Lefevre's avatar Vincent Lefevre
Browse files

Add git info with "git describe" for "make check" (to be improved).

tests/Makefile.am: in output_info, add git info, but this does not
output the branch. For instance, on master, one gets something like
"4.1-root-491-g2933fad3", and something similar on the 4.1 branch.
As the solution needs to work in detached HEAD state, we may want to
add *-branch tags to identify the first commit of a branch, and use
  git describe --match '*-branch'
instead of
  git describe --match '*-root'
parent 2933fad3
......@@ -17,7 +17,12 @@
AUTOMAKE_OPTIONS = 1.6 gnu
# TODO/FIXME: add Git information (see Mutt's version.sh as an example).
# TODO/FIXME: improve Git information. We should show the current branch,
# typically with "git branch --show-current", but in detached HEAD state,
# this command prints nothing. *-root tags can be useful, but we still
# need to differentiate the branch identified by such a tag and master.
# Alternatively *-branch tags could be added to identify the first commit
# of a branch (just after the corresponding *-root commit).
output_info = { \
if [ -d $(top_srcdir)/.svn ]; then \
output=`svnversion $(top_srcdir) 2> /dev/null`; \
......@@ -25,6 +30,9 @@ output_info = { \
echo "[svnversion] $$output"; \
fi; \
fi; \
if [ "x`git rev-parse --is-inside-work-tree 2> /dev/null`" = xtrue ]; then \
echo "[git] `git describe --match '*-root'`"; \
fi; \
grep -v '^\(PASS\|FAIL\) ' tversion.log 2> /dev/null || true; \
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment