Update of /cvsroot/monetdb/MonetDB4/src/mapi/Tests
In directory 
sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv27922/MonetDB4/src/mapi/Tests

Added Files:
        manyMapiClients.MIL.py 
Removed Files:
        manyMapiClients.MAPI.py 
Log Message:

- To prepare for (arbitrary-)executable tests that expect a MAL server to be 
started by Mtest.py,
  we rename the (arbitrary-)executable tests that expect a MIL server to be 
started by Mtest.py
  from
        <tst>.MAPI(|.(bat|cmd|exe|com|py))
  to
        <tst>.MIL(|.(bat|cmd|exe|com|py))


- To avoid naming-conflicts between (arbitrary-)executable (Unix-) tests
        <tst>.(MIL|MAL|SQL)
  and "normal" MIL/MAL/SQL tests
        <tst>.(mil|mal|sql)
  on case-insensitive file systems,
  we now require an explicite ".sh" extension for the former, i.e.,
        <tst>.(MIL|MAL|SQL|XQUERY).sh
  which also better aligns them with there Windows pendants
        <tst>.(MIL|MAL|SQL|XQUERY).bat

  To limit the required renaming-orgie, we still allow
  (arbitrary) executable tests that do not require any server
  to be named only by there name (on Unix), and keep the ".sh"
  extension optional in these cases:
  Windows: <tst>.(bat|cmd|exe|com)
  Unix:    <tst>[.sh]


--- NEW FILE: manyMapiClients.MIL.py ---
import sys
import os
import popen2

try:
    pOut,pIn = popen2.popen2('monetdb-clients-config --pkgdatadir')
    pIn.close()
    pdd = pOut.readlines()[0]
    pdd = pdd.strip()
    pOut.close()
    sys.path.append(os.path.join(pdd,'python'))
except:
    pass

import Mapi


def main(argv) :

    STDOUT = sys.stdout
    STDERR = sys.stderr

    n = 1234

    STDOUT.write("\n# %d Mapi-Client connections\n\n" % n)
    STDERR.write("\n# %d Mapi-Client connections\n\n" % n)

    i=0
    while i < n:
        i = i + 1
        STDOUT.write("%d:\n" % i)
        STDERR.write("%d:\n" % i)

        s = Mapi.server( "localhost", int(os.environ['MAPIPORT']), 'Mtest.py')
        print( s.cmd( "print(%d);\n" % i ) )
        s.disconnect()
    STDOUT.write("done: %d\n" % i)

### main(argv) #


if __name__ == "__main__":
    if '--trace' in sys.argv:
        sys.argv.remove('--trace')
        import trace
        t = trace.Trace(trace=1, count=0)
        t.runfunc(main, sys.argv)
    else:
        main(sys.argv)

--- manyMapiClients.MAPI.py DELETED ---


-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
Monetdb-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-checkins

Reply via email to