mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-28 03:27:44 +00:00
maint/util ~ remove extra/redundant factor tests for 'debug' builds
- avoids "Terminated" timeout errors when using longer running 'debug' `factor`
This commit is contained in:
parent
0af2c9bafb
commit
d6424bb354
1 changed files with 28 additions and 9 deletions
|
@ -70,19 +70,38 @@ sed -i 's|^"\$@|/usr/bin/timeout 600 "\$@|' build-aux/test-driver
|
||||||
sed -i "s/^[[:blank:]]*PATH=.*/ PATH='${UU_BUILD_DIR//\//\\/}\$(PATH_SEPARATOR)'\"\$\$PATH\" \\\/" Makefile
|
sed -i "s/^[[:blank:]]*PATH=.*/ PATH='${UU_BUILD_DIR//\//\\/}\$(PATH_SEPARATOR)'\"\$\$PATH\" \\\/" Makefile
|
||||||
sed -i 's| tr | /usr/bin/tr |' tests/init.sh
|
sed -i 's| tr | /usr/bin/tr |' tests/init.sh
|
||||||
make -j "$(nproc)"
|
make -j "$(nproc)"
|
||||||
# Generate the factor tests, so they can be fixed
|
first=00
|
||||||
# Used to be 36. Reduced to 20 to decrease the log size
|
if test ${UU_MAKE_PROFILE} != "debug"; then
|
||||||
for i in {00..20}; do
|
# Generate the factor tests, so they can be fixed
|
||||||
make "tests/factor/t${i}.sh"
|
# * reduced to 20 to decrease log size (down from 36 expected by GNU)
|
||||||
done
|
# * only for 'release', skipped for 'debug' as redundant and too time consuming (causing timeout errors)
|
||||||
|
seq=$(
|
||||||
# strip the long stuff
|
i=${first}
|
||||||
for i in {21..36}; do
|
while test "$i" -le 20; do
|
||||||
|
printf '%02d ' $i
|
||||||
|
i=$(($i + 1))
|
||||||
|
done
|
||||||
|
)
|
||||||
|
for i in ${seq}; do
|
||||||
|
make "tests/factor/t${i}.sh"
|
||||||
|
done
|
||||||
|
sed -i -e 's|^seq |/usr/bin/seq |' -e 's|sha1sum |/usr/bin/sha1sum |' tests/factor/t*sh
|
||||||
|
first=21
|
||||||
|
fi
|
||||||
|
# strip all (debug) or just the longer (release) factor tests from Makefile
|
||||||
|
seq=$(
|
||||||
|
i=${first}
|
||||||
|
while test "$i" -le 36; do
|
||||||
|
printf '%02d ' $i
|
||||||
|
i=$(($i + 1))
|
||||||
|
done
|
||||||
|
)
|
||||||
|
for i in ${seq}; do
|
||||||
|
echo "strip t${i}.sh from Makefile"
|
||||||
sed -i -e "s/\$(tf)\/t${i}.sh//g" Makefile
|
sed -i -e "s/\$(tf)\/t${i}.sh//g" Makefile
|
||||||
done
|
done
|
||||||
|
|
||||||
grep -rl 'path_prepend_' tests/* | xargs sed -i 's| path_prepend_ ./src||'
|
grep -rl 'path_prepend_' tests/* | xargs sed -i 's| path_prepend_ ./src||'
|
||||||
sed -i -e 's|^seq |/usr/bin/seq |' -e 's|sha1sum |/usr/bin/sha1sum |' tests/factor/t*sh
|
|
||||||
|
|
||||||
# Remove tests checking for --version & --help
|
# Remove tests checking for --version & --help
|
||||||
# Not really interesting for us and logs are too big
|
# Not really interesting for us and logs are too big
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue