From: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
To: xen-devel@lists.xenproject.org, Ian.Jackson@eu.citrix.com
Cc: ross.lagerwall@citrix.com, Marcos.Matsunaga@oracle.com,
Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Subject: [PATCH v2 3/9] OssTest: Add target_dir_exists
Date: Tue, 13 Dec 2016 01:39:49 -0500 [thread overview]
Message-ID: <1481611195-105372-4-git-send-email-konrad.wilk@oracle.com> (raw)
In-Reply-To: <1481611195-105372-1-git-send-email-konrad.wilk@oracle.com>
We have target_file_exists but not an equivalant one for directories.
This adds it in and is used in the "ts-xen-build: Make {xen|}dist.tar.gz
only if $builddir/install/{$xen|}install" patch.
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
---
v2: New patch.
---
Osstest/TestSupport.pm | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/Osstest/TestSupport.pm b/Osstest/TestSupport.pm
index 2486320..9377af1 100644
--- a/Osstest/TestSupport.pm
+++ b/Osstest/TestSupport.pm
@@ -62,6 +62,7 @@ BEGIN {
target_put_guest_image target_editfile
target_editfile_cancel target_fetchurl
target_editfile_root target_file_exists
+ target_dir_exists
target_editfile_kvp_replace
target_run_apt
target_install_packages target_install_packages_norec
@@ -518,6 +519,14 @@ sub target_file_exists ($$) {
die "$rfile $out ?";
}
+sub target_dir_exists ($$) {
+ my ($ho,$rfile) = @_;
+ my $out= target_cmd_output($ho, "if test -d $rfile; then echo y; fi");
+ return 1 if $out =~ m/^y$/;
+ return 0 if $out !~ m/\S/;
+ die "$rfile $out ?";
+}
+
sub next_unique_name ($) {
my ($fnref) = @_;
my $num = $$fnref =~ s/\+([1-9]\d*)$// ? $1 : 0;
--
2.1.4
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
next prev parent reply other threads:[~2016-12-13 3:30 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-13 6:39 [PATCH v2] OSSTest test-harness for livepatches Konrad Rzeszutek Wilk
2016-12-13 6:39 ` [PATCH v2 1/9] OssTest: Add target_cmd_root_status which returns return code Konrad Rzeszutek Wilk
2016-12-13 16:20 ` Ian Jackson
2016-12-13 6:39 ` [PATCH v2 2/9] Osstest: Add target_cmd_output_root_status Konrad Rzeszutek Wilk
2016-12-13 16:23 ` Ian Jackson
2016-12-13 6:39 ` Konrad Rzeszutek Wilk [this message]
2016-12-13 16:24 ` [PATCH v2 3/9] OssTest: Add target_dir_exists Ian Jackson
2017-05-17 20:59 ` Konrad Rzeszutek Wilk
2017-05-18 16:50 ` Ian Jackson
2016-12-13 6:39 ` [PATCH v2 4/9] ts-xen-build: Make {xen|}dist.tar.gz only if $builddir/install/{$xen|}install Konrad Rzeszutek Wilk
2016-12-13 6:39 ` [PATCH v2 5/9] ts-xen-build: Enable livepatch Konrad Rzeszutek Wilk
2016-12-13 6:39 ` [PATCH v2 6/9] ts-xen-build: Build the livepatch test-cases Konrad Rzeszutek Wilk
2016-12-13 16:49 ` Ian Jackson
2017-05-18 0:07 ` Konrad Rzeszutek Wilk
2017-05-17 20:30 ` Konrad Rzeszutek Wilk
2017-05-18 16:41 ` Ian Jackson
2017-05-18 6:49 ` Konrad Rzeszutek Wilk
2017-05-18 16:47 ` Ian Jackson
2017-05-18 19:57 ` Konrad Rzeszutek Wilk
2016-12-13 6:39 ` [PATCH v2 7/9] ts-livepatch-[install|run]: Install and initial test-cases Konrad Rzeszutek Wilk
2016-12-13 17:08 ` Ian Jackson
2016-12-13 6:39 ` [PATCH v2 8/9] sg-run-job: Add the test-livepatch Konrad Rzeszutek Wilk
2016-12-13 17:08 ` Ian Jackson
2016-12-13 6:39 ` [PATCH v2 9/9] make-flight/mfi-common: Add livepatch build/test target in the matrix Konrad Rzeszutek Wilk
2016-12-13 16:14 ` Wei Liu
2016-12-13 16:44 ` 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=1481611195-105372-4-git-send-email-konrad.wilk@oracle.com \
--to=konrad.wilk@oracle.com \
--cc=Ian.Jackson@eu.citrix.com \
--cc=Marcos.Matsunaga@oracle.com \
--cc=ross.lagerwall@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).