blob: a2a1b509d962deecda1ac1ef8aba6b3cea498a2b [file] [log] [blame]
Mike Truty2b2cafc2010-04-05 14:30:15 -07001#!/usr/bin/python
2#
3# Copyright 2010 Google Inc. All Rights Reserved.
4"""
5This allows a site to customize the test creation attributes.
6
7"""
8
9
10import common, re
11
12
13def _set_attributes_custom(test, data):
14 # We set the test name to the dirname of the control file.
15 test_new_name = test.path.split('/')
16 if test_new_name[-1] == 'control' or test_new_name[-1] == 'control.srv':
17 test.name = test_new_name[-2]
18 else:
19 control_name = "%s:%s"
20 control_name %= (test_new_name[-2],
21 test_new_name[-1])
22 test.name = re.sub('control.*\.', '', control_name)
23
24 # We set verify to always False (0).
25 test.run_verify = 0