[gnome-software] trivial: Skip the flatpak self tests if the repo has not been built
- From: Richard Hughes <rhughes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software] trivial: Skip the flatpak self tests if the repo has not been built
- Date: Wed, 31 Aug 2016 10:20:21 +0000 (UTC)
commit 67250e47a16400f25b7d3aec19e7eda566e1b99f
Author: Richard Hughes <richard hughsie com>
Date: Wed Aug 31 11:15:31 2016 +0100
trivial: Skip the flatpak self tests if the repo has not been built
src/gs-self-test.c | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
---
diff --git a/src/gs-self-test.c b/src/gs-self-test.c
index 4b03881..26f9740 100644
--- a/src/gs-self-test.c
+++ b/src/gs-self-test.c
@@ -839,6 +839,7 @@ gs_plugin_loader_flatpak_func (GsPluginLoader *plugin_loader)
g_autofree gchar *desktop_fn = NULL;
g_autofree gchar *kf_remote_url = NULL;
g_autofree gchar *metadata_fn = NULL;
+ g_autofree gchar *repodir_fn = NULL;
g_autofree gchar *runtime_fn = NULL;
g_autofree gchar *testdir = NULL;
g_autofree gchar *testdir_repourl = NULL;
@@ -853,6 +854,13 @@ gs_plugin_loader_flatpak_func (GsPluginLoader *plugin_loader)
if (!gs_plugin_loader_get_enabled (plugin_loader, "flatpak-user"))
return;
+ /* no files to use */
+ repodir_fn = gs_test_get_filename ("tests/flatpak/repo");
+ if (!g_file_test (repodir_fn, G_FILE_TEST_EXISTS)) {
+ g_test_skip ("no flatpak test repo");
+ return;
+ }
+
/* check changed file exists */
root = g_getenv ("GS_SELF_TEST_FLATPACK_DATADIR");
changed_fn = g_build_filename (root, "flatpak", ".changed", NULL);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]