Merge branch 'es/perf-export-fix'
Dev-support fix for BSD. * es/perf-export-fix: t/perf: fix test_export() failure with BSD `sed`
This commit is contained in:
commit
d4187bd4d5
@ -148,13 +148,18 @@ test_run_perf_ () {
|
|||||||
. '"$TEST_DIRECTORY"/test-lib-functions.sh'
|
. '"$TEST_DIRECTORY"/test-lib-functions.sh'
|
||||||
test_export () {
|
test_export () {
|
||||||
[ $# != 0 ] || return 0
|
[ $# != 0 ] || return 0
|
||||||
test_export_="$test_export_\\|$1"
|
test_export_="$test_export_ $1"
|
||||||
shift
|
shift
|
||||||
test_export "$@"
|
test_export "$@"
|
||||||
}
|
}
|
||||||
'"$1"'
|
'"$1"'
|
||||||
ret=$?
|
ret=$?
|
||||||
set | sed -n "s'"/'/'\\\\''/g"';s/^\\($test_export_\\)/export '"'&'"'/p" >test_vars
|
needles=
|
||||||
|
for v in $test_export_
|
||||||
|
do
|
||||||
|
needles="$needles;s/^$v=/export $v=/p"
|
||||||
|
done
|
||||||
|
set | sed -n "s'"/'/'\\\\''/g"'$needles" >test_vars
|
||||||
exit $ret' >&3 2>&4
|
exit $ret' >&3 2>&4
|
||||||
eval_ret=$?
|
eval_ret=$?
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user