mirror of
git://git.code.sf.net/p/cdesktopenv/code
synced 2025-03-09 15:50:02 +00:00
tests/functions.sh: speed up a test
This commit is contained in:
parent
ceb77b136f
commit
f527706f6c
1 changed files with 3 additions and 3 deletions
|
@ -37,6 +37,7 @@ read -n4 c < $0 2> /dev/null
|
||||||
ulimit -c 0
|
ulimit -c 0
|
||||||
|
|
||||||
binecho=$(whence -p echo)
|
binecho=$(whence -p echo)
|
||||||
|
bin_sleep=$(whence -p sleep)
|
||||||
|
|
||||||
integer foo=33
|
integer foo=33
|
||||||
bar=bye
|
bar=bye
|
||||||
|
@ -1120,13 +1121,12 @@ function foo
|
||||||
bar=bam
|
bar=bam
|
||||||
foo
|
foo
|
||||||
|
|
||||||
sleep=$(whence -p sleep)
|
|
||||||
function gosleep
|
function gosleep
|
||||||
{
|
{
|
||||||
$sleep 4
|
"$bin_sleep" 1
|
||||||
}
|
}
|
||||||
x=$(
|
x=$(
|
||||||
(sleep 2; pid=; ps | grep sleep | read pid extra; [[ $pid ]] && kill -- $pid) &
|
(sleep .25; pid=; ps | grep sleep | read pid extra; [[ $pid ]] && kill -- "$pid") &
|
||||||
gosleep 2> /dev/null
|
gosleep 2> /dev/null
|
||||||
print ok
|
print ok
|
||||||
)
|
)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue