summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon McVittie <simon.mcvittie@collabora.co.uk>2016-08-02 12:33:53 +0100
committerSimon McVittie <simon.mcvittie@collabora.co.uk>2016-08-02 12:37:37 +0100
commit19b13570724a653e5be26d6b9c1f66fa0216d9c9 (patch)
tree6030e62df6682dbe0c1b56e23dc7fab4db5695e3
parente4b8d2522b88d4e601b183a8da6276b634401fc6 (diff)
downloadappstream-glib-19b13570724a653e5be26d6b9c1f66fa0216d9c9.tar.gz
Skip DEP-11 tests when DEP-11 is not enabled
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
-rw-r--r--libappstream-glib/as-self-test.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/libappstream-glib/as-self-test.c b/libappstream-glib/as-self-test.c
index 8bd9889..c8f2aca 100644
--- a/libappstream-glib/as-self-test.c
+++ b/libappstream-glib/as-self-test.c
@@ -4268,6 +4268,7 @@ as_test_store_metadata_index_func (void)
static void
as_test_yaml_func (void)
{
+#if AS_BUILD_DEP11
AsYaml *node;
GError *error = NULL;
GString *str;
@@ -4376,11 +4377,15 @@ as_test_yaml_func (void)
g_assert (ret);
g_string_free (str, TRUE);
as_yaml_unref (node);
+#else
+ g_test_skip ("Compiled without YAML (DEP-11) support");
+#endif
}
static void
as_test_store_yaml_func (void)
{
+#if AS_BUILD_DEP11
AsApp *app;
GError *error = NULL;
gboolean ret;
@@ -4440,11 +4445,15 @@ as_test_store_yaml_func (void)
g_assert_cmpstr (as_app_get_pkgname_default (app), ==, "iceweasel");
g_assert_cmpstr (as_app_get_name (app, "C"), ==, "Iceweasel");
g_assert_cmpstr (as_app_get_origin (app), ==, "aequorea");
+#else
+ g_test_skip ("Compiled without YAML (DEP-11) support");
+#endif
}
static void
as_test_store_speed_yaml_func (void)
{
+#if AS_BUILD_DEP11
GError *error = NULL;
gboolean ret;
guint i;
@@ -4472,7 +4481,9 @@ as_test_store_speed_yaml_func (void)
g_assert (as_store_get_app_by_id (store, "blobwars.desktop") != NULL);
}
g_print ("%.0f ms: ", g_timer_elapsed (timer, NULL) * 1000 / loops);
-
+#else
+ g_test_skip ("Compiled without YAML (DEP-11) support");
+#endif
}
static void