[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [OSSTEST PATCH 35/62] TestSupport: Move `target_somefile_getleaf' earlier



We are going to make more use of this in intervening code.

Pure code motion.

Signed-off-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
---
 Osstest/TestSupport.pm | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/Osstest/TestSupport.pm b/Osstest/TestSupport.pm
index ce346097..4e2f120a 100644
--- a/Osstest/TestSupport.pm
+++ b/Osstest/TestSupport.pm
@@ -504,6 +504,15 @@ sub remote_perl_script_done ($) {
     !$? or die "$thing->{What} $?";
 }
 
+sub target_somefile_getleaf ($$$) {
+    my ($lleaf_ref, $rdest, $ho) = @_;
+    if (!defined $$lleaf_ref) {
+        $$lleaf_ref= $rdest;
+        $$lleaf_ref =~ s,.*/,,;
+    }
+    $$lleaf_ref= hostnamepath($ho)."--$$lleaf_ref";
+}
+
 sub sshuho ($$) { my ($user,$ho)= @_; return "$user\@$ho->{Ip}"; }
 
 sub sshopts () {
@@ -591,15 +600,6 @@ sub target_install_packages_norec ($@) {
     target_run_pkgmanager_install($ho,\@packages,1);
 }
 
-sub target_somefile_getleaf ($$$) {
-    my ($lleaf_ref, $rdest, $ho) = @_;
-    if (!defined $$lleaf_ref) {
-        $$lleaf_ref= $rdest;
-        $$lleaf_ref =~ s,.*/,,;
-    }
-    $$lleaf_ref= hostnamepath($ho)."--$$lleaf_ref";
-}
-
 sub tpfcs_core {
     my ($tputfilef,$ho,$timeout,$filedata, $rdest,$lleaf) = @_;
     target_somefile_getleaf(\$lleaf,$rdest,$ho);
-- 
2.11.0


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.