From: Roger Pau Monne Date: Fri, 28 Jul 2017 14:59:41 +0000 (+0100) Subject: TestSupport: introduce hostprop_putative_record X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=b556425aff9c6c622e8c64c9e12ceb02a5c1c4f6;p=people%2Fliuw%2Fosstest.git TestSupport: introduce hostprop_putative_record This is used to store tentative host properties in the runvars of a job, with the expectation that at some point (ie: at the end of the job) they will be turned into real properties stored in the database. Signed-off-by: Roger Pau Monné Acked-by: Ian Jackson --- Changes since v2: - Use the following runvar format to store the putative host props: hostprop/$ident/$prop=$val. --- diff --git a/Osstest/TestSupport.pm b/Osstest/TestSupport.pm index 9d67c53..6d5e667 100644 --- a/Osstest/TestSupport.pm +++ b/Osstest/TestSupport.pm @@ -82,6 +82,7 @@ BEGIN { power_state power_cycle power_cycle_sleep serial_fetch_logs set_host_property propname_massage propname_check + hostprop_putative_record get_stashed open_unique_stashfile compress_stashed dir_identify_vcs @@ -1156,6 +1157,12 @@ sub set_host_property ($$$) { $mhostdb->set_property($ho, $prop, $val); } +sub hostprop_putative_record ($$$) { + my ($ho, $prop, $val) = @_; + + store_runvar("hostprop/$ho->{Ident}/$prop", $val); +} + sub get_target_property ($$;$); sub get_target_property ($$;$) { my ($ho, $prop, $defval) = @_;