"make check" times

Andreas Schwab schwab@linux-m68k.org
Mon Oct 5 21:39:06 GMT 2020


On Okt 05 2020, DJ Delorie wrote:

> diff --git a/scripts/merge-test-results.sh b/scripts/merge-test-results.sh
> index 573a44d8cf..1e236db4a7 100755
> --- a/scripts/merge-test-results.sh
> +++ b/scripts/merge-test-results.sh
> @@ -35,7 +35,12 @@ case $type in
>      subdir=${subdir:+$subdir/}
>      for t in "$@"; do
>        if [ -s "$objpfx$t.test-result" ]; then
> -	head -n1 "$objpfx$t.test-result"
> +	# This loop is called thousands of times even when there's
> +	# nothing to do.  Avoid using non-built-in commands (like
> +	# /bin/head) where possible.  We assume "echo" is typically a
> +	# built-in.
> +	IFS= read -r line < "$objpfx$t.test-result"
> +	echo "$line"

If you want to avoid any interpretation you should use printf %s.

Andreas.

-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510  2552 DF73 E780 A9DA AEC1
"And now for something completely different."


More information about the Libc-alpha mailing list