gnucash maint: Multiple changes pushed

John Ralls jralls at code.gnucash.org
Sat Dec 23 20:31:25 EST 2017


Updated	 via  https://github.com/Gnucash/gnucash/commit/82f1384c (commit)
	 via  https://github.com/Gnucash/gnucash/commit/40654cf5 (commit)
	from  https://github.com/Gnucash/gnucash/commit/44c51f43 (commit)



commit 82f1384c5827114d44ba51eafabd8ae00590b3aa
Author: John Ralls <jralls at ceridwen.us>
Date:   Sat Dec 23 17:31:18 2017 -0800

    Fix autotools test setup for test-date-utilities.

diff --git a/src/app-utils/test/Makefile.am b/src/app-utils/test/Makefile.am
index b78f046..085089d 100644
--- a/src/app-utils/test/Makefile.am
+++ b/src/app-utils/test/Makefile.am
@@ -4,8 +4,12 @@ TESTS = \
   test-exp-parser \
   test-scm-query-string \
   test-print-parse-amount \
-  test-date-utilities \
-  test-sx
+  test-sx \
+  $(SCM_TESTS)
+
+SCM_TESTS =   test-date-utilities
+
+SCM_TEST_SRCS = $(SCM_TESTS:%=%.scm)
 
 test_exp_parser_SOURCES = \
   test-exp-parser.c
@@ -18,6 +22,7 @@ GNC_TEST_DEPS = --gnc-module-dir ${top_builddir}/src/engine \
   --guile-load-dir ${top_builddir}/src/core-utils \
   --guile-load-dir ${top_builddir}/src/gnc-module \
   --guile-load-dir ${top_builddir}/src/engine \
+  --guile-load-dir ${top_builddir}/src/engine/test \
   --guile-load-dir ${top_builddir}/src/scm \
   --guile-load-dir ${top_builddir}/src/app-utils \
   --library-dir    ${top_builddir}/src/libqof/qof \
@@ -28,6 +33,12 @@ GNC_TEST_DEPS = --gnc-module-dir ${top_builddir}/src/engine \
   --library-dir    ${top_builddir}/src/backend/sql \
   --library-dir    ${top_builddir}/src/app-utils
 
+$(SCM_TESTS): %: $(srcdir)/%.scm Makefile .scm-links
+	echo 'export GNC_BUILDDIR="${abs_top_builddir}";' > $@
+	echo 'export GNC_UNINSTALLED=yes;' >> $@
+	echo '${GUILE} --debug -l $(srcdir)/$*.scm -c "(exit (run-test))"' >> $@
+	chmod a+x $@
+
 TESTS_ENVIRONMENT = \
   GUILE_WARN_DEPRECATED=no \
   GUILE="${GUILE}" \
@@ -68,3 +79,20 @@ AM_CPPFLAGS = \
   -I${top_srcdir}/src/libqof/qof \
   ${GUILE_CFLAGS} \
   ${GLIB_CFLAGS}
+
+.scm-links:
+	$(RM) -rf gnucash
+	mkdir -p  gnucash/app-utils/test
+	( cd gnucash/app-utils/test; for A in $(SCM_TEST_HELPERS) ; do $(LN_S) -f $(abs_srcdir)/$$A . ; done )
+if ! OS_WIN32
+# Windows knows no "ln -s" but uses "cp": must copy every time (see bug #566567).
+	touch .scm-links
+endif
+
+clean-local:
+	$(RM) -rf gnucash
+	$(RM) *.log
+
+noinst_DATA = .scm-links
+CLEANFILES = .scm-links
+DISTCLEANFILES = $(SCM_TESTS)

commit 40654cf50cbc03973d245059f98da0f938fe5ba5
Author: John Ralls <jralls at ceridwen.us>
Date:   Sat Dec 23 17:17:48 2017 -0800

    Fix picky gcc-7.2 complaint about a %d conversion not fitting in 3 bytes.

diff --git a/src/gnome-utils/gnc-dense-cal.c b/src/gnome-utils/gnc-dense-cal.c
index 596a0ae..564ddcd 100644
--- a/src/gnome-utils/gnc-dense-cal.c
+++ b/src/gnome-utils/gnc-dense-cal.c
@@ -1104,7 +1104,7 @@ gnc_dense_cal_draw_to_buffer(GncDenseCal *dcal)
         {
             doc_coords(dcal, doc, &x1, &y1, &x2, &y2);
             memset(dayNumBuf, 0, 3);
-            snprintf(dayNumBuf, 3, "%d", g_date_get_day(&d));
+            snprintf(dayNumBuf, 3, "%hhu", g_date_get_day(&d));
             pango_layout_set_text(layout, dayNumBuf, -1);
             pango_layout_get_pixel_size(layout, &numW, &numH);
             w = (x2 - x1) + 1;



Summary of changes:
 src/app-utils/test/Makefile.am  | 32 ++++++++++++++++++++++++++++++--
 src/gnome-utils/gnc-dense-cal.c |  2 +-
 2 files changed, 31 insertions(+), 3 deletions(-)



More information about the gnucash-changes mailing list