annotate tests/example.py @ 17:a78ab14ae376

separate thing to add options to its own function
author Jeff Hammel <jhammel@mozilla.com>
date Mon, 26 Mar 2012 12:04:49 -0700
parents 12162afcd78f
children cadc9514f60a
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
Jeff Hammel <jhammel@mozilla.com>
parents:
diff changeset
1 from configuration import Configuration
Jeff Hammel <jhammel@mozilla.com>
parents:
diff changeset
2
Jeff Hammel <jhammel@mozilla.com>
parents:
diff changeset
3 class ExampleConfiguration(Configuration):
Jeff Hammel <jhammel@mozilla.com>
parents:
diff changeset
4 """example configuration instance"""
3
1175fbabacaf more stubbing
Jeff Hammel <jhammel@mozilla.com>
parents: 0
diff changeset
5 options = {
1175fbabacaf more stubbing
Jeff Hammel <jhammel@mozilla.com>
parents: 0
diff changeset
6 'activeTests': {'type': list,
1175fbabacaf more stubbing
Jeff Hammel <jhammel@mozilla.com>
parents: 0
diff changeset
7 'required': "No tests specified; please specify --activeTests",
1175fbabacaf more stubbing
Jeff Hammel <jhammel@mozilla.com>
parents: 0
diff changeset
8 'help': 'Specify tests to run',
1175fbabacaf more stubbing
Jeff Hammel <jhammel@mozilla.com>
parents: 0
diff changeset
9 'flags': ['-a', '--activeTests']}, # command line flags
1175fbabacaf more stubbing
Jeff Hammel <jhammel@mozilla.com>
parents: 0
diff changeset
10 'title': {'help': 'talos run title'},
1175fbabacaf more stubbing
Jeff Hammel <jhammel@mozilla.com>
parents: 0
diff changeset
11 'browser_path': {'required': True,
1175fbabacaf more stubbing
Jeff Hammel <jhammel@mozilla.com>
parents: 0
diff changeset
12 'flags': ['-e', '--executablePath'],
1175fbabacaf more stubbing
Jeff Hammel <jhammel@mozilla.com>
parents: 0
diff changeset
13 'help': 'path to firefox'}
1175fbabacaf more stubbing
Jeff Hammel <jhammel@mozilla.com>
parents: 0
diff changeset
14 }
1175fbabacaf more stubbing
Jeff Hammel <jhammel@mozilla.com>
parents: 0
diff changeset
15
1175fbabacaf more stubbing
Jeff Hammel <jhammel@mozilla.com>
parents: 0
diff changeset
16 if __name__ == '__main__':
4
92e1b2dd60c8 more stubbing
Jeff Hammel <jhammel@mozilla.com>
parents: 3
diff changeset
17 parser = ExampleConfiguration().parser()
14
12162afcd78f bug fixes
Jeff Hammel <jhammel@mozilla.com>
parents: 11
diff changeset
18 parser.parse_args()