annotate tests/example.py @ 100:aa5c663dd8b7

remove obselete comment
author Jeff Hammel <jhammel@mozilla.com>
date Mon, 30 Apr 2012 13:06:03 -0700
parents 490687e70723
children c530f6265deb
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
23
73e72a764c3a fix bool parser, i hope
Jeff Hammel <jhammel@mozilla.com>
parents: 22
diff changeset
1 #!/usr/bin/env python
73e72a764c3a fix bool parser, i hope
Jeff Hammel <jhammel@mozilla.com>
parents: 22
diff changeset
2
0
Jeff Hammel <jhammel@mozilla.com>
parents:
diff changeset
3 from configuration import Configuration
Jeff Hammel <jhammel@mozilla.com>
parents:
diff changeset
4
Jeff Hammel <jhammel@mozilla.com>
parents:
diff changeset
5 class ExampleConfiguration(Configuration):
Jeff Hammel <jhammel@mozilla.com>
parents:
diff changeset
6 """example configuration instance"""
3
1175fbabacaf more stubbing
Jeff Hammel <jhammel@mozilla.com>
parents: 0
diff changeset
7 options = {
1175fbabacaf more stubbing
Jeff Hammel <jhammel@mozilla.com>
parents: 0
diff changeset
8 'activeTests': {'type': list,
1175fbabacaf more stubbing
Jeff Hammel <jhammel@mozilla.com>
parents: 0
diff changeset
9 'required': "No tests specified; please specify --activeTests",
1175fbabacaf more stubbing
Jeff Hammel <jhammel@mozilla.com>
parents: 0
diff changeset
10 'help': 'Specify tests to run',
1175fbabacaf more stubbing
Jeff Hammel <jhammel@mozilla.com>
parents: 0
diff changeset
11 'flags': ['-a', '--activeTests']}, # command line flags
1175fbabacaf more stubbing
Jeff Hammel <jhammel@mozilla.com>
parents: 0
diff changeset
12 'title': {'help': 'talos run title'},
1175fbabacaf more stubbing
Jeff Hammel <jhammel@mozilla.com>
parents: 0
diff changeset
13 'browser_path': {'required': True,
1175fbabacaf more stubbing
Jeff Hammel <jhammel@mozilla.com>
parents: 0
diff changeset
14 'flags': ['-e', '--executablePath'],
19
cadc9514f60a we have a legitimately failing test!
Jeff Hammel <jhammel@mozilla.com>
parents: 14
diff changeset
15 'help': 'path to firefox'},
cadc9514f60a we have a legitimately failing test!
Jeff Hammel <jhammel@mozilla.com>
parents: 14
diff changeset
16 'develop': {'help': "useful for running tests on a developer machine. Creates a local webserver and doesn't upload to the graph servers.",
23
73e72a764c3a fix bool parser, i hope
Jeff Hammel <jhammel@mozilla.com>
parents: 22
diff changeset
17 'type': bool},
69
92c11cd1d27e now we check for types more betterer
Jeff Hammel <jhammel@mozilla.com>
parents: 64
diff changeset
18 'test_timeout': {'help': "Time to wait for the browser to output to the log file",
22
f6c3f91af7f2 add something with a default value
Jeff Hammel <jhammel@mozilla.com>
parents: 19
diff changeset
19 'default': 1200},
82
490687e70723 add a dict parser thingy
Jeff Hammel <jhammel@mozilla.com>
parents: 69
diff changeset
20 'preferences': {'type': dict,
490687e70723 add a dict parser thingy
Jeff Hammel <jhammel@mozilla.com>
parents: 69
diff changeset
21 'flags': ['-p', '--pref']}
3
1175fbabacaf more stubbing
Jeff Hammel <jhammel@mozilla.com>
parents: 0
diff changeset
22 }
1175fbabacaf more stubbing
Jeff Hammel <jhammel@mozilla.com>
parents: 0
diff changeset
23
1175fbabacaf more stubbing
Jeff Hammel <jhammel@mozilla.com>
parents: 0
diff changeset
24 if __name__ == '__main__':
64
a8013bd3126a minor bug fixes
Jeff Hammel <jhammel@mozilla.com>
parents: 23
diff changeset
25 from pprint import pprint
a8013bd3126a minor bug fixes
Jeff Hammel <jhammel@mozilla.com>
parents: 23
diff changeset
26 options, args = ExampleConfiguration().parse_args()
a8013bd3126a minor bug fixes
Jeff Hammel <jhammel@mozilla.com>
parents: 23
diff changeset
27 pprint(options.__dict__)