×

Discussion Board

Results 1 to 5 of 5
  1. #1
    Super Contributor
    Join Date
    Mar 2003
    Location
    Espoo, Finland
    Posts
    976

    Where is parser (for code coverage)

    I'm trying to make figleaf code coverage tool work with S60 emulator. Now I got stuck at this line:

    Code:
    import parser
    From python 2.2.3 sources I found a folder "parser", which contains a C code project. Cannot drag and drop that to PyS60, won't help. The error messages are:

    Initial error:
    ImportError: No module named parser
    When copied parser.pyd from python 2.2 to "c:\resource" or "c:\system\libs" folder:
    SymbianError: [Errno -1] KErrNotFound
    I am guessing that first error means "parser" is not found at all and the second that the found parser(.pyd) is wrong format.

    Any suggestions how to get past this problem? I'm pretty sure (which means I didn't check, of course) that parser is really needed for figleaf. If I comment it away, then I wouldn't get any coverage info? Did I install .PYD in wrong way, can I regenerate it from C source code, can I download some functional version from somewhere?

    Worried,

    --jouni

  2. #2
    Super Contributor
    Join Date
    Oct 2007
    Location
    Deva, Romania
    Posts
    3,471

    Re: Where is parser (for code coverage)

    .pyd files have to be installed in C:\\sys\\bin. See this article.

  3. #3
    Super Contributor
    Join Date
    Mar 2003
    Location
    Espoo, Finland
    Posts
    976

    Re: Where is parser (for code coverage)

    Quote Originally Posted by bogdan.galiceanu View Post
    .pyd files have to be installed in C:\\sys\\bin. See this article.
    Thanx! Got new error message:
    return imp.load_dynamic(name, name+'pyd')
    SymbianError: [Errno -5] KErrNotSupported
    Progress

    In the meanwhile I tested last night that WITHOUT "import parser" there is no coverage data. It runs perfectly, but it just doesn't do anything.

    --jouni

  4. #4
    Nokia Developer Champion
    Join Date
    Feb 2008
    Location
    Ahmedabad, Gujarat, India
    Posts
    3,852

    Re: Where is parser (for code coverage)

    hi jouni
    if you want to install any py script as a lib module always install it as a lib file.
    moreover sorry for this request but can you explain in bit detail that what you want to do so that the forum can be more helpful to you.
    thanks

  5. #5
    Super Contributor
    Join Date
    Mar 2003
    Location
    Espoo, Finland
    Posts
    976

    Re: Where is parser (for code coverage)

    Quote Originally Posted by gaba88 View Post
    can you explain in bit detail that what you want to do so that the forum can be more helpful to you.
    I want to do Code Coverage measurement for a pys60 script. Emulator is ok, on-device would be nice.

    If something is worth coding at all, then it should be coded correctly. That's why I'm looking at static code analysis (pylint), code coverage (figleaf or coverage) and later automated testing (doctest or unittest or proctor) and automatically generated documentation (pydoxy?).

    Just got rid of Microsoft Vista and installed XP, will have to reinstall whole python environment at weekend.. This time I'll try to write a guide about lint, it's the most easy case of those above.

    With figleaf I'm really stuck. Options seem to be like a) find something else b) install C++ environment, study Open C and PIPS and port the parser.c for PyS60 or c) do something else from scratch.

    Most likely I'll do the option c, since it looks like being the most easy. Checked option "a" already, just to find out that also coverage.py requires parser.c. Guess they both do branch coverage, but I'll be happy with line coverage - as a starting point.

    Cheers,

    --jouni

Similar Threads

  1. kXML XML Parser versus Jsr172 API Parser
    By javame.developer in forum Mobile Java General
    Replies: 1
    Last Post: 2008-02-14, 20:23
  2. Streaming EDGE clip in GPRS coverage
    By zivs in forum Streaming and Video
    Replies: 0
    Last Post: 2006-08-22, 17:22
  3. Replies: 5
    Last Post: 2005-10-21, 12:38
  4. Replies: 2
    Last Post: 2003-11-10, 11:53
  5. Replies: 0
    Last Post: 2002-09-30, 15:54

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×