@cryptotaxi247 / kubo / commits / 04a3a66c6

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.

Juan Batiz-Benet committed Mar 2, 2015 at 07:40 UTC 04a3a66c6ca59a32b707de620a92c8e0ec9aa341
1 file changed +1
test/sharness/lib/test-lib.sh
+1
@@ -136,6 +136,7 @@ test_init_ipfs() {
136 # Using RANDOM like this is clearly wrong-- it samples with replacement
137 # and it doesnt even check the port is unused. this is a trivial stop gap
138 # until the proper solution is implemented.
139 + RANDOM=$$
140 PORT_API=$((RANDOM % 3000 + 5100))
141 ADDR_API="/ip4/127.0.0.1/tcp/$PORT_API"
142