# HG changeset patch # User Jun Wu # Date 1490583437 25200 # Node ID 6a2959acae1ab9e4cb187cebc4ca34b130056b04 # Parent e6fd7930cf0b37710e379de37b7d87d5c1ea5dc9 runtests: change local IP glob pattern from "127.0.0.1" to "$LOCALIP" This is similar to what 348b2b9da703 does. Since 636cf3f7620d has changed "127.0.0.1" to "$LOCALIP". The glob pattern needs update accordingly. It is expected to fix tests running in some BSD jails. diff -r e6fd7930cf0b -r 6a2959acae1a contrib/check-code.py --- a/contrib/check-code.py Mon Mar 27 16:00:47 2017 +0200 +++ b/contrib/check-code.py Sun Mar 26 19:57:17 2017 -0700 @@ -210,8 +210,8 @@ ], # warnings [ - (r'^ (?!.*127\.0\.0\.1)[^*?/\n]* \(glob\)$', - "glob match with no glob string (?, *, /, and 127.0.0.1)"), + (r'^ (?!.*\$LOCALIP)[^*?/\n]* \(glob\)$', + "glob match with no glob string (?, *, /, and $LOCALIP)"), ] ] diff -r e6fd7930cf0b -r 6a2959acae1a tests/run-tests.py --- a/tests/run-tests.py Mon Mar 27 16:00:47 2017 +0200 +++ b/tests/run-tests.py Sun Mar 26 19:57:17 2017 -0700 @@ -1034,7 +1034,7 @@ re.compile(br'^pulling from \$TESTTMP/.*[^)]$'), # Not all platforms have 127.0.0.1 as loopback (though most do), # so we always glob that too. - re.compile(br'.*127.0.0.1.*$'), + re.compile(br'.*\$LOCALIP.*$'), ] bchr = chr @@ -1342,7 +1342,7 @@ return True return b'-glob' return True - el = el.replace(b'127.0.0.1', b'*') + el = el.replace(b'$LOCALIP', b'*') i, n = 0, len(el) res = b'' while i < n: diff -r e6fd7930cf0b -r 6a2959acae1a tests/test-run-tests.t --- a/tests/test-run-tests.t Mon Mar 27 16:00:47 2017 +0200 +++ b/tests/test-run-tests.t Sun Mar 26 19:57:17 2017 -0700 @@ -735,9 +735,11 @@ $ rm -f test-glob-backslash.t -Test globbing of 127.0.0.1 +Test globbing of local IP addresses $ echo 172.16.18.1 - 127.0.0.1 (glob) + $LOCALIP (glob) + $ echo dead:beef::1 + $LOCALIP (glob) Test reusability for third party tools ======================================