]> xenbits.xensource.com Git - people/liuw/osstest.git/commitdiff
create_webfile: Support use with guests as well as hosts.
authorIan Campbell <ian.campbell@citrix.com>
Wed, 6 May 2015 09:56:32 +0000 (10:56 +0100)
committerIan Campbell <ian.campbell@citrix.com>
Thu, 14 May 2015 10:56:18 +0000 (11:56 +0100)
In particular make the path unique by ensuring it includes the host
and guest name in the guest case.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Osstest/TestSupport.pm

index a50db12e8eb4a94640efc2a4905c82577255e368..d4440221b060039fe34999fa6dacdffb6d70711e 100644 (file)
@@ -1995,6 +1995,8 @@ sub await_webspace_fetch_byleaf ($$$$$) {
 sub create_webfile ($$$) {
     my ($ho, $tail, $contents) = @_; # $contents as for file_link_contents
     my $wf_rhs= $ho->{Name}."_".$tail;
+    # $ho->{Host} is set if $ho is a guest.
+    $wf_rhs= $ho->{Host}{Name}."_${wf_rhs}" if $ho->{Host};
     my $wf_common= $c{WebspaceCommon}.$wf_rhs;
     my $wf_url= $c{WebspaceUrl}.$wf_common;
     my $wf_file= $c{WebspaceFile}.$wf_common;