[gnome-music] build: Fix make distcheck



commit 67fe4b901c0d44b44ab1cf80aff78e93831b7088
Author: Rico Tzschichholz <ricotz ubuntu com>
Date:   Sun Jun 23 20:40:56 2013 +0200

    build: Fix make distcheck

 tests/Makefile.am              |   29 ++++++++++++++++-------------
 tests/tests_albumArt.js        |    6 +-----
 tests/tests_albumPlayback.js   |    4 ----
 tests/tests_artistsPlayback.js |    4 ----
 4 files changed, 17 insertions(+), 26 deletions(-)
---
diff --git a/tests/Makefile.am b/tests/Makefile.am
index e0c46a1..ae347dd 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -1,18 +1,21 @@
 TESTS = \
-    tests_albumArt.js \
-    tests_albumPlayback.js \
-    tests_artistsPlayback.js \
-    $(NULL)
+       tests_albumArt.js \
+       tests_albumPlayback.js \
+       tests_artistsPlayback.js \
+       $(NULL)
+
+EXTRA_DIST = $(TESTS)
+
+TESTS_ENVIRONMENT = \
+       LD_LIBRARY_PATH=$(top_builddir)/libgd/.libs:$$LD_LIBRARY_PATH \
+       GI_TYPELIB_PATH=$(top_builddir)/libgd:$$GI_TYPELIB_PATH
 
 check-TESTS:
-       @RUN_TESTS_ENV_VARS= \
-            LD_LIBRARY_PATH=$(top_srcdir)/libgd/.libs:$$LD_LIBRARY_PATH \
-            GI_TYPELIB_PATH=$(top_srcdir)/libgd:$$GI_TYPELIB_PATH ; \
-        for test in $(TESTS) ; do \
-          echo "Running suite $$test" ; \
-          $(RUN_TESTS_ENV_VARS) gjs $$test ; \
-          status=$$? ; \
-          if [[ $$status -ne 0 ]] ; then exit 1 ; fi ; \
-        done
+       for test in $(TESTS) ; do \
+               echo "Running suite $$test" ; \
+               $(TESTS_ENVIRONMENT) gjs --include-path=$(top_srcdir)/src $(srcdir)/$$test ; \
+               status=$$? ; \
+               if [[ $$status -ne 0 ]] ; then exit 1 ; fi ; \
+       done
 
 -include $(top_srcdir)/git.mk
diff --git a/tests/tests_albumArt.js b/tests/tests_albumArt.js
index 224a115..e0835e5 100755
--- a/tests/tests_albumArt.js
+++ b/tests/tests_albumArt.js
@@ -4,11 +4,7 @@ if (!('assertEquals' in this)) { /* allow running this test standalone */
     gjstestRun = function() { return imports.jsUnit.gjstestRun(window); };
 }
 
-imports.searchPath.unshift('..');
-imports.searchPath.unshift('../src');
-imports.searchPath.unshift('../libgd');
-imports.searchPath.unshift('../data');
-const AlbumArtCache = imports.src.albumArtCache.AlbumArtCache
+const AlbumArtCache = imports.albumArtCache.AlbumArtCache
 const GLib = imports.gi.GLib;
 const Lang = imports.lang;
 
diff --git a/tests/tests_albumPlayback.js b/tests/tests_albumPlayback.js
index 29311b6..b927eec 100644
--- a/tests/tests_albumPlayback.js
+++ b/tests/tests_albumPlayback.js
@@ -4,10 +4,6 @@ if (!('assertEquals' in this)) { /* allow running this test standalone */
     gjstestRun = function() { return imports.jsUnit.gjstestRun(window); };
 }
 
-imports.searchPath.unshift('..');
-imports.searchPath.unshift('../src');
-imports.searchPath.unshift('../libgd');
-imports.searchPath.unshift('../data');
 const Gio = imports.gi.Gio;
 const Gtk = imports.gi.Gtk;
 const Gdk = imports.gi.Gdk;
diff --git a/tests/tests_artistsPlayback.js b/tests/tests_artistsPlayback.js
index f0687fd..8a73e17 100644
--- a/tests/tests_artistsPlayback.js
+++ b/tests/tests_artistsPlayback.js
@@ -4,10 +4,6 @@ if (!('assertEquals' in this)) { /* allow running this test standalone */
     gjstestRun = function() { return imports.jsUnit.gjstestRun(window); };
 }
 
-imports.searchPath.unshift('..');
-imports.searchPath.unshift('../src');
-imports.searchPath.unshift('../libgd');
-imports.searchPath.unshift('../data');
 const Gio = imports.gi.Gio;
 const Gtk = imports.gi.Gtk;
 const Gdk = imports.gi.Gdk;


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