[gnome-continuous] integrationtest: store test results in a separate dir and export them



commit ccf06f4bca88f9d8e9df86833a98c0d40ff2472e
Author: Vadim Rutkovsky <vrutkovs redhat com>
Date:   Wed Apr 9 18:12:16 2014 +0200

    integrationtest: store test results in a separate dir and export them
    
    https://bugzilla.gnome.org/show_bug.cgi?id=721818

 src/js/tasks/task-integrationtest.js |    8 +++++++-
 src/js/tasks/testbase.js             |    6 +++---
 2 files changed, 10 insertions(+), 4 deletions(-)
---
diff --git a/src/js/tasks/task-integrationtest.js b/src/js/tasks/task-integrationtest.js
index db10b7d..f17415e 100644
--- a/src/js/tasks/task-integrationtest.js
+++ b/src/js/tasks/task-integrationtest.js
@@ -82,6 +82,12 @@ const TaskIntegrationTest = new Lang.Class({
         let testsJson = Gio.File.new_for_path('installed-test-results.json');
         JSONUtil.writeJsonFileAtomic(testsJson, this._allTests, null);
 
+        let resultsDesc = this.subworkdir.resolve_relative_path('installed-test-results');
+        if (resultsDesc.query_exists(null))
+            GSystem.shutil_rm_rf(resultsDesc, cancellable);
+        let resultsSrc = mntdir.resolve_relative_path('home/test/installed-tests-results');
+        GSystem.shutil_cp_a(resultsSrc, resultsDesc, cancellable);
+
         if (this._oneTestFailed) {
             throw new Error("Not all tests passed");
         }
@@ -115,7 +121,7 @@ const TaskIntegrationTest = new Lang.Class({
         let desktopFile = '[Desktop Entry]\n\
 Encoding=UTF-8\n\
 Name=GNOME installed tests runner\n\
-Exec=gnome-desktop-testing-runner --parallel 0 --status=yes\n\
+Exec=gnome-desktop-testing-runner --parallel 0 --status=yes 
--report-directory=/home/test/installed-tests-results\n\
 Terminal=false\n\
 Type=Application\n';
         let dest = deployEtcDir.resolve_relative_path('xdg/autostart/gnome-desktop-testing.desktop');
diff --git a/src/js/tasks/testbase.js b/src/js/tasks/testbase.js
index a966b3a..8f5993a 100644
--- a/src/js/tasks/testbase.js
+++ b/src/js/tasks/testbase.js
@@ -618,13 +618,13 @@ const TestBase = new Lang.Class({
         for (let i = 0; i < disksToTest.length; i++) {
             let name = disksToTest[i];
             let workdirName = 'work-' + name.replace(/\.qcow2$/, '');
-            let subworkdir = Gio.File.new_for_path(workdirName);
-            GSystem.file_ensure_directory(subworkdir, true, cancellable);
+            this.subworkdir = Gio.File.new_for_path(workdirName);
+            GSystem.file_ensure_directory(this.subworkdir, true, cancellable);
             let test = new TestOneDisk(this,
                                        this.BaseRequiredMessageIDs.concat(this.RequiredMessageIDs),
                                        this.BaseFailedMessageIDs.concat(this.FailedMessageIDs),
                                        this.StatusMessageID);
-            test.execute(subworkdir, this._buildData, this.repo, currentImages.get_child(name), cancellable);
+            test.execute(this.subworkdir, this._buildData, this.repo, currentImages.get_child(name), 
cancellable);
         }
 
         let buildData = this._buildData;


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