Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • Trac Trac
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Issues 246
    • Issues 246
    • List
    • Boards
    • Service Desk
    • Milestones
  • Monitor
    • Monitor
    • Metrics
    • Incidents
  • Analytics
    • Analytics
    • Value stream
  • Wiki
    • Wiki
  • Activity
  • Create a new issue
  • Issue Boards
Collapse sidebar
  • Legacy
  • TracTrac
  • Issues
  • #7795

Closed
Open
Created Dec 25, 2012 by Arturo Filasto@art

Problems in cmd line argument parsing when importing test template modules

When importing test template modules inside of an ooniprobe nettest (that means doing from ooni.template.httpt import HTTPTest) command line argument parsing will not work as expected.

The problem lies in the fact that inside of runner.py if a certain test isTestCase (that is it's a subclass of NetTest) we will call processTest on it. processTest will do command line argument parsing and since that object does not have the proper usageOptions set it will fail to parse the command line arguments of the actual test.

The quick and easy workaround it to simply not import the test class directly, but just import the module (that means doing from ooni.template import httpt).

The long term solution probably involves finding a way to distinguish a test template from a subclass of it.

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking