From 64679115da335b7b6b709377ab8c44cddee864cc Mon Sep 17 00:00:00 2001 From: Vojtech Horky Date: Tue, 1 Aug 2017 08:44:52 +0200 Subject: [PATCH] Tests should use the downloadable image, not the one in working directory It is surprising that any VM testing actually worked so far as the image.iso could have been overwritten at any time. Now, the VM would be using ISO from the permanent storage. --- hbuild/builders/helenos.py | 6 ++---- hbuild/scheduler.py | 2 ++ 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/hbuild/builders/helenos.py b/hbuild/builders/helenos.py index 2199a06..5441b1f 100755 --- a/hbuild/builders/helenos.py +++ b/hbuild/builders/helenos.py @@ -66,8 +66,7 @@ class HelenOSBuildTask(Task): xxx, image_extension = os.path.splitext(self.image) target_image_name = '%s/helenos-%s%s' % ( profile_flat, profile_flat, image_extension ) build_image_name = '%s/%s' % ( my_dir, self.image ) - self.ctl.add_downloadable_file("HelenOS boot image", target_image_name, build_image_name) - ret['image'] = build_image_name + ret['image'] = self.ctl.add_downloadable_file("HelenOS boot image", target_image_name, build_image_name) return ret @@ -105,8 +104,7 @@ class HelenOSBuildWithHarboursTask(Task): xxx, image_extension = os.path.splitext(image_name) target_image_name = '{}/helenos-{}-with-{}{}'.format( profile_flat, profile_flat, '-'.join(self.harbours), image_extension ) build_image_name = os.path.join(my_dir, image_name) - self.ctl.add_downloadable_file("HelenOS boot image with {}".format(', '.join(self.harbours)), target_image_name, build_image_name) - ret['image'] = build_image_name + ret['image'] = self.ctl.add_downloadable_file("HelenOS boot image with {}".format(', '.join(self.harbours)), target_image_name, build_image_name) return ret diff --git a/hbuild/scheduler.py b/hbuild/scheduler.py index c9223ad..9f75a91 100755 --- a/hbuild/scheduler.py +++ b/hbuild/scheduler.py @@ -198,6 +198,8 @@ class TaskController: target = self.get_artefact_absolute_path(download_name, True) shutil.copy(current_filename, target) + + return target def open_downloadable_file(self, download_name, mode): return open(self.get_artefact_absolute_path(download_name, True), mode) -- 2.11.4.GIT