[gnome-desktop-testing] Respect --prefix for tests
- From: Colin Walters <walters src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-desktop-testing] Respect --prefix for tests
- Date: Sat, 27 Apr 2013 21:38:17 +0000 (UTC)
commit 3730cb6ec56eeac33341a96150a4bff3cbfbb84a
Author: Colin Walters <walters verbum org>
Date: Sat Apr 27 17:37:53 2013 -0400
Respect --prefix for tests
This way we're useful in jhbuild too.
Makefile-tests.am | 1 +
src/gnome-desktop-testing-runner.in | 1 +
src/gnome-desktop-testing-runner.js | 2 +-
3 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/Makefile-tests.am b/Makefile-tests.am
index c6f1a68..1f61b5f 100644
--- a/Makefile-tests.am
+++ b/Makefile-tests.am
@@ -17,6 +17,7 @@
substitutions= \
-e s,@libdir\@,$(libdir), \
+ -e s,@datadir\@,$(datadir), \
-e s,@pkglibdir\@,$(pkglibdir), \
-e s,@datarootdir\@,$(datarootdir), \
-e s,@pkgdatadir\@,$(pkgdatadir), \
diff --git a/src/gnome-desktop-testing-runner.in b/src/gnome-desktop-testing-runner.in
index eb7c962..ae77dfb 100644
--- a/src/gnome-desktop-testing-runner.in
+++ b/src/gnome-desktop-testing-runner.in
@@ -22,5 +22,6 @@ export GI_TYPELIB_PATH="@pkglibdir@/girepository-1.0${GI_TYPELIB_PATH:+:$GI_TYPE
export LD_LIBRARY_PATH="@pkglibdir@/${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}"
export PKGDATADIR= pkgdatadir@
export PKGLIBDIR= pkglibdir@
+export DATADIR= datadir@
exec gjs -I "${jsdir}" "${jsdir}/gnome-desktop-testing-runner.js" "$@"
diff --git a/src/gnome-desktop-testing-runner.js b/src/gnome-desktop-testing-runner.js
index d95b9ef..29968ff 100755
--- a/src/gnome-desktop-testing-runner.js
+++ b/src/gnome-desktop-testing-runner.js
@@ -94,7 +94,7 @@ function runTestsInDirectory(file) {
let testDirs = ARGV.slice();
if (testDirs.length == 0) {
- testDirs = ['/usr/share/installed-tests'];
+ testDirs = [GLib.getenv('DATADIR') + '/installed-tests'];
}
testDirs.forEach(function(path) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]