~pwlars/ubuntu-test-cases/krillin-recovery

« back to all changes in this revision

Viewing changes to jenkins/setup_jenkins.py

  • Committer: Andy Doan
  • Date: 2013-10-21 15:15:37 UTC
  • mfrom: (70.3.9 ptr)
  • Revision ID: andy.doan@canonical.com-20131021151537-blgx90slc3jlnamc
This change differentiates autopilot and UTAH written tests (when MEGA=1 is enabled). In the event of an autopilot test, we'll execute them with the new run-autopilot-tests.sh script (which will only deliver xUnit XML results).

This change includes job options to allow a user to selectively choose packages/ppas/tests to run. The gist of this change allows us to support the Lab Test Execution Service we've been planning.

Downsides: The qa-dashboard doesn't yet know how to parse xUnit XML, so for now this can only be used on our staging servers and not by our daily image testing.

Show diffs side-by-side

added added

removed removed

Lines of Context:
26
26
from distro_info import UbuntuDistroInfo
27
27
DEV_SERIES = UbuntuDistroInfo().devel()
28
28
 
 
29
import apconfig
 
30
 
29
31
DEFINE_MEGA = os.environ.get('MEGA', False)
30
32
 
31
33
DEF_FMT = '{prefix}{series}-touch_{imagetype}-{type}-smoke-{testname}'
32
34
 
33
 
Test = collections.namedtuple('Test', ['name', 'fmt'])
 
35
Test = collections.namedtuple('Test', ['name', 'fmt', 'ap'])
34
36
 
35
37
 
36
38
def _test(name, fmt=DEF_FMT):
37
 
    return Test(name, fmt)
 
39
    return Test(name, fmt, False)
 
40
 
 
41
 
 
42
def _ap_test(name):
 
43
    return Test(name, DEF_FMT, True)
38
44
 
39
45
 
40
46
TESTS = [
41
47
    _test('install-and-boot'),
42
48
    _test('default'),
43
 
    _test('mediaplayer-app-autopilot'),
44
 
    _test('gallery-app-autopilot'),
45
 
    _test('webbrowser-app-autopilot'),
46
 
    _test('unity8-autopilot'),
47
 
    _test('friends-app-autopilot'),
48
 
    _test('notes-app-autopilot'),
49
 
    _test('camera-app-autopilot'),
50
 
    _test('dialer-app-autopilot'),
51
 
    _test('messaging-app-autopilot'),
52
 
    _test('address-book-app-autopilot'),
53
 
    _test('calendar-app-autopilot'),
54
 
    _test('music-app-autopilot'),
55
 
    _test('ubuntu-calculator-app-autopilot'),
56
 
    _test('ubuntu-clock-app-autopilot'),
57
 
    _test('ubuntu-filemanager-app-autopilot'),
58
 
    _test('ubuntu-rssreader-app-autopilot'),
59
 
    _test('ubuntu-terminal-app-autopilot'),
60
 
    _test('ubuntu-weather-app-autopilot'),
61
 
    _test('ubuntu-ui-toolkit-autopilot'),
62
 
    _test('ubuntu-system-settings-online-accounts-autopilot'),
 
49
]
 
50
 
 
51
TESTS += [_ap_test(t.name) for t in apconfig.TESTSUITES]
 
52
 
 
53
TESTS += [
63
54
    _test('click_image_tests'),
64
 
    _test('dropping-letters-app-autopilot'),
65
55
    _test('sdk'),
66
56
    _test('security'),
67
57
    _test('eventstat',
155
145
    def _configure_jobs(instance, env, args, config_item, device, tests):
156
146
        name = device['name']
157
147
        device_type = name[:name.index("-")]
158
 
        defserial = '$(${BZRDIR}/scripts/get-adb-id ${NODE_NODE})'
 
148
        defserial = '$(${BZRDIR}/scripts/get-adb-id ${NODE_NAME})'
159
149
        fmt = 'http://system-image.ubuntu.com/devel-proposed/{}/index.json'
160
150
        trigger_url = fmt.format(device_type)
161
151
 
164
154
            'serial': device.get('serial', defserial),
165
155
            'publish': args.publish,
166
156
            'branch': args.branch,
167
 
            'tests': ' '.join([t.name for t in tests]),
 
157
            'tests': ' '.join([t.name for t in tests if not t.ap]),
168
158
            'trigger_url': trigger_url,
169
159
            'wait': args.wait,
170
160
            'imagetype': config_item['image-type'],