[gnome-ostree] build: Support /usr/libexec/installed-tests
- From: Colin Walters <walters src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-ostree] build: Support /usr/libexec/installed-tests
- Date: Wed, 29 May 2013 15:52:56 +0000 (UTC)
commit 0d550b1be6fe2e1a3cb0fc6c6b805dccc17255de
Author: Colin Walters <walters verbum org>
Date: Wed May 29 11:51:49 2013 -0400
build: Support /usr/libexec/installed-tests
Per IRC discussion, at least Ryan felt it was cleaner to allow
components to install tests into a dedicated toplevel.
src/js/tasks/task-build.js | 25 +++++++++++++++----------
1 files changed, 15 insertions(+), 10 deletions(-)
---
diff --git a/src/js/tasks/task-build.js b/src/js/tasks/task-build.js
index 5362b97..de1583c 100644
--- a/src/js/tasks/task-build.js
+++ b/src/js/tasks/task-build.js
@@ -469,16 +469,21 @@ const TaskBuild = new Lang.Class({
let installedTestsDataSubdir = null;
if (libexecdir.query_exists(null)) {
- FileUtil.walkDir(libexecdir, {fileType: Gio.FileType.DIRECTORY,
- depth: 1 },
- Lang.bind(this, function(filePath, cancellable) {
- let instTestsPath = filePath.get_child('installed-tests');
- if (!instTestsPath.query_exists(null))
- return;
- // At the moment we only support one installed tests data
- if (installedTestsDataSubdir == null)
- installedTestsDataSubdir = instTestsPath;
- }), cancellable);
+ let topInstTestsPath = libexecdir.get_child('installed-tests');
+ if (topInstTestsPath.query_exists(null)) {
+ installedTestsDataSubdir = topInstTestsPath;
+ } else {
+ FileUtil.walkDir(libexecdir, {fileType: Gio.FileType.DIRECTORY,
+ depth: 1 },
+ Lang.bind(this, function(filePath, cancellable) {
+ let pkgInstTestsPath = filePath.get_child('installed-tests');
+ if (!pkgInstTestsPath.query_exists(null))
+ return;
+ // At the moment we only support one installed tests data
+ if (installedTestsDataSubdir == null)
+ installedTestsDataSubdir = pkgInstTestsPath;
+ }), cancellable);
+ }
}
if (installedTestsDataSubdir)
this._installAndUnlink(buildResultDir, installedTestsDataSubdir, testsPath, cancellable);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]