| Index: utils/site_test_importer_attributes.py
|
| diff --git a/utils/site_test_importer_attributes.py b/utils/site_test_importer_attributes.py
|
| new file mode 100755
|
| index 0000000000000000000000000000000000000000..a2a1b509d962deecda1ac1ef8aba6b3cea498a2b
|
| --- /dev/null
|
| +++ b/utils/site_test_importer_attributes.py
|
| @@ -0,0 +1,25 @@
|
| +#!/usr/bin/python
|
| +#
|
| +# Copyright 2010 Google Inc. All Rights Reserved.
|
| +"""
|
| +This allows a site to customize the test creation attributes.
|
| +
|
| +"""
|
| +
|
| +
|
| +import common, re
|
| +
|
| +
|
| +def _set_attributes_custom(test, data):
|
| + # We set the test name to the dirname of the control file.
|
| + test_new_name = test.path.split('/')
|
| + if test_new_name[-1] == 'control' or test_new_name[-1] == 'control.srv':
|
| + test.name = test_new_name[-2]
|
| + else:
|
| + control_name = "%s:%s"
|
| + control_name %= (test_new_name[-2],
|
| + test_new_name[-1])
|
| + test.name = re.sub('control.*\.', '', control_name)
|
| +
|
| + # We set verify to always False (0).
|
| + test.run_verify = 0
|
|
|