]> xenbits.xensource.com Git - people/royger/osstest.git/commitdiff
osstest: introduce host_shared_mark_ready
authorRoger Pau Monne <roger.pau@citrix.com>
Wed, 13 Jun 2018 07:40:13 +0000 (09:40 +0200)
committerIan Jackson <Ian.Jackson@eu.citrix.com>
Thu, 21 Jun 2018 15:54:03 +0000 (16:54 +0100)
That allows marking a host as ready to be shared. Replace the current
callers that open-code it.

This commit also fixes a bug where Ident was used instead of 'host' as
resource.

Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
---
Changes since v4:
 - New in this version.

Osstest/TestSupport.pm
ts-freebsd-host-install
ts-xen-build-prep

index 8799712e8cda00ef5821b0aa1828177d40a1c724..69aed2ff3270fece87e3aceeeabc2eadd261507a 100644 (file)
@@ -136,7 +136,7 @@ BEGIN {
                       guest_editconfig_nocd
                       host_install_postboot_complete
                       target_core_dump_setup
-                      sha256file
+                      sha256file host_shared_mark_ready
                       );
     %EXPORT_TAGS = ( );
 
@@ -2844,4 +2844,11 @@ sub sha256file ($;$) {
     return $truncate ? substr($digest, 0, $truncate) : $digest;
 }
 
+sub host_shared_mark_ready($$) {
+    my ($ho,$sharetype) = @_;
+
+    $mjobdb->jobdb_resource_shared_mark_ready('host', $ho->{Name},
+                                              $sharetype);
+}
+
 1;
index 984bdf0a5a41c0e447282a61d83ef832f4b67039..357c0b72095c5813b9c04d18b3666f7430781e15 100755 (executable)
@@ -279,5 +279,5 @@ setup_netboot_local($ho);
 # Proceed with the install
 install();
 
-resource_shared_mark_ready($ho, "build-freebsd-".
-                                sha256file("$path_prefix/install.img", 16));
+host_shared_mark_ready($ho, "build-freebsd-".
+                            sha256file("$path_prefix/install.img", 16));
index 3309216680a8f3581d848c9e1798febe36c3745b..bff5c927a6b0aa17d5a66fed1d62f8c517641787 100755 (executable)
@@ -274,5 +274,5 @@ if (!$ho->{Flags}{'no-reinstall'}) {
     ccache_setup();
     gitcache_setup();
 }
-$mjobdb->jobdb_resource_shared_mark_ready
-   ($ho->{Ident}, $ho->{Name}, "build-".$ho->{Suite}."-".$r{arch});
+
+host_shared_mark_ready($ho, "build-".$ho->{Suite}."-".$r{arch});