[gnome-ostree] integrationtest: Keep going on test failures
- From: Colin Walters <walters src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-ostree] integrationtest: Keep going on test failures
- Date: Sun, 19 May 2013 20:20:05 +0000 (UTC)
commit d36becf8ef528249ec4b727be74d54429b6e583f
Author: Colin Walters <walters verbum org>
Date: Sun May 19 16:19:42 2013 -0400
integrationtest: Keep going on test failures
(Hopefully)
src/js/tasks/task-integrationtest.js | 14 +++++++++++++-
src/js/tasks/testbase.js | 11 +++++++++++
2 files changed, 24 insertions(+), 1 deletions(-)
---
diff --git a/src/js/tasks/task-integrationtest.js b/src/js/tasks/task-integrationtest.js
index dbd772d..7e60693 100644
--- a/src/js/tasks/task-integrationtest.js
+++ b/src/js/tasks/task-integrationtest.js
@@ -43,12 +43,24 @@ const TaskIntegrationTest = new Lang.Class({
],
FailedMessageIDs: ["10dd2dc188b54a5e98970f56499d1f73", // gnome-session required component failed
- "0eee66bf98514369bef9868327a43cf1" // Tests failed
],
StatusMessageID: "4d013788dd704743b826436c951e551d",
CompletedTag: 'integrated',
+
+ _handleMessage: function(message, cancellable) {
+ if (message['MESSAGE_ID'] == "0eee66bf98514369bef9868327a43cf1") {
+ print(message['MESSAGE']);
+ this._oneTestFailed = true;
+ }
+ },
+
+ _postQemu: function(cancellable) {
+ if (this._oneTestFailed) {
+ throw new Error("Not all tests passed");
+ }
+ },
_prepareDisk: function(mntdir, arch, cancellable) {
let osname = this._buildData['snapshot']['osname'];
diff --git a/src/js/tasks/testbase.js b/src/js/tasks/testbase.js
index 14d46bb..4c837a9 100644
--- a/src/js/tasks/testbase.js
+++ b/src/js/tasks/testbase.js
@@ -115,6 +115,7 @@ const TestOneDisk = new Lang.Class({
print(message);
this._parentTask._statusMessage = message;
}
+ this._parentTask._handleMessage(data, this._cancellable);
}
if (this._countPendingRequiredMessageIds == 0 && !this._foundAllMessageIds) {
print("Found all required message IDs");
@@ -321,6 +322,9 @@ const TestOneDisk = new Lang.Class({
if (this._failed) {
throw new Error(this._failedMessage);
}
+
+ this._parentTask._postQemu(cancellable);
+
print("Completed testing of " + diskPath.get_basename());
}
});
@@ -349,6 +353,13 @@ const TestBase = new Lang.Class({
// Nothing, intended for subclasses
},
+ _handleMessage: function(message, cancellable) {
+ return false;
+ },
+
+ _postQemu: function(cancellable) {
+ },
+
execute: function(cancellable) {
let imageDir = this.workdir.get_child('images');
let currentImages = imageDir.get_child('current');
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]