Adapt system tests to work with modern BSD and MacOS
authorEric Radman <ericshane@eradman.com>
Thu, 6 Aug 2015 16:00:43 +0000 (12:00 -0400)
committerEric Radman <ericshane@eradman.com>
Thu, 6 Aug 2015 16:18:29 +0000 (12:18 -0400)
commit1b6db6c506cbed67fb4012a1217898a4b8e35252
tree43f939d992c661b59d421fdbe93e5d30e9ba04a1
parent898fe78eec334225c4789e1bc9bd1c19007adf43
Adapt system tests to work with modern BSD and MacOS

- Replace `seq a b` with {a..b}, and auto-upgrade to bash if shell does
  not support range expansion (DASH on Ubuntu)
- Replace ipfw with pf; (MacOS 10.7+, *BSD)
- Replace `echo -n` with `printf` (MacOS)
- Change to test directory before starting
- Provide aproximate compatibility between MacOS and Linux options for
  sed and nc
- Auto-populate userlist.txt

Tested on MacOS 10.10, Ubuntu 14, OpenBSD 5.7
test/test.sh