[gnome-ostree] testbase: Write status.txt immediately on receipt of a status message
- From: Colin Walters <walters src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-ostree] testbase: Write status.txt immediately on receipt of a status message
- Date: Wed, 22 May 2013 00:02:28 +0000 (UTC)
commit 6431976dc026bece502d64aaaa4874a5d56c7ac9
Author: Colin Walters <walters verbum org>
Date: Tue May 21 18:56:03 2013 -0400
testbase: Write status.txt immediately on receipt of a status message
This is just saner, and will ensure we get a status.txt even for
failing tests.
src/js/tasks/testbase.js | 12 +++---------
1 files changed, 3 insertions(+), 9 deletions(-)
---
diff --git a/src/js/tasks/testbase.js b/src/js/tasks/testbase.js
index 08d3775..b38ad85 100644
--- a/src/js/tasks/testbase.js
+++ b/src/js/tasks/testbase.js
@@ -113,7 +113,9 @@ const TestOneDisk = new Lang.Class({
}
if (messageId === this._statusMessageId) {
print(message);
- this._parentTask._statusMessage = message;
+ let statusTxtPath = Gio.File.new_for_path('status.txt');
+ statusTxtPath.replace_contents(message + '\n', null, false,
+
Gio.FileCreateFlags.REPLACE_DESTINATION, this._cancellable);
}
this._parentTask._handleMessage(data, this._cancellable);
}
@@ -369,8 +371,6 @@ const TestBase = new Lang.Class({
let buildJson;
let disksToTest = [];
- this._statusMessage = null;
-
while ((info = e.next_file(cancellable)) != null) {
let name = info.get_name();
if (name.indexOf('build-') == 0 && JSUtil.stringEndswith(name, '.json')) {
@@ -397,12 +397,6 @@ const TestBase = new Lang.Class({
test.execute(subworkdir, this._buildData, this.repo, currentImages.get_child(name), cancellable);
}
- if (this._statusMessage != null) {
- let statusTxtPath = Gio.File.new_for_path('status.txt');
- statusTxtPath.replace_contents(this._statusMessage + '\n', null, false,
- Gio.FileCreateFlags.REPLACE_DESTINATION,
cancellable);
- }
-
let buildData = this._buildData;
if (buildJson != null && this.CompletedTag !== null) {
let refData = '';
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]