mirror of
https://sourceware.org/git/glibc.git
synced 2025-07-29 11:41:21 +03:00
Optimize scripts/merge-test-results.sh
The inner loop is called thousands of times per "make check" even if there's otherwise nothing to do. Avoid calling /bin/head all those times when a builtin will do. Reviewed-by: Carlos O'Donell <carlos@redhat.com>
This commit is contained in:
@ -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"
|
||||
else
|
||||
echo "UNRESOLVED: $subdir$t"
|
||||
fi
|
||||
|
Reference in New Issue
Block a user