projects
/
systemd
/
.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
569c6fd
)
test: introduce inst_recursive() helper function
author
Yu Watanabe
<watanabe.yu+github@gmail.com>
Tue, 14 Jun 2022 00:11:00 +0000
(09:11 +0900)
committer
Yu Watanabe
<watanabe.yu+github@gmail.com>
Tue, 14 Jun 2022 11:59:32 +0000
(20:59 +0900)
test/test-functions
patch
|
blob
|
history
diff --git
a/test/test-functions
b/test/test-functions
index ddf0f36ec38dc4ba5cecf2d65b1c13cc6f28bf48..f81afbe021c268b09823f15e5205a4a744817d8a 100644
(file)
--- a/
test/test-functions
+++ b/
test/test-functions
@@
-2630,6
+2630,20
@@
inst_any() {
return 1
}
+inst_recursive() {
+ local p item
+
+ for p in "$@"; do
+ while read -r item; do
+ if [[ -d "$item" ]]; then
+ inst_dir "$item"
+ elif [[ -f "$item" ]]; then
+ inst_simple "$item"
+ fi
+ done < <(find "$p" 2>/dev/null)
+ done
+}
+
# image_install [-o ] <file> [<file> ... ]
# Install <file> to the test image
# -o optionally install the <file> and don't fail, if it is not there