[gnome-continuous] task: Make the build name public



commit db71792a1391e3306df5e2287fae3b56d9aa0cff
Author: Jasper St. Pierre <jstpierre mecheye net>
Date:   Wed Oct 9 16:03:22 2013 -0400

    task: Make the build name public
    
    We'll use this instead of the CWD when reporting failures

 src/js/builtins/autobuilder.js |    6 +++---
 src/js/builtins/make.js        |    6 +++---
 src/js/task.js                 |    4 ++--
 3 files changed, 8 insertions(+), 8 deletions(-)
---
diff --git a/src/js/builtins/autobuilder.js b/src/js/builtins/autobuilder.js
index e014bb1..d98c332 100644
--- a/src/js/builtins/autobuilder.js
+++ b/src/js/builtins/autobuilder.js
@@ -92,7 +92,7 @@ const Autobuilder = new Lang.Class({
     },
 
     _onTaskExecuting: function(taskmaster, task) {
-       print("Task " + task.name + " executing in " + task._taskCwd.get_path());
+       print("Task " + task.name + " executing on " + task.buildName);
        this._updateStatus();
     },
 
@@ -104,9 +104,9 @@ const Autobuilder = new Lang.Class({
            this._runResolve();
 
        if (success) {
-           print("Task " + task.name + " complete: " + task._taskCwd.get_path());
+           print("Task " + task.name + " complete: " + task.buildName);
        } else {
-           print("Task " + task.name + " failed: " + task._taskCwd.get_path());
+           print("Task " + task.name + " failed: " + task.buildName);
        }
        this._updateStatus();
     },
diff --git a/src/js/builtins/make.js b/src/js/builtins/make.js
index 4097094..89a95e2 100644
--- a/src/js/builtins/make.js
+++ b/src/js/builtins/make.js
@@ -78,7 +78,7 @@ const Make = new Lang.Class({
     },
 
     _onTaskExecuting: function(taskmaster, task) {
-       print("Task " + task.name + " executing in " + task._taskCwd.get_path());
+       print("Task " + task.name + " executing on " + task.buildName);
        let output = task._taskCwd.get_child('output.txt');
        if (this._oneOnly) {
            let context = new GSystem.SubprocessContext({ argv: ['tail', '-f', output.get_path() ] });
@@ -91,10 +91,10 @@ const Make = new Lang.Class({
        if (this._oneOnly)
            this._tail.request_exit();
        if (success) {
-           print("Task " + task.name + " complete: " + task._taskCwd.get_path());
+           print("Task " + task.name + " complete: " + task.buildName);
        } else {
            this._failed = true;
-           print("Task " + task.name + " failed: " + task._taskCwd.get_path());
+           print("Task " + task.name + " failed: " + task.buildName);
        }
     },
 
diff --git a/src/js/task.js b/src/js/task.js
index fbb298d..4ba9b88 100644
--- a/src/js/task.js
+++ b/src/js/task.js
@@ -389,7 +389,7 @@ const TaskRunner = new Lang.Class({
         let buildPath = this.taskmaster.tasksPath.resolve_relative_path(this.name);
         buildPath = GSystem.file_realpath(buildPath);
 
-        this._buildName = buildPath.get_basename();
+        this.buildName = buildPath.get_basename();
         this._taskCwd = buildPath.get_child(this.name);
         GSystem.file_ensure_directory(this._taskCwd, false, cancellable);
 
@@ -436,7 +436,7 @@ const TaskRunner = new Lang.Class({
        let targetPath = this.workdir.get_relative_path(this._taskCwd);
 
        let meta = { taskMetaVersion: 0,
-                     buildName: this._buildName,
+                     buildName: this.buildName,
                     success: success,
                     errmsg: errmsg,
                     elapsedMillis: elapsedMillis,


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