[json-glib] build: Fix test-report generation



commit 32d7c034dda3ccce05bec2bab0007ff0d65729ab
Author: Emmanuele Bassi <ebassi gnome org>
Date:   Fri Oct 26 09:15:11 2012 +0100

    build: Fix test-report generation
    
    We need to include the revision and date tags.

 build/autotools/Makefile.am.gtest |   20 ++++++++++++++------
 1 files changed, 14 insertions(+), 6 deletions(-)
---
diff --git a/build/autotools/Makefile.am.gtest b/build/autotools/Makefile.am.gtest
index f847599..88a123d 100644
--- a/build/autotools/Makefile.am.gtest
+++ b/build/autotools/Makefile.am.gtest
@@ -41,17 +41,25 @@ 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 \
+	    export REVISION="`git describe`" ;  \
+	  else \
+	    export REVISION="$(JSON_VERSION) $(JSON_RELEASE_STATUS)" ; \
+	  fi ; \
+	  export TIMESTAMP=`date +%Y-%m-%dT%H:%M:%S%z` ; \
 	  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>$(JSON_VERSION)</version>' >> $  xml ; \
+	    echo "  <revision>$$REVISION</revision>"    >> $  xml ; \
+	    echo "  <date>$$TIMESTAMP</date>"           >> $  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]