|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [OSSTEST PATCH RFC 02/14] TestSupport: factor out target_jobdir_subdir
Returns a path inside job-specific directory with leafname subdir.
It will be used to return the distribution location of xtf.
No functional change.
Signed-off-by: Wei Liu <wei.liu2@xxxxxxxxxx>
---
Osstest/TestSupport.pm | 12 +++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)
diff --git a/Osstest/TestSupport.pm b/Osstest/TestSupport.pm
index 39d1c08..4f12ea1 100644
--- a/Osstest/TestSupport.pm
+++ b/Osstest/TestSupport.pm
@@ -64,7 +64,7 @@ BEGIN {
target_run_apt
target_install_packages target_install_packages_norec
target_jobdir target_extract_jobdistpath_subdir
- target_extract_jobdistpath
+ target_extract_jobdistpath target_jobdir_subdir
lv_create lv_dev_mapper
poll_loop tcpconnect await_tcp
@@ -2175,14 +2175,20 @@ sub target_jobdir ($) {
return $jobdir;
}
+# returns a path inside job-specific dir with leafname $subdir on $ho
+sub target_jobdir_subdir($$) {
+ my ($ho, $subdir) = @_;
+ my $jobdir = target_jobdir($ho);
+ return "$jobdir/$subdir";
+}
+
sub target_extract_jobdistpath_subdir ($$$$) {
my ($ho, $subdir, $distpart, $buildjob) = @_;
# Extracts dist part $distpart from job $buildjob into an
# job-specific directory with leafname $subdir on $ho, and returns
# the directory's pathname. Does not need root.
-
my $jobdir = target_jobdir($ho);
- my $distdir = "$jobdir/$subdir";
+ my $distdir = target_jobdir_subdir($ho, $subdir);
target_cmd($ho,"rm -rf $distdir && mkdir $distdir",60);
my $path = get_stashed("path_${distpart}dist", $buildjob);
--
2.1.4
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
https://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |