annotate tests/example.py @ 22:f6c3f91af7f2

add something with a default value
author Jeff Hammel <jhammel@mozilla.com>
date Mon, 26 Mar 2012 14:51:44 -0700
parents cadc9514f60a
children 73e72a764c3a
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'],
19
cadc9514f60a we have a legitimately failing test!
Jeff Hammel <jhammel@mozilla.com>
parents: 14
diff changeset
13 'help': 'path to firefox'},
cadc9514f60a we have a legitimately failing test!
Jeff Hammel <jhammel@mozilla.com>
parents: 14
diff changeset
14 'develop': {'help': "useful for running tests on a developer machine. Creates a local webserver and doesn't upload to the graph servers.",
cadc9514f60a we have a legitimately failing test!
Jeff Hammel <jhammel@mozilla.com>
parents: 14
diff changeset
15 'type': bool}
22
f6c3f91af7f2 add something with a default value
Jeff Hammel <jhammel@mozilla.com>
parents: 19
diff changeset
16 'test_timeout': {'type': int,
f6c3f91af7f2 add something with a default value
Jeff Hammel <jhammel@mozilla.com>
parents: 19
diff changeset
17 'help': "Time to wait for the browser to output to the log file",
f6c3f91af7f2 add something with a default value
Jeff Hammel <jhammel@mozilla.com>
parents: 19
diff changeset
18 'default': 1200},
3
1175fbabacaf more stubbing
Jeff Hammel <jhammel@mozilla.com>
parents: 0
diff changeset
19 }
1175fbabacaf more stubbing
Jeff Hammel <jhammel@mozilla.com>
parents: 0
diff changeset
20
1175fbabacaf more stubbing
Jeff Hammel <jhammel@mozilla.com>
parents: 0
diff changeset
21 if __name__ == '__main__':
19
cadc9514f60a we have a legitimately failing test!
Jeff Hammel <jhammel@mozilla.com>
parents: 14
diff changeset
22 options, args = ExampleConfiguration().parse()
cadc9514f60a we have a legitimately failing test!
Jeff Hammel <jhammel@mozilla.com>
parents: 14
diff changeset
23