Update of /cvsroot/monetdb/pathfinder/tests/BugTracker/Tests
In directory
23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv22418/tests/BugTracker/Tests
Added Files:
port_busy.SF-1809586.py
Log Message:
propagated changes of Friday Jul 31 2009
from the May2009 branch to the development trunk
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2009/07/31 - sjoerd: tests/BugTracker/Tests/port_busy.SF-1809586.py,1.1.2.1
Added test, but no correct stable output yet.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
--- NEW FILE: port_busy.SF-1809586.py ---
import os, sys, socket
try:
import subprocess
except ImportError:
# user private copy for old Python versions
import MonetDBtesting.subprocess26 as subprocess
def prog(cmd, input = None):
clt = subprocess.Popen(cmd,
stdin = subprocess.PIPE,
stdout = subprocess.PIPE,
stderr = subprocess.PIPE,
universal_newlines = True,
shell = type(cmd) == type(''))
out, err = clt.communicate(input)
sys.stdout.write(out)
sys.stderr.write(err)
def main():
mserver = os.getenv('MSERVER')
# test mapi and pathfinder modules with MAPIPORT busy
port = os.getenv('MAPIPORT')
if port:
port = int(port)
else:
port = 50001
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.bind(('', port))
prog(mserver + ' "--dbinit=module(mapi);"', 'print(1);\n')
prog(mserver + ' "--dbinit=module(pathfinder);"', 'print(1);\n')
s.close()
# test mapi and pathfinder modules with XRPCPORT busy
port = os.getenv('XRPCPORT')
if port:
port = int(port)
else:
port = 50001
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.bind(('', port))
prog(mserver + ' "--dbinit=module(mapi);"', 'print(1);\n')
prog(mserver + ' "--dbinit=module(pathfinder);"', 'print(1);\n')
s.close()
main()
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now. http://p.sf.net/sfu/bobj-july
_______________________________________________
Monetdb-pf-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-pf-checkins