~daisy-pluckers/error-tracker-deployment/trunk

« back to all changes in this revision

Viewing changes to test/fetch-test-crashes

  • Committer: Brian Murray
  • Date: 2019-08-09 00:29:37 UTC
  • Revision ID: brian@canonical.com-20190809002937-syc9wn5dzlffgsen
test/fetch-test-crashes: get eoan crashes, accept an arch as an argument

Show diffs side-by-side

added added

removed removed

Lines of Context:
39
39
    #'15.10' : 'wily',
40
40
    '16.04' : 'xenial',
41
41
    #'16.10' : 'yakkety',
42
 
    '17.04' : 'zesty',
43
 
    '17.10' : 'artful',
 
42
    #'17.04' : 'zesty',
 
43
    #'17.10' : 'artful',
44
44
    '18.04' : 'bionic',
45
45
    '18.10' : 'cosmic',
46
 
    '19.04' : 'disco'
 
46
    '19.04' : 'disco',
 
47
    '19.10' : 'eoan'
47
48
}
48
49
 
49
50
 
50
 
if len(sys.argv) == 2:
 
51
if len(sys.argv) >= 2:
51
52
    desired_release = sys.argv[1]
52
53
else:
53
54
    desired_release = None
 
55
if len(sys.argv) == 3:
 
56
    desired_arch = sys.argv[2]
 
57
else:
 
58
    desired_arch = None
54
59
 
55
60
for match in re.finditer('href="(apport-test-crashes_)([^_]+~)([a-z]+)([\d.]+)(_)(\S+)(\.deb)"', html):
56
61
    release = match.group(4)
62
67
        if release != desired_release:
63
68
            continue
64
69
    arch = match.group(6)
 
70
    if desired_arch:
 
71
        if arch != desired_arch:
 
72
            continue
65
73
    version = match.group(2) + match.group(5)
66
74
    file = ''.join(match.groups())
67
75
    try: