summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Hughes <richard@hughsie.com>2014-03-21 10:33:48 +0000
committerRichard Hughes <richard@hughsie.com>2014-03-21 10:33:50 +0000
commit51c10950fa314887c1e9fccd2e631957dc0e1369 (patch)
tree78170e7b32104e504777d43d29b79361263a2b1d
parentd4e0d53747090677db4b8267391a174132cf25e2 (diff)
downloadappstream-glib-51c10950fa314887c1e9fccd2e631957dc0e1369.tar.gz
trivial: Include in version control some sample v4 metadata
This was created using fedora-appstream and is successfully processed by gnome-software 3.12.x which does not use libappstream-glib.
-rw-r--r--data/tests/Makefile.am1
-rw-r--r--data/tests/example-v04.xml.gzbin0 -> 1001382 bytes
-rw-r--r--libappstream-glib/as-self-test.c7
3 files changed, 4 insertions, 4 deletions
diff --git a/data/tests/Makefile.am b/data/tests/Makefile.am
index 929e22c..5fa20ac 100644
--- a/data/tests/Makefile.am
+++ b/data/tests/Makefile.am
@@ -1,4 +1,5 @@
test_files = \
+ example-v04.xml.gz \
origin.xml
EXTRA_DIST = $(test_files)
diff --git a/data/tests/example-v04.xml.gz b/data/tests/example-v04.xml.gz
new file mode 100644
index 0000000..6f3f217
--- /dev/null
+++ b/data/tests/example-v04.xml.gz
Binary files differ
diff --git a/libappstream-glib/as-self-test.c b/libappstream-glib/as-self-test.c
index aff098e..b809769 100644
--- a/libappstream-glib/as-self-test.c
+++ b/libappstream-glib/as-self-test.c
@@ -805,14 +805,12 @@ ch_test_store_speed_func (void)
GError *error = NULL;
GFile *file;
GTimer *timer;
- const gchar *filename = "./test.xml.gz";
gboolean ret;
+ gchar *filename;
guint i;
guint loops = 10;
- if (!g_file_test (filename, G_FILE_TEST_EXISTS))
- return;
-
+ filename = as_test_get_filename ("example-v04.xml.gz");
file = g_file_new_for_path (filename);
timer = g_timer_new ();
for (i = 0; i < loops; i++) {
@@ -827,6 +825,7 @@ ch_test_store_speed_func (void)
}
g_print ("%.0f ms: ", g_timer_elapsed (timer, NULL) * 1000 / loops);
+ g_free (filename);
g_object_unref (file);
g_timer_destroy (timer);
}