[glib] test: Add a <revision> node to the report XML
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib] test: Add a <revision> node to the report XML
- Date: Tue, 28 Dec 2010 17:07:47 +0000 (UTC)
commit 500061f67567477c70b7950a60b0d5620a74131a
Author: Emmanuele Bassi <ebassi linux intel com>
Date: Tue Oct 12 16:05:26 2010 +0100
test: Add a <revision> node to the report XML
Use `git describe` to fill out the <revision> node, if we're using a
git checkout; otherwise, for tests ran from a released tarball, use
the version.
https://bugzilla.gnome.org/show_bug.cgi?id=631980
Makefile.decl | 18 ++++++++++++------
1 files changed, 12 insertions(+), 6 deletions(-)
---
diff --git a/Makefile.decl b/Makefile.decl
index d07e6d2..163fd8b 100644
--- a/Makefile.decl
+++ b/Makefile.decl
@@ -46,17 +46,23 @@ test-report perf-report full-report: ${TEST_PROGS}
GTESTER_LOGDIR=`mktemp -d "\`pwd\`/.testlogs-XXXXXX"`; export GTESTER_LOGDIR ; \
ignore_logdir=false ; \
fi ; \
+ if test -d "$(top_srcdir)/.git" ; then \
+ REVISION=`git describe` ; \
+ else \
+ REVISION=$(VERSION) ; \
+ fi ; \
for subdir in $(SUBDIRS) . ; do \
test "$$subdir" = "." -o "$$subdir" = "po" || \
( cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $@ ) || exit $? ; \
done ; \
$$ignore_logdir || { \
- echo '<?xml version="1.0"?>' > $ xml ; \
- echo '<report-collection>' >> $ xml ; \
- echo '<info>' >> $ xml ; \
- echo ' <package>$(PACKAGE)</package>' >> $ xml ; \
- echo ' <version>$(VERSION)</version>' >> $ xml ; \
- echo '</info>' >> $ xml ; \
+ echo '<?xml version="1.0"?>' > $ xml ; \
+ echo '<report-collection>' >> $ xml ; \
+ echo '<info>' >> $ xml ; \
+ echo ' <package>$(PACKAGE)</package>' >> $ xml ; \
+ echo ' <version>$(VERSION)</version>' >> $ xml ; \
+ echo " <revision>$$REVISION</revision>" >> $ xml ; \
+ echo '</info>' >> $ xml ; \
for lf in `ls -L "$$GTESTER_LOGDIR"/.` ; do \
sed '1,1s/^<?xml\b[^>?]*?>//' <"$$GTESTER_LOGDIR"/"$$lf" >> $ xml ; \
done ; \
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]