projects
/
paraslash.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b865ea3
)
test-lib: Fix a bash-4.4 issue.
author
Andre Noll
<maan@tuebingen.mpg.de>
Sun, 25 Sep 2016 13:56:43 +0000
(15:56 +0200)
committer
Andre Noll
<maan@tuebingen.mpg.de>
Tue, 4 Oct 2016 08:56:36 +0000
(10:56 +0200)
Apparently bash-4.4 changed how unquoted here strings are treated.
We want to process only the first line of the output, so the right
thing to do is to ask awk to exit after processing the first line.
This works regardless of the bash version.
t/test-lib.sh
patch
|
blob
|
history
diff --git
a/t/test-lib.sh
b/t/test-lib.sh
index 99e575d3b66d0f54e9746647eee1af4eba84fa2c..1f9913e3cf9ba49b4cb76cc5b985d914cb527b69 100644
(file)
--- a/
t/test-lib.sh
+++ b/
t/test-lib.sh
@@
-156,7
+156,7
@@
test_require_executables()
test_duration()
{
local t=$(exec 2>&1 1>/dev/null; time -p "$@")
- result=$(awk '{print $2 * 1000
}' <<< $t
)
+ result=$(awk '{print $2 * 1000
; exit 0}' <<< "$t"
)
}
test_expect_success()