[gnome-software] trivial: Include the 'tests' suffix in TESTDATADIR



commit f81f735948f5ddc6acc69b13b3d89f8c3ae2224b
Author: Richard Hughes <richard hughsie com>
Date:   Tue Mar 7 16:47:11 2017 +0000

    trivial: Include the 'tests' suffix in TESTDATADIR

 plugins/dpkg/Makefile.am          |    2 +-
 plugins/dpkg/gs-self-test.c       |    2 +-
 plugins/dummy/Makefile.am         |    2 +-
 plugins/flatpak/Makefile.am       |    2 +-
 plugins/flatpak/gs-self-test.c    |   22 +++++++++++-----------
 plugins/fwupd/Makefile.am         |    2 +-
 plugins/fwupd/gs-self-test.c      |    2 +-
 plugins/modalias/Makefile.am      |    2 +-
 plugins/packagekit/Makefile.am    |    2 +-
 plugins/packagekit/gs-self-test.c |    2 +-
 plugins/repos/Makefile.am         |    2 +-
 plugins/repos/gs-self-test.c      |    2 +-
 12 files changed, 22 insertions(+), 22 deletions(-)
---
diff --git a/plugins/dpkg/Makefile.am b/plugins/dpkg/Makefile.am
index 515b632..1daa27d 100644
--- a/plugins/dpkg/Makefile.am
+++ b/plugins/dpkg/Makefile.am
@@ -1,5 +1,5 @@
 AM_CPPFLAGS =                                          \
-       -DTESTDATADIR=\""$(srcdir)"\"                   \
+       -DTESTDATADIR=\""$(srcdir)/tests"\"             \
        -DLOCALPLUGINDIR=\""$(builddir)/.libs"\"
 
 plugindir = $(GS_PLUGIN_DIR)
diff --git a/plugins/dpkg/gs-self-test.c b/plugins/dpkg/gs-self-test.c
index 35bbcfe..e979d7a 100644
--- a/plugins/dpkg/gs-self-test.c
+++ b/plugins/dpkg/gs-self-test.c
@@ -40,7 +40,7 @@ gs_plugin_loader_dpkg_func (GsPluginLoader *plugin_loader)
        }
 
        /* load local file */
-       fn = gs_test_get_filename (TESTDATADIR, "tests/chiron-1.1-1.deb");
+       fn = gs_test_get_filename (TESTDATADIR, "chiron-1.1-1.deb");
        g_assert (fn != NULL);
        file = g_file_new_for_path (fn);
        app = gs_plugin_loader_file_to_app (plugin_loader,
diff --git a/plugins/dummy/Makefile.am b/plugins/dummy/Makefile.am
index ead9bb3..67c9fcf 100644
--- a/plugins/dummy/Makefile.am
+++ b/plugins/dummy/Makefile.am
@@ -1,6 +1,6 @@
 AM_CPPFLAGS =                                          \
        -DDATADIR=\"$(datadir)\"                        \
-       -DTESTDATADIR=\""$(srcdir)"\"                   \
+       -DTESTDATADIR=\""$(srcdir)/tests"\"             \
        -DLOCALPLUGINDIR=\""$(builddir)/.libs"\"        \
        -DLOCALPLUGINDIR_CORE=\""$(top_builddir)/plugins/core/.libs"\"
 
diff --git a/plugins/flatpak/Makefile.am b/plugins/flatpak/Makefile.am
index ea98654..50beaa0 100644
--- a/plugins/flatpak/Makefile.am
+++ b/plugins/flatpak/Makefile.am
@@ -1,6 +1,6 @@
 AM_CPPFLAGS =                                          \
        -DSYSCONFDIR=\""$(sysconfdir)"\"                \
-       -DTESTDATADIR=\""$(srcdir)"\"                   \
+       -DTESTDATADIR=\""$(srcdir)/tests"\"             \
        -DLOCALPLUGINDIR=\""$(builddir)/.libs"\"        \
        -DLOCALPLUGINDIR_CORE=\""$(top_builddir)/plugins/core/.libs"\"
 
diff --git a/plugins/flatpak/gs-self-test.c b/plugins/flatpak/gs-self-test.c
index 9587701..0506934 100644
--- a/plugins/flatpak/gs-self-test.c
+++ b/plugins/flatpak/gs-self-test.c
@@ -48,7 +48,7 @@ gs_plugin_loader_flatpak_repo_func (GsPluginLoader *plugin_loader)
                return;
 
        /* get a resolvable  */
-       testdir = gs_test_get_filename (TESTDATADIR, "tests/app-with-runtime");
+       testdir = gs_test_get_filename (TESTDATADIR, "app-with-runtime");
        if (testdir == NULL)
                return;
        testdir_repourl = g_strdup_printf ("file://%s/repo", testdir);
@@ -177,7 +177,7 @@ gs_plugin_loader_flatpak_app_with_runtime_func (GsPluginLoader *plugin_loader)
                return;
 
        /* no files to use */
-       repodir_fn = gs_test_get_filename (TESTDATADIR, "tests/app-with-runtime/repo");
+       repodir_fn = gs_test_get_filename (TESTDATADIR, "app-with-runtime/repo");
        if (repodir_fn == NULL ||
            !g_file_test (repodir_fn, G_FILE_TEST_EXISTS)) {
                g_test_skip ("no flatpak test repo");
@@ -200,7 +200,7 @@ gs_plugin_loader_flatpak_app_with_runtime_func (GsPluginLoader *plugin_loader)
 
        /* add a remote */
        app_source = gs_app_new ("test");
-       testdir = gs_test_get_filename (TESTDATADIR, "tests/app-with-runtime");
+       testdir = gs_test_get_filename (TESTDATADIR, "app-with-runtime");
        if (testdir == NULL)
                return;
        testdir_repourl = g_strdup_printf ("file://%s/repo", testdir);
@@ -429,7 +429,7 @@ gs_plugin_loader_flatpak_app_missing_runtime_func (GsPluginLoader *plugin_loader
                return;
 
        /* no files to use */
-       repodir_fn = gs_test_get_filename (TESTDATADIR, "tests/app-missing-runtime/repo");
+       repodir_fn = gs_test_get_filename (TESTDATADIR, "app-missing-runtime/repo");
        if (repodir_fn == NULL ||
            !g_file_test (repodir_fn, G_FILE_TEST_EXISTS)) {
                g_test_skip ("no flatpak test repo");
@@ -438,7 +438,7 @@ gs_plugin_loader_flatpak_app_missing_runtime_func (GsPluginLoader *plugin_loader
 
        /* add a remote */
        app_source = gs_app_new ("test");
-       testdir = gs_test_get_filename (TESTDATADIR, "tests/app-missing-runtime");
+       testdir = gs_test_get_filename (TESTDATADIR, "app-missing-runtime");
        if (testdir == NULL)
                return;
        testdir_repourl = g_strdup_printf ("file://%s/repo", testdir);
@@ -576,7 +576,7 @@ gs_plugin_loader_flatpak_runtime_repo_func (GsPluginLoader *plugin_loader)
        gs_plugin_loader_setup_again (plugin_loader);
 
        /* write a flatpakrepo file */
-       testdir = gs_test_get_filename (TESTDATADIR, "tests/only-runtime");
+       testdir = gs_test_get_filename (TESTDATADIR, "only-runtime");
        if (testdir == NULL)
                return;
        testdir_repourl = g_strdup_printf ("file://%s/repo", testdir);
@@ -591,7 +591,7 @@ gs_plugin_loader_flatpak_runtime_repo_func (GsPluginLoader *plugin_loader)
 
        /* write a flatpakref file */
        fn_repourl = g_strdup_printf ("file://%s", fn_repo);
-       testdir2 = gs_test_get_filename (TESTDATADIR, "tests/app-missing-runtime");
+       testdir2 = gs_test_get_filename (TESTDATADIR, "app-missing-runtime");
        if (testdir2 == NULL)
                return;
        testdir2_repourl = g_strdup_printf ("file://%s/repo", testdir2);
@@ -732,7 +732,7 @@ gs_plugin_loader_flatpak_ref_func (GsPluginLoader *plugin_loader)
 
        /* add a remote with only the runtime in */
        app_source = gs_app_new ("test");
-       testdir = gs_test_get_filename (TESTDATADIR, "tests/only-runtime");
+       testdir = gs_test_get_filename (TESTDATADIR, "only-runtime");
        if (testdir == NULL)
                return;
        testdir_repourl = g_strdup_printf ("file://%s/repo", testdir);
@@ -788,7 +788,7 @@ gs_plugin_loader_flatpak_ref_func (GsPluginLoader *plugin_loader)
        g_assert_cmpint (gs_app_get_state (runtime), ==, AS_APP_STATE_INSTALLED);
 
        /* write a flatpakref file */
-       testdir2 = gs_test_get_filename (TESTDATADIR, "tests/app-with-runtime");
+       testdir2 = gs_test_get_filename (TESTDATADIR, "app-with-runtime");
        if (testdir2 == NULL)
                return;
        testdir2_repourl = g_strdup_printf ("file://%s/repo", testdir2);
@@ -924,13 +924,13 @@ gs_plugin_loader_flatpak_app_update_func (GsPluginLoader *plugin_loader)
                return;
 
        /* no files to use */
-       repodir1_fn = gs_test_get_filename (TESTDATADIR, "tests/app-with-runtime/repo");
+       repodir1_fn = gs_test_get_filename (TESTDATADIR, "app-with-runtime/repo");
        if (repodir1_fn == NULL ||
            !g_file_test (repodir1_fn, G_FILE_TEST_EXISTS)) {
                g_test_skip ("no flatpak test repo");
                return;
        }
-       repodir2_fn = gs_test_get_filename (TESTDATADIR, "tests/app-update/repo");
+       repodir2_fn = gs_test_get_filename (TESTDATADIR, "app-update/repo");
        if (repodir2_fn == NULL ||
            !g_file_test (repodir2_fn, G_FILE_TEST_EXISTS)) {
                g_test_skip ("no flatpak test repo");
diff --git a/plugins/fwupd/Makefile.am b/plugins/fwupd/Makefile.am
index 744dd03..5d1e9d2 100644
--- a/plugins/fwupd/Makefile.am
+++ b/plugins/fwupd/Makefile.am
@@ -1,6 +1,6 @@
 AM_CPPFLAGS =                                          \
        -DSYSCONFDIR=\""$(sysconfdir)"\"                \
-       -DTESTDATADIR=\""$(srcdir)"\"                   \
+       -DTESTDATADIR=\""$(srcdir)/tests"\"             \
        -DLOCALPLUGINDIR=\""$(builddir)/.libs"\"
 
 plugindir = $(GS_PLUGIN_DIR)
diff --git a/plugins/fwupd/gs-self-test.c b/plugins/fwupd/gs-self-test.c
index 2e1b231..85109f8 100644
--- a/plugins/fwupd/gs-self-test.c
+++ b/plugins/fwupd/gs-self-test.c
@@ -40,7 +40,7 @@ gs_plugin_loader_fwupd_func (GsPluginLoader *plugin_loader)
        }
 
        /* load local file */
-       fn = gs_test_get_filename (TESTDATADIR, "tests/chiron-0.2.cab");
+       fn = gs_test_get_filename (TESTDATADIR, "chiron-0.2.cab");
        g_assert (fn != NULL);
        file = g_file_new_for_path (fn);
        app = gs_plugin_loader_file_to_app (plugin_loader,
diff --git a/plugins/modalias/Makefile.am b/plugins/modalias/Makefile.am
index 090f94f..1ab2298 100644
--- a/plugins/modalias/Makefile.am
+++ b/plugins/modalias/Makefile.am
@@ -1,5 +1,5 @@
 AM_CPPFLAGS =                                          \
-       -DTESTDATADIR=\""$(srcdir)"\"                   \
+       -DTESTDATADIR=\""$(srcdir)/tests"\"             \
        -DLOCALPLUGINDIR=\""$(builddir)/.libs"\"        \
        -DLOCALPLUGINDIR_CORE=\""$(top_builddir)/plugins/core/.libs"\"
 
diff --git a/plugins/packagekit/Makefile.am b/plugins/packagekit/Makefile.am
index 62d95d0..56b02ba 100644
--- a/plugins/packagekit/Makefile.am
+++ b/plugins/packagekit/Makefile.am
@@ -1,6 +1,6 @@
 AM_CPPFLAGS =                                          \
        -DI_KNOW_THE_PACKAGEKIT_GLIB2_API_IS_SUBJECT_TO_CHANGE  \
-       -DTESTDATADIR=\""$(srcdir)"\"                   \
+       -DTESTDATADIR=\""$(srcdir)/tests"\"             \
        -DLOCALPLUGINDIR=\""$(builddir)/.libs"\"
 
 plugindir = $(GS_PLUGIN_DIR)
diff --git a/plugins/packagekit/gs-self-test.c b/plugins/packagekit/gs-self-test.c
index 8fad75f..865229f 100644
--- a/plugins/packagekit/gs-self-test.c
+++ b/plugins/packagekit/gs-self-test.c
@@ -221,7 +221,7 @@ gs_plugin_loader_packagekit_local_func (GsPluginLoader *plugin_loader)
        }
 
        /* load local file */
-       fn = gs_test_get_filename (TESTDATADIR, "tests/chiron-1.1-1.fc24.x86_64.rpm");
+       fn = gs_test_get_filename (TESTDATADIR, "chiron-1.1-1.fc24.x86_64.rpm");
        g_assert (fn != NULL);
        file = g_file_new_for_path (fn);
        app = gs_plugin_loader_file_to_app (plugin_loader,
diff --git a/plugins/repos/Makefile.am b/plugins/repos/Makefile.am
index 0ecfaeb..f4e1be4 100644
--- a/plugins/repos/Makefile.am
+++ b/plugins/repos/Makefile.am
@@ -1,5 +1,5 @@
 AM_CPPFLAGS =                                          \
-       -DTESTDATADIR=\""$(srcdir)"\"                   \
+       -DTESTDATADIR=\""$(srcdir)/tests"\"             \
        -DLOCALPLUGINDIR=\""$(builddir)/.libs"\"
 
 plugindir = $(GS_PLUGIN_DIR)
diff --git a/plugins/repos/gs-self-test.c b/plugins/repos/gs-self-test.c
index 8b855fa..7f19d8a 100644
--- a/plugins/repos/gs-self-test.c
+++ b/plugins/repos/gs-self-test.c
@@ -62,7 +62,7 @@ main (int argc, char **argv)
        g_setenv ("G_MESSAGES_DEBUG", "all", TRUE);
 
        /* dummy data */
-       reposdir = gs_test_get_filename (TESTDATADIR, "tests/yum.repos.d");
+       reposdir = gs_test_get_filename (TESTDATADIR, "yum.repos.d");
        g_assert (reposdir != NULL);
        g_setenv ("GS_SELF_TEST_REPOS_DIR", reposdir, TRUE);
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]