Commit 989114bc authored by Bastien Nocera's avatar Bastien Nocera
Browse files

build: Make "make check" fail when xdgmime is not compiled

And we're running in git. When xdgmime is not compiled, we would
silently skip this test. That meant that "make check" would succeed even
if there were errors.
parent bba6b1ab
...@@ -115,13 +115,20 @@ else ...@@ -115,13 +115,20 @@ else
if test -d .git/ && test -x $(top_builddir)/update-mime-database$(EXEEXT) && test -d $(top_srcdir)/mime-db-tests ; then \ if test -d .git/ && test -x $(top_builddir)/update-mime-database$(EXEEXT) && test -d $(top_srcdir)/mime-db-tests ; then \
$(top_builddir)/update-mime-database$(EXEEXT) mime-db-tests/ ; \ $(top_builddir)/update-mime-database$(EXEEXT) mime-db-tests/ ; \
fi fi
if test -d .git/ && test -x ../xdgmime/src/test-mime-data$(EXEEXT) && test -x $(top_builddir)/test-tree-magic$(EXEEXT) ; then \ @if test -d .git/ ; then \
mkdir -p $(top_builddir)/temp-mime-dir/mime/packages ; \ if test ! -x ../xdgmime/src/test-mime-data$(EXEEXT) || test ! -x $(top_builddir)/test-tree-magic$(EXEEXT) ; then \
cp -a $(top_builddir)/freedesktop.org.xml $(top_builddir)/temp-mime-dir/mime/packages/ ; \ echo "***************************************************************************" ; \
XDG_DATA_DIRS="$(top_builddir)/temp-mime-dir/" $(top_builddir)/update-mime-database$(EXEEXT) "$(top_builddir)/temp-mime-dir/mime/" ; \ echo "*** xdgmime not compiled, test suite cannot run. Check HACKING for info ***" ; \
XDG_DATA_DIRS="$(top_builddir)/temp-mime-dir/" XDG_DATA_HOME="$(top_builddir)/temp-mime-dir/" ../xdgmime/src/test-mime-data$(EXEEXT) -v tests/list || XDG_DATA_DIRS="$(top_builddir)/temp-mime-dir/" XDG_DATA_HOME="$(top_builddir)/temp-mime-dir/" ../xdgmime/src/test-mime$(EXEEXT) || (XDG_DATA_DIRS="$(top_builddir)/temp-mime-dir/" ../xdgmime/src/test-mime-data$(EXEEXT) -v -v tests/list ; exit 1); \ echo "***************************************************************************" ; \
XDG_DATA_DIRS="$(top_builddir)/temp-mime-dir/" $(top_builddir)/test-tree-magic$(EXEEXT) tests/tree-list || exit 1; \ exit 1 ; \
rm -rf "$(top_builddir)/temp-mime-dir/" ; \ else \
mkdir -p $(top_builddir)/temp-mime-dir/mime/packages ; \
cp -a $(top_builddir)/freedesktop.org.xml $(top_builddir)/temp-mime-dir/mime/packages/ ; \
XDG_DATA_DIRS="$(top_builddir)/temp-mime-dir/" $(top_builddir)/update-mime-database$(EXEEXT) "$(top_builddir)/temp-mime-dir/mime/" ; \
XDG_DATA_DIRS="$(top_builddir)/temp-mime-dir/" XDG_DATA_HOME="$(top_builddir)/temp-mime-dir/" ../xdgmime/src/test-mime-data$(EXEEXT) -v tests/list || XDG_DATA_DIRS="$(top_builddir)/temp-mime-dir/" XDG_DATA_HOME="$(top_builddir)/temp-mime-dir/" ../xdgmime/src/test-mime$(EXEEXT) || (XDG_DATA_DIRS="$(top_builddir)/temp-mime-dir/" ../xdgmime/src/test-mime-data$(EXEEXT) -v -v tests/list ; exit 1); \
XDG_DATA_DIRS="$(top_builddir)/temp-mime-dir/" $(top_builddir)/test-tree-magic$(EXEEXT) tests/tree-list || exit 1; \
rm -rf "$(top_builddir)/temp-mime-dir/" ; \
fi; \
fi fi
@if `grep comment $(srcdir)/freedesktop.org.xml.in | grep -v _comment | grep -q -v '<!'` ; then \ @if `grep comment $(srcdir)/freedesktop.org.xml.in | grep -v _comment | grep -q -v '<!'` ; then \
echo "***************************************************************************" ; \ echo "***************************************************************************" ; \
......
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