summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorRuediger Meier2016-02-17 13:03:11 +0100
committerRuediger Meier2016-02-18 12:53:47 +0100
commit51658498c41f46950b6a418589b371c8ae8c09da (patch)
treed1fbd0552656e5ed8e499971cc107c3a587c19a5 /tests
parenttravis: minor cleanup (diff)
downloadkernel-qcow2-util-linux-51658498c41f46950b6a418589b371c8ae8c09da.tar.gz
kernel-qcow2-util-linux-51658498c41f46950b6a418589b371c8ae8c09da.tar.xz
kernel-qcow2-util-linux-51658498c41f46950b6a418589b371c8ae8c09da.zip
build-sys: portable usage of find command
- use dot instead of skipping search-path - avoid -perm /a+x - avoid -path Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
Diffstat (limited to 'tests')
-rwxr-xr-xtests/run.sh11
-rwxr-xr-xtests/ts/build-sys/config2
-rwxr-xr-xtests/ts/cramfs/mkfs2
3 files changed, 11 insertions, 4 deletions
diff --git a/tests/run.sh b/tests/run.sh
index dca9c6c54..03cd9f5c2 100755
--- a/tests/run.sh
+++ b/tests/run.sh
@@ -34,6 +34,13 @@ function num_cpus()
fi
}
+function find_test_scripts()
+{
+ local searchdir="$1"
+ find "$searchdir" -type f -regex ".*/[^\.~]*" \
+ \( -perm -u=x -o -perm -g=x -o -perm -o=x \)
+}
+
while [ -n "$1" ]; do
case "$1" in
--force)
@@ -117,7 +124,7 @@ if [ -n "$SUBTESTS" ]; then
# selected tests only
for s in $SUBTESTS; do
if [ -d "$top_srcdir/tests/ts/$s" ]; then
- comps+=( $(find $top_srcdir/tests/ts/$s -type f -perm /a+x -regex ".*/[^\.~]*") )
+ comps+=( $(find_test_scripts "$top_srcdir/tests/ts/$s") ) || exit 1
else
echo "Unknown test component '$s'"
exit 1
@@ -129,7 +136,7 @@ else
exit 1
fi
- comps=( $(find $top_srcdir/tests/ts/ -type f -perm /a+x -regex ".*/[^\.~]*") )
+ comps=( $(find_test_scripts "$top_srcdir/tests/ts") ) || exit 1
fi
if [ -n "$EXCLUDETESTS" ]; then
diff --git a/tests/ts/build-sys/config b/tests/ts/build-sys/config
index 15b355103..bc48c509d 100755
--- a/tests/ts/build-sys/config
+++ b/tests/ts/build-sys/config
@@ -32,7 +32,7 @@ for conf in $config_gen_dir/config-gen.d/*.conf; do
./configure $opts &> /dev/null
make -j &> /dev/null
- bins=$(find . -type f -perm /a+x | sort)
+ bins=$(find . -type f \( -perm -u=x -o -perm -g=x -o -perm -o=x \) | sort)
for b in $bins; do
libs=$(readelf --dynamic $b 2> /dev/null | \
awk '/NEEDED/ { print $5 }' | \
diff --git a/tests/ts/cramfs/mkfs b/tests/ts/cramfs/mkfs
index 78e5c1764..07f703f67 100755
--- a/tests/ts/cramfs/mkfs
+++ b/tests/ts/cramfs/mkfs
@@ -66,7 +66,7 @@ fi
ts_cd "$IMAGE_SRC"
ts_log "list checksums from original data"
-find -type f -exec md5sum {} \; | sort >> $TS_OUTPUT
+find . -type f -exec md5sum {} \; | sort >> $TS_OUTPUT
echo >> $TS_OUTPUT
ts_log "create cramfs image"