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>
This commit is contained in:
parent
1091e83e84
commit
51658498c4
11
tests/run.sh
11
tests/run.sh
|
@ -34,6 +34,13 @@ function num_cpus()
|
||||||
fi
|
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
|
while [ -n "$1" ]; do
|
||||||
case "$1" in
|
case "$1" in
|
||||||
--force)
|
--force)
|
||||||
|
@ -117,7 +124,7 @@ if [ -n "$SUBTESTS" ]; then
|
||||||
# selected tests only
|
# selected tests only
|
||||||
for s in $SUBTESTS; do
|
for s in $SUBTESTS; do
|
||||||
if [ -d "$top_srcdir/tests/ts/$s" ]; then
|
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
|
else
|
||||||
echo "Unknown test component '$s'"
|
echo "Unknown test component '$s'"
|
||||||
exit 1
|
exit 1
|
||||||
|
@ -129,7 +136,7 @@ else
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
comps=( $(find $top_srcdir/tests/ts/ -type f -perm /a+x -regex ".*/[^\.~]*") )
|
comps=( $(find_test_scripts "$top_srcdir/tests/ts") ) || exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -n "$EXCLUDETESTS" ]; then
|
if [ -n "$EXCLUDETESTS" ]; then
|
||||||
|
|
|
@ -32,7 +32,7 @@ for conf in $config_gen_dir/config-gen.d/*.conf; do
|
||||||
./configure $opts &> /dev/null
|
./configure $opts &> /dev/null
|
||||||
make -j &> /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
|
for b in $bins; do
|
||||||
libs=$(readelf --dynamic $b 2> /dev/null | \
|
libs=$(readelf --dynamic $b 2> /dev/null | \
|
||||||
awk '/NEEDED/ { print $5 }' | \
|
awk '/NEEDED/ { print $5 }' | \
|
||||||
|
|
|
@ -66,7 +66,7 @@ fi
|
||||||
ts_cd "$IMAGE_SRC"
|
ts_cd "$IMAGE_SRC"
|
||||||
|
|
||||||
ts_log "list checksums from original data"
|
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
|
echo >> $TS_OUTPUT
|
||||||
|
|
||||||
ts_log "create cramfs image"
|
ts_log "create cramfs image"
|
||||||
|
|
|
@ -70,7 +70,7 @@ remove_repeats()
|
||||||
cd $(git rev-parse --show-toplevel)
|
cd $(git rev-parse --show-toplevel)
|
||||||
|
|
||||||
for I in $(
|
for I in $(
|
||||||
find -path './autom4te.cache' -prune -o -path './.libs' -prune -o -name '*[[:alpha:]].[1-8]' -print
|
find . -type f -name '*[[:alpha:]].[1-8]' |grep -v "autom4te.cache\|\.libs/"
|
||||||
); do
|
); do
|
||||||
MAN_FILE=${I##*/}
|
MAN_FILE=${I##*/}
|
||||||
MAN_LIST[${MAN_FILE%%.[0-9]}]=1
|
MAN_LIST[${MAN_FILE%%.[0-9]}]=1
|
||||||
|
|
Loading…
Reference in New Issue