xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Ian Jackson <ian.jackson@eu.citrix.com>
To: xen-devel@lists.xenproject.org
Cc: Ian Jackson <Ian.Jackson@eu.citrix.com>,
	Ian Campbell <ian.campbell@citrix.com>
Subject: [OSSTEST PATCH 3/4] Fix mg-hosts mkpxedir
Date: Tue, 19 Aug 2014 11:35:11 +0100	[thread overview]
Message-ID: <1408444512-1223-4-git-send-email-ian.jackson@eu.citrix.com> (raw)
In-Reply-To: <1408444512-1223-1-git-send-email-ian.jackson@eu.citrix.com>

 * 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 <Ian.Jackson@eu.citrix.com>
---
 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(<<END);
             set -e
 	    cd $ho->{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

  parent reply	other threads:[~2014-08-19 10:35 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-19 10:35 [PATCH 0/4] Miscellaneous minor fixes Ian Jackson
2014-08-19 10:35 ` [OSSTEST PATCH 1/4] rump kernel tests: Get upstream from rumprun-xen Ian Jackson
2014-08-19 10:35 ` [OSSTEST PATCH 2/4] sg-report-flight: New --branches-also option Ian Jackson
2014-08-19 10:35 ` Ian Jackson [this message]
2014-08-19 10:35 ` [OSSTEST PATCH 4/4] mg-hosts mkpxedir: honour $OSSTEST_SUDO Ian Jackson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1408444512-1223-4-git-send-email-ian.jackson@eu.citrix.com \
    --to=ian.jackson@eu.citrix.com \
    --cc=ian.campbell@citrix.com \
    --cc=xen-devel@lists.xenproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).