From: Ian Jackson Date: Tue, 25 Aug 2020 19:13:22 +0000 (+0100) Subject: host lifecycle: Record lifecycle in db and runvar X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=18da773272da5925714fc40fc7149a7928d4f07d;p=osstest.git host lifecycle: Record lifecycle in db and runvar This is just the calls to host_update_lifecycle_info. Now the db table is Needed. Signed-off-by: Ian Jackson --- diff --git a/Osstest/TestSupport.pm b/Osstest/TestSupport.pm index 2214198..163862f 100644 --- a/Osstest/TestSupport.pm +++ b/Osstest/TestSupport.pm @@ -1418,6 +1418,8 @@ sub selecthost ($;$$) { } } + host_update_lifecycle_info($ho, $isprep ? 'selectprep' : 'select'); + return $ho; } diff --git a/schema/host-lifecycle.sql b/schema/host-lifecycle.sql index 7f1f5bb..7e4fc2a 100644 --- a/schema/host-lifecycle.sql +++ b/schema/host-lifecycle.sql @@ -1,4 +1,4 @@ --- ##OSSTEST## 012 Preparatory +-- ##OSSTEST## 012 Needed -- -- Records the jobs which have touched a host, for host sharing/reuse -- The information here is ephemeral - it is cleared when a host is diff --git a/ts-freebsd-host-install b/ts-freebsd-host-install index 9feb98c..31e14d5 100755 --- a/ts-freebsd-host-install +++ b/ts-freebsd-host-install @@ -295,3 +295,4 @@ setup_netboot_local($ho); # Proceed with the install install(); +host_update_lifecycle_info($ho, 'wiped'); diff --git a/ts-host-install b/ts-host-install index 5badc70..276c6af 100755 --- a/ts-host-install +++ b/ts-host-install @@ -297,3 +297,4 @@ END } install(); +host_update_lifecycle_info($ho, 'wiped'); diff --git a/ts-host-reuse b/ts-host-reuse index 0ecbb0b..85beb51 100755 --- a/ts-host-reuse +++ b/ts-host-reuse @@ -158,6 +158,7 @@ sub act_post_test () { return unless $ho->{Shared}; die unless $ho->{Shared}{State} eq 'mid-test'; post_test_cleanup(); + host_update_lifecycle_info($ho, 'final'); host_shared_mark_ready($ho, $sharetype, 'mid-test', 'ready'); } diff --git a/ts-logs-capture b/ts-logs-capture index ec494fe..0b0b6af 100755 --- a/ts-logs-capture +++ b/ts-logs-capture @@ -309,3 +309,4 @@ if (fetch_logs_host()) { } } logm("logs captured to $stash"); +host_update_lifecycle_info($ho, 'final');