xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Wei Liu <wei.liu2@citrix.com>
To: Xen-devel <xen-devel@lists.xenproject.org>
Cc: ian.jackson@eu.citrix.com, Wei Liu <wei.liu2@citrix.com>
Subject: [OSSTEST PATCH RFC 02/14] TestSupport: factor out target_jobdir_subdir
Date: Thu, 4 Aug 2016 09:45:48 +0100	[thread overview]
Message-ID: <1470300360-4435-3-git-send-email-wei.liu2@citrix.com> (raw)
In-Reply-To: <1470300360-4435-1-git-send-email-wei.liu2@citrix.com>

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@citrix.com>
---
 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@lists.xen.org
https://lists.xen.org/xen-devel

  parent reply	other threads:[~2016-08-04  8:46 UTC|newest]

Thread overview: 53+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-04  8:45 [OSSTEST PATCH RFC 00/14] Integrate XTF into OSSTest Wei Liu
2016-08-04  8:45 ` [OSSTEST PATCH RFC 01/14] ts-xen-build: always compile in FEP support Wei Liu
2016-08-04 11:46   ` Ian Jackson
2016-08-04 11:49     ` Wei Liu
2016-08-04 11:53     ` Andrew Cooper
2016-08-04 12:03       ` Wei Liu
2016-08-04 13:28         ` Andrew Cooper
2016-08-04 14:03           ` Wei Liu
2016-08-04 14:08             ` Andrew Cooper
2016-08-04 15:22             ` Ian Jackson
2016-08-04 15:26               ` Wei Liu
2016-08-04 15:36                 ` Ian Jackson
2016-08-04  8:45 ` Wei Liu [this message]
2016-08-04 11:47   ` [OSSTEST PATCH RFC 02/14] TestSupport: factor out target_jobdir_subdir Ian Jackson
2016-08-04  8:45 ` [OSSTEST PATCH RFC 03/14] DO NOT APPLY ts-leak-check: sleep 5 seconds before collecting stuff Wei Liu
2016-08-04  8:45 ` [OSSTEST PATCH RFC 04/14] ap-common: add xtf tree Wei Liu
2016-08-04 11:49   ` Ian Jackson
2016-08-04 13:34     ` Andrew Cooper
2016-08-04 15:21       ` Ian Jackson
2016-08-04 15:43         ` Andrew Cooper
2016-08-04 16:13           ` Ian Jackson
2016-08-04 18:20             ` Andrew Cooper
2016-08-04 14:06     ` Wei Liu
2016-08-04  8:45 ` [OSSTEST PATCH RFC 05/14] DO NOT APPLY point xtf to my personal tree Wei Liu
2016-08-04  8:45 ` [OSSTEST PATCH RFC 06/14] Introduce ts-xtf-build Wei Liu
2016-08-04 11:52   ` Ian Jackson
2016-08-04 11:57     ` Wei Liu
2016-08-04 15:04       ` Ian Jackson
2016-08-04 15:17   ` [OSSTEST PATCH RFC 06/14] Introduce ts-xtf-build [and 1 more messages] Ian Jackson
2016-08-04 15:35     ` Wei Liu
2016-08-04 16:05       ` Ian Jackson
2016-08-04 18:10         ` Andrew Cooper
2016-08-04 18:12           ` Ian Jackson
2016-08-04  8:45 ` [OSSTEST PATCH RFC 07/14] sg-run-job: create xtf build recipe Wei Liu
2016-08-04 11:53   ` Ian Jackson
2016-08-04  8:45 ` [OSSTEST PATCH RFC 08/14] Introduce ts-xtf-install Wei Liu
2016-08-04 11:54   ` Ian Jackson
2016-08-04 11:58     ` Wei Liu
2016-08-04  8:45 ` [OSSTEST PATCH RFC 09/14] mfi-common: create xtf build job for 4.8 onwards Wei Liu
2016-08-04 11:59   ` Ian Jackson
2016-08-04 14:12     ` Wei Liu
2016-08-04  8:45 ` [OSSTEST PATCH RFC 10/14] Introduce ts-xtf-fep Wei Liu
2016-08-04 12:00   ` Ian Jackson
2016-08-04 12:03     ` Wei Liu
2016-08-04  8:45 ` [OSSTEST PATCH RFC 11/14] Introduce ts-xtf-run Wei Liu
2016-08-04 12:19   ` Ian Jackson
2016-08-04 14:40     ` Wei Liu
2016-08-04 15:31       ` Ian Jackson
2016-08-04  8:45 ` [OSSTEST PATCH RFC 12/14] sg-run-job: test-xtf recipe Wei Liu
2016-08-04 12:20   ` Ian Jackson
2016-08-04  8:45 ` [OSSTEST PATCH RFC 13/14] make-flight: create 5 xtf jobs Wei Liu
2016-08-04 12:24   ` Ian Jackson
2016-08-04  8:46 ` [OSSTEST PATCH RFC 14/14] Create XTF branch Wei Liu

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=1470300360-4435-3-git-send-email-wei.liu2@citrix.com \
    --to=wei.liu2@citrix.com \
    --cc=ian.jackson@eu.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).