[grilo-plugins] test: Run TMDb tests with the recently build plugin



commit 1d17e62ae05037d231bb4a2de6308a4ab08619b0
Author: Juan A. Suarez Romero <jasuarez igalia com>
Date:   Sun Dec 2 22:32:48 2012 +0000

    test: Run TMDb tests with the recently build plugin
    
    This avoids the need to install the plugin to be able run the tests.
    
    Use the recently built plugin to run the tests.

 test/Makefile.am                       |    8 +++++++-
 test/test_tmdb_fast_resolution.c       |    1 +
 test/test_tmdb_full_resolution.c       |    1 +
 test/test_tmdb_missing_configuration.c |    1 +
 test/test_tmdb_preconditions.c         |    1 +
 5 files changed, 11 insertions(+), 1 deletions(-)
---
diff --git a/test/Makefile.am b/test/Makefile.am
index c05e832..281f490 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -7,13 +7,19 @@
 
 INCLUDES = @DEPS_CFLAGS@
 
+link_tmdb_plugin:
+	ln -sf $(top_srcdir)/src/tmdb/.libs/libgrltmdb.so && \
+	ln -sf $(top_srcdir)/src/tmdb/grl-tmdb.xml
+
 check_tests = test_tmdb_preconditions \
 	test_tmdb_missing_configuration \
 	test_tmdb_fast_resolution \
 	test_tmdb_full_resolution
 
 # TODO: Add test_local_metadata to check_tests when it runs without errors.
-check_PROGRAMS = test_local_metadata \
+check_PROGRAMS = \
+	link_tmdb_plugin \
+	test_local_metadata \
 	$(check_tests)
 TESTS =	$(check_tests)
 
diff --git a/test/test_tmdb_fast_resolution.c b/test/test_tmdb_fast_resolution.c
index 55803df..24c4425 100644
--- a/test/test_tmdb_fast_resolution.c
+++ b/test/test_tmdb_fast_resolution.c
@@ -103,6 +103,7 @@ int
 main(int argc, char **argv)
 {
   g_setenv ("GRL_PLUGIN_LIST", TMDB_PLUGIN_ID, TRUE);
+  g_setenv ("GRL_PLUGIN_PATH", g_getenv ("PWD"), TRUE);
 
   /* We must set this before calling grl_init.
    * See https://bugzilla.gnome.org/show_bug.cgi?id=685967#c17
diff --git a/test/test_tmdb_full_resolution.c b/test/test_tmdb_full_resolution.c
index be9c404..6a030f1 100644
--- a/test/test_tmdb_full_resolution.c
+++ b/test/test_tmdb_full_resolution.c
@@ -136,6 +136,7 @@ int
 main(int argc, char **argv)
 {
   g_setenv ("GRL_PLUGIN_LIST", TMDB_PLUGIN_ID, TRUE);
+  g_setenv ("GRL_PLUGIN_PATH", g_getenv ("PWD"), TRUE);
 
   /* We must set this before calling grl_init.
    * See https://bugzilla.gnome.org/show_bug.cgi?id=685967#c17
diff --git a/test/test_tmdb_missing_configuration.c b/test/test_tmdb_missing_configuration.c
index fee49ca..b04f539 100644
--- a/test/test_tmdb_missing_configuration.c
+++ b/test/test_tmdb_missing_configuration.c
@@ -69,6 +69,7 @@ int
 main(int argc, char **argv)
 {
   g_setenv ("GRL_PLUGIN_LIST", TMDB_PLUGIN_ID, TRUE);
+  g_setenv ("GRL_PLUGIN_PATH", g_getenv ("PWD"), TRUE);
 
   /* We must set this before calling grl_init.
    * See https://bugzilla.gnome.org/show_bug.cgi?id=685967#c17
diff --git a/test/test_tmdb_preconditions.c b/test/test_tmdb_preconditions.c
index e869da9..11708a5 100644
--- a/test/test_tmdb_preconditions.c
+++ b/test/test_tmdb_preconditions.c
@@ -92,6 +92,7 @@ int
 main(int argc, char **argv)
 {
   g_setenv ("GRL_PLUGIN_LIST", TMDB_PLUGIN_ID, TRUE);
+  g_setenv ("GRL_PLUGIN_PATH", g_getenv ("PWD"), TRUE);
 
   /* We must set this before calling grl_init.
    * See https://bugzilla.gnome.org/show_bug.cgi?id=685967#c17



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