Commit dee2f58d authored by Bastien Nocera's avatar Bastien Nocera
Browse files

build: Add a local-test target to print mime info

About files present in the staging-tests sub-directory, so
that you can easily populate the test suite.
parent b4e68eef
...@@ -57,6 +57,9 @@ indicates expected success. Trailing "o"s can be omitted. ...@@ -57,6 +57,9 @@ indicates expected success. Trailing "o"s can be omitted.
See the top of the tests/list file for syntax details. See the top of the tests/list file for syntax details.
You can also temporarily print the results of test-mime-data by putting your
test files in the staging-tests/ sub-directory.
[1]: Repository details at: [1]: Repository details at:
http://cgit.freedesktop.org/xdg/xdgmime/ http://cgit.freedesktop.org/xdg/xdgmime/
......
...@@ -84,6 +84,25 @@ all: $(defaultmakedeps) ...@@ -84,6 +84,25 @@ all: $(defaultmakedeps)
create-pot: create-pot:
$(AM_V_GEN) $(MAKE) -C po shared-mime-info.pot $(AM_V_GEN) $(MAKE) -C po shared-mime-info.pot
local-test: create-pot freedesktop.org.xml update-mime-database$(EXEEXT)
if CROSS_COMPILING
@echo "Cross compiling: Skipping checks"
else
@if ! test -d staging-tests/ ; then \
echo "***********************************************************************" ; \
echo "*** Add your file to process to staging-tests/ and run local-test again ***" ; \
echo "***********************************************************************" ; \
exit 1 ; \
fi
if test -d .git/ && test -x ../xdgmime/src/print-mime-data$(EXEEXT) ; then \
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/print-mime-data$(EXEEXT) staging-tests/; \
rm -rf "$(top_builddir)/temp-mime-dir/" ; \
fi
endif
check: create-pot freedesktop.org.xml update-mime-database$(EXEEXT) check-translations check: create-pot freedesktop.org.xml update-mime-database$(EXEEXT) check-translations
if CROSS_COMPILING if CROSS_COMPILING
@echo "Cross compiling: Skipping checks" @echo "Cross compiling: Skipping checks"
......
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