comparison contrib/check-code.py @ 31816:2a865df042b7

check-code: update test IP address enforcement checks Instead of mentioning 127.0.0.1, we should use $LOCALIP. Anytime $LOCALIP appears in output, we should make sure we use (glob) on that line of output so that weird environments that do remapping jiggery pokery (such as our FreeBSD buildbot that's in a jail) don't get spurious test failures.
author Augie Fackler <augie@google.com>
date Mon, 03 Apr 2017 18:58:00 -0400
parents 0e4f70f63aaa
children 4804644489cf
comparison
equal deleted inserted replaced
31815:7937dabb5447 31816:2a865df042b7
188 (r'^ moving \S+/.*[^)]$', winglobmsg), 188 (r'^ moving \S+/.*[^)]$', winglobmsg),
189 (r'^ no changes made to subrepo since.*/.*[^)]$', winglobmsg), 189 (r'^ no changes made to subrepo since.*/.*[^)]$', winglobmsg),
190 (r'^ .*: largefile \S+ not available from file:.*/.*[^)]$', winglobmsg), 190 (r'^ .*: largefile \S+ not available from file:.*/.*[^)]$', winglobmsg),
191 (r'^ .*file://\$TESTTMP', 191 (r'^ .*file://\$TESTTMP',
192 'write "file:/*/$TESTTMP" + (glob) to match on windows too'), 192 'write "file:/*/$TESTTMP" + (glob) to match on windows too'),
193 (r'^ [^$>].*27\.0\.0\.1.*[^)]$', 193 (r'^ [^$>].*27\.0\.0\.1',
194 'use (glob) to match localhost IP on hosts without 127.0.0.1 too'), 194 'use $LOCALIP not an explicit loopback address'),
195 (r'^ [^$>].*\$LOCALIP.*[^)]$',
196 'mark $LOCALIP output lines with (glob) to help tests in BSD jails'),
195 (r'^ (cat|find): .*: No such file or directory', 197 (r'^ (cat|find): .*: No such file or directory',
196 'use test -f to test for file existence'), 198 'use test -f to test for file existence'),
197 (r'^ diff -[^ -]*p', 199 (r'^ diff -[^ -]*p',
198 "don't use (external) diff with -p for portability"), 200 "don't use (external) diff with -p for portability"),
199 (r'^ [-+][-+][-+] .* [-+]0000 \(glob\)', 201 (r'^ [-+][-+][-+] .* [-+]0000 \(glob\)',