提交 04a3a66c 作者: Juan Batiz-Benet

sharness/testlib: seed RANDOM

this is ugly. ideally would seed using date, but unclear
what a portable datetime is. date '+%s' doesnt work on osx.
上级 25f042ce
......@@ -136,6 +136,7 @@ test_init_ipfs() {
# Using RANDOM like this is clearly wrong-- it samples with replacement
# and it doesnt even check the port is unused. this is a trivial stop gap
# until the proper solution is implemented.
RANDOM=$$
PORT_API=$((RANDOM % 3000 + 5100))
ADDR_API="/ip4/127.0.0.1/tcp/$PORT_API"
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论