[gimp] desktop: fix the appstream unit tests.
- From: Jehan Pagès <jehanp src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] desktop: fix the appstream unit tests.
- Date: Thu, 1 Feb 2018 16:49:08 +0000 (UTC)
commit 5fc91e92e1b1e2ac1a2c61d3d8ef10bad4a15e3e
Author: Jehan <jehan girinstud io>
Date: Thu Feb 1 03:51:55 2018 +0100
desktop: fix the appstream unit tests.
The first validation command was actually failing but the test was not,
because only the last return value is taken into account, obviously. Add
a '&&' between the commands.
Also test against the built files, not the templates (in particular
because `appstream-util` doesn't like .in.in templates, and anyway it's
always better to test against the finale file).
Finally move to "validate-relax" test for the time being.
"validate-strict" actually makes a bunch of errors, but I can't make the
time to look at these now. Let's just settle with basic validation at
least.
desktop/Makefile.am | 2 +-
desktop/test-appdata.sh | 6 ++++--
2 files changed, 5 insertions(+), 3 deletions(-)
---
diff --git a/desktop/Makefile.am b/desktop/Makefile.am
index 149317f..d791170 100644
--- a/desktop/Makefile.am
+++ b/desktop/Makefile.am
@@ -70,6 +70,6 @@ validate: gimp.desktop
dist-hook: validate
if HAVE_APPSTREAM_UTIL
-TESTS_ENVIRONMENT = GIMP_TESTING_ABS_TOP_SRCDIR=@abs_top_srcdir@
+TESTS_ENVIRONMENT = GIMP_TESTING_ABS_TOP_BUILDDIR=@abs_top_builddir@
TESTS = test-appdata.sh
endif
diff --git a/desktop/test-appdata.sh b/desktop/test-appdata.sh
index 15e3a0a..d4bb50a 100755
--- a/desktop/test-appdata.sh
+++ b/desktop/test-appdata.sh
@@ -1,4 +1,6 @@
#!/bin/sh
-appstream-util validate-strict ${GIMP_TESTING_ABS_TOP_SRCDIR}/desktop/org.gimp.GIMP.appdata.xml.in.in
-appstream-util validate-strict ${GIMP_TESTING_ABS_TOP_SRCDIR}/desktop/gimp-data-extras.metainfo.xml.in
+# TODO: use validate-strict when the last errors for a strict validation
+# are fixed.
+appstream-util validate-relax ${GIMP_TESTING_ABS_TOP_BUILDDIR}/desktop/org.gimp.GIMP.appdata.xml && \
+appstream-util validate-relax ${GIMP_TESTING_ABS_TOP_BUILDDIR}/desktop/gimp-data-extras.metainfo.xml
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]