From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ian Jackson Subject: [OSSTEST PATCH 3/4] Fix mg-hosts mkpxedir Date: Tue, 19 Aug 2014 11:35:11 +0100 Message-ID: <1408444512-1223-4-git-send-email-ian.jackson@eu.citrix.com> References: <1408444512-1223-1-git-send-email-ian.jackson@eu.citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta4.messagelabs.com ([85.158.143.247]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1XJglT-0003KI-Sz for xen-devel@lists.xenproject.org; Tue, 19 Aug 2014 10:35:43 +0000 In-Reply-To: <1408444512-1223-1-git-send-email-ian.jackson@eu.citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: xen-devel@lists.xenproject.org Cc: Ian Jackson , Ian Campbell List-Id: xen-devel@lists.xenproject.org * Have selecthost no longer demand that $job is set; if it is not, simply do not set Suite (which of course ultimately comes from runvars and hence the job). * Add missing use Osstest::TestSupport. * Mention the need to run it in README.dev. Signed-off-by: Ian Jackson --- Osstest/TestSupport.pm | 5 ++++- README.dev | 2 ++ mg-hosts | 9 +++++---- 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/Osstest/TestSupport.pm b/Osstest/TestSupport.pm index fea54d5..1d77933 100644 --- a/Osstest/TestSupport.pm +++ b/Osstest/TestSupport.pm @@ -751,8 +751,11 @@ sub selecthost ($) { Name => $name, TcpCheckPort => 22, Info => [], - Suite => get_runvar_default("${ident}_suite",$job,$c{DebianSuite}), }; + if (defined $job) { + $ho->{Suite} = get_runvar_default("${ident}_suite",$job, + $c{DebianSuite}); + } #----- calculation of the host's properties ----- diff --git a/README.dev b/README.dev index d99c5c7..eb72659 100644 --- a/README.dev +++ b/README.dev @@ -42,6 +42,8 @@ $ mg-hosts setprops marilith-n4 -- dhcp-watch-method 'leases dhcp3 dns-cam1.uk.x Handles multiple hosts: $ mg-hosts setprops HOSTA HOSTB -- "PROP" "VALUE" +$ mg-hosts mkpxedir HOSTA HOSTB + Create a flight: $ FLIGHT=`OSSTEST_CONFIG=production-config ./cs-flight-create commission xen-unstable` $ echo $FLIGHT diff --git a/mg-hosts b/mg-hosts index c9d31df..2643548 100755 --- a/mg-hosts +++ b/mg-hosts @@ -85,6 +85,7 @@ use strict qw(vars refs); use DBI; use Osstest; +use Osstest::TestSupport; csreadconfig(); @@ -110,10 +111,10 @@ sub cmd_mkpxedir () { system_checked(<{Tftp}{Path}$ho->{Tftp}{PxeDir} - sudo chown root.$ho->{Tftp}{PxeGroup} $macdir - sudo chmod 2775 $macdir - sudo rm -f $hn - sudo ln -s $macdir $hn + $sudo chown root.$ho->{Tftp}{PxeGroup} $macdir + $sudo chmod 2775 $macdir + $sudo rm -f $hn + $sudo ln -s $macdir $hn ls -ald $hn $macdir END } -- 1.7.10.4