|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH 1/6] osstest: introduce a helper to stash a whole directory
Without compressing it.
Signed-off-by: Roger Pau Monné <roger.pau@xxxxxxxxxx>
---
Osstest/TestSupport.pm | 19 ++++++++++++++++++-
1 file changed, 18 insertions(+), 1 deletion(-)
diff --git a/Osstest/TestSupport.pm b/Osstest/TestSupport.pm
index 334cc2cb..c6da5ee9 100644
--- a/Osstest/TestSupport.pm
+++ b/Osstest/TestSupport.pm
@@ -30,6 +30,7 @@ use Osstest;
use Osstest::Logtailer;
use File::Copy;
use File::Basename;
+use File::Path;
use IO::Handle;
use Carp;
use Digest::SHA;
@@ -90,7 +91,7 @@ BEGIN {
dir_identify_vcs
build_url_vcs build_clone
built_stash built_stash_file built_stash_debugfile
- built_compress_stashed
+ built_compress_stashed built_stash_dir
hg_dir_revision git_dir_revision vcs_dir_revision
store_revision store_vcs_revision
git_massage_url
@@ -1695,6 +1696,22 @@ sub built_stash_file ($$$$;$) {
store_runvar("path_$item", $stashleaf);
}
+sub built_stash_dir ($$$$;$) {
+ my ($ho, $builddir, $item, $dname, $optional) = @_;
+ my $files = target_cmd_output($ho, <<END, 300);
+cd $builddir/$dname
+find -L . -type f
+END
+
+ foreach my $file (split /\n/, $files) {
+ $file =~ s,^./,,;
+ my $stashleaf = "$stash/build/$item/$file";
+
+ mkpath(dirname($stashleaf));
+ target_getfile($ho, 300, "$builddir/$dname/$file", $stashleaf);
+ }
+ store_runvar("path_$item", "build/$item");
+}
sub built_compress_stashed($) {
my ($path) = @_;
--
2.17.2 (Apple Git-113)
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |