~pwlars/ubuntu-test-cases/auto-offline-devices

« back to all changes in this revision

Viewing changes to jenkins/testconfig.py

  • Committer: paul.larson at canonical
  • Date: 2014-04-08 19:25:57 UTC
  • mto: This revision was merged to the branch mainline in revision 218.
  • Revision ID: paul.larson@canonical.com-20140408192557-x2q33m64o3occr4b
Add suspend-blocker test

Show diffs side-by-side

added added

removed removed

Lines of Context:
28
28
        self.smoke = fmt == DEF_FMT
29
29
 
30
30
 
 
31
class DevTest(Test):
 
32
    def __init__(self, name, device):
 
33
        Test.__init__(self, name, fmt=IDLE_FMT)
 
34
        self.device = device
 
35
 
 
36
 
31
37
class APTest(Test):
32
38
    def __init__(self, name, app=None, pkgs=None):
33
39
        Test.__init__(self, name)
81
87
]
82
88
 
83
89
 
84
 
def filter_tests(tests, image_type):
 
90
def filter_tests(tests, image_type, device_type=None):
85
91
    if image_type:
86
92
        func = globals().get('get_tests_%s' % image_type)
87
93
        if func:
89
95
        elif image_type not in ['touch', 'touch_custom_demo']:
90
96
            print('Unsupported image type: %s' % image_type)
91
97
            exit(1)
 
98
    if device_type:
 
99
        func = globals().get('get_tests_%s' % device_type)
 
100
        if func:
 
101
            tests = func(tests)
92
102
    return tests
93
103
 
94
104
 
123
133
    print(' '.join(pkgs))
124
134
 
125
135
 
 
136
def get_tests_mako(common_tests):
 
137
    tests = common_tests
 
138
    tests.extend([DevTest('suspend-blocker', 'mako-01')])
 
139
    return tests
 
140
 
 
141
 
126
142
def get_tests_touch_custom(common_tests):
127
143
    tests = common_tests
128
144
    tests.insert(1, Test('customizations'))