summaryrefslogtreecommitdiff
path: root/devel/ice/files/patch-py-test-Ice-info-AllTests.py
diff options
context:
space:
mode:
authorMatthias Andree <mandree@FreeBSD.org>2014-01-09 01:57:20 +0000
committerMatthias Andree <mandree@FreeBSD.org>2014-01-09 01:57:20 +0000
commit35717bde57f174079aca7b413f3f04576e86fdd1 (patch)
tree3949c3a70930dbf0a4a925df2f214886b4bd20cf /devel/ice/files/patch-py-test-Ice-info-AllTests.py
parentAdd LIBOWN and LIBGRP to uidfix (diff)
Overhaul devel/ice, devel/py-ice and devel/php5-ice:
Changes from [*]: - Update Ice to 3.5.1. - Stageify all three ports. - Convert py-ice and php5-ice to slave ports. - Use ICONV_LIB, so it builds ok with native iconv [1]. - Workaround for FreeBSD 10's static destructor order disaster [2]. - Install man pages. - Allow package build for non-root users. [1] http://www.freebsd.org/doc/en_US.ISO8859-1/books/porters-handbook/using-iconv.html [2] http://lists.freebsd.org/pipermail/freebsd-ports/2013-June/084580.html Changes from [3]: - Convert LIB_DEPENDS to new syntax. - USE_GMAKE -> USES - list Berkeley DB 6 invalid, requires upstream changes, but upstream is loathe to make those due to licensing change in BDB - remove BDB 2 and 3 from invalid listing, we no longer have these ports PR: ports/184453 [*] PR: ports/185569 [3] Submitted by: Michael Gmelin (maintainer) [*] Submitted by: mandree [3] Approved by: Michael Gmelin (maintainer) [3]
Notes
Notes: svn path=/head/; revision=339196
Diffstat (limited to 'devel/ice/files/patch-py-test-Ice-info-AllTests.py')
-rw-r--r--devel/ice/files/patch-py-test-Ice-info-AllTests.py79
1 files changed, 79 insertions, 0 deletions
diff --git a/devel/ice/files/patch-py-test-Ice-info-AllTests.py b/devel/ice/files/patch-py-test-Ice-info-AllTests.py
new file mode 100644
index 000000000000..5c04fe28227f
--- /dev/null
+++ b/devel/ice/files/patch-py-test-Ice-info-AllTests.py
@@ -0,0 +1,79 @@
+--- py/test/Ice/info/AllTests.py.orig 2013-03-11 15:19:47.000000000 +0000
++++ py/test/Ice/info/AllTests.py 2013-05-20 14:25:56.860196743 +0000
+@@ -7,12 +7,31 @@
+ #
+ # **********************************************************************
+
+-import Ice, Test, sys, threading
++import Ice, Test, sys, threading, subprocess
+
+ def test(b):
+ if not b:
+ raise RuntimeError('test assertion failed')
+
++def isFreeBSD():
++ return sys.platform.startswith("freebsd")
++
++def sysctl(key):
++ p = subprocess.Popen("sysctl "+key, shell=1, stdout=subprocess.PIPE)
++ try:
++ result = p.communicate()[0].strip().split()[1]
++ except IndexError:
++ return 0
++ if sys.version_info >= (3,):
++ result = str(result, sys.stdout.encoding)
++ try:
++ return int(result)
++ except ValueError:
++ return result
++
++def isFreeBSDJail():
++ return isFreeBSD() and sysctl("security.jail.jailed")
++
+ def allTests(communicator, collocated):
+ sys.stdout.write("testing proxy endpoint information... ")
+ sys.stdout.flush()
+@@ -67,12 +86,12 @@
+
+ ipEndpoint = endpoints[0].getInfo()
+ test(ipEndpoint.type() == Ice.TCPEndpointType or ipEndpoint.type() == 2)
+- test(ipEndpoint.host == defaultHost)
++ test(ipEndpoint.host == defaultHost or isFreeBSDJail())
+ test(ipEndpoint.port > 0)
+ test(ipEndpoint.timeout == 15000)
+
+ udpEndpoint = endpoints[1].getInfo()
+- test(udpEndpoint.host == defaultHost)
++ test(udpEndpoint.host == defaultHost or isFreeBSDJail())
+ test(udpEndpoint.datagram())
+ test(udpEndpoint.port > 0)
+
+@@ -108,7 +127,7 @@
+ ipinfo = base.ice_getConnection().getEndpoint().getInfo()
+ test(ipinfo.port == 12010)
+ test(not ipinfo.compress)
+- test(ipinfo.host == defaultHost)
++ test(ipinfo.host == defaultHost or isFreeBSDJail())
+
+ ctx = testIntf.getEndpointInfoAsContext()
+ test(ctx["host"] == ipinfo.host)
+@@ -118,7 +137,7 @@
+
+ udp = base.ice_datagram().ice_getConnection().getEndpoint().getInfo()
+ test(udp.port == 12010)
+- test(udp.host == defaultHost)
++ test(udp.host == defaultHost or isFreeBSDJail())
+
+ print("ok")
+
+@@ -129,8 +148,8 @@
+ test(not info.incoming)
+ test(len(info.adapterName) == 0)
+ test(info.remotePort == 12010)
+- test(info.remoteAddress == defaultHost)
+- test(info.localAddress == defaultHost)
++ test(info.remoteAddress == defaultHost or isFreeBSDJail())
++ test(info.localAddress == defaultHost or isFreeBSDJail())
+
+ ctx = testIntf.getConnectionInfoAsContext()
+ test(ctx["incoming"] == "true")