Merge ~fnordahl/ubuntu/+source/ovn:ubuntu/focal into ~ubuntu-server-dev/ubuntu/+source/ovn:ubuntu/focal

Proposed by Frode Nordahl
Status: Needs review
Proposed branch: ~fnordahl/ubuntu/+source/ovn:ubuntu/focal
Merge into: ~ubuntu-server-dev/ubuntu/+source/ovn:ubuntu/focal
Diff against target: 127 lines (+86/-2)
4 files modified
debian/changelog (+4/-2)
debian/flaky-tests.txt (+4/-0)
debian/rules (+6/-0)
debian/testlist.py (+72/-0)
Reviewer Review Type Date Requested Status
James Page Pending
Review via email: mp+427147@code.launchpad.net
To post a comment you must log in.

Unmerged commits

6d9e777... by Frode Nordahl

release package ovn 20.03.2-0ubuntu0.20.04.4

Signed-off-by: Frode Nordahl <email address hidden>

da487a1... by Frode Nordahl

debian: Determine testlist at build time

The test numbers in the generated autotools testsuite change
whenever upstream adds more tests or extends the test matrix.

Make the flaky test skiplist more robust by programatically
determine the test numbers from the descriptions at build time.

Signed-off-by: Frode Nordahl <email address hidden>
(cherry picked from commit b6cb0d4e1d88f123a20cbc65d841741e4584f5f1)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
diff --git a/debian/changelog b/debian/changelog
index 44ed514..e555d4b 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,4 +1,4 @@
1ovn (20.03.2-0ubuntu0.20.04.4) UNRELEASED; urgency=medium1ovn (20.03.2-0ubuntu0.20.04.4) focal; urgency=medium
22
3 * Adapt to changes made in previous OVS point release (LP: #1980213):3 * Adapt to changes made in previous OVS point release (LP: #1980213):
4 - d/control: Update required openvswitch build requirement.4 - d/control: Update required openvswitch build requirement.
@@ -8,8 +8,10 @@ ovn (20.03.2-0ubuntu0.20.04.4) UNRELEASED; urgency=medium
8 calling `ovn-ctl stop_controller`8 calling `ovn-ctl stop_controller`
9 - d/p/lp-1940043-0001-Provide-the-option-to-pin-ovn-controller-and-ovn-nor.patch9 - d/p/lp-1940043-0001-Provide-the-option-to-pin-ovn-controller-and-ovn-nor.patch
10 - d/p/lp-1940043-0002-controller-Allow-pinctrl-thread-to-handle-packet-ins.patch10 - d/p/lp-1940043-0002-controller-Allow-pinctrl-thread-to-handle-packet-ins.patch
11 * d/rules, d/testlist.py, d/flaky-tests.txt:
12 - Dynamically build list of tests to run from list of test descriptions.
1113
12 -- Frode Nordahl <frode.nordahl@canonical.com> Thu, 30 Jun 2022 09:50:14 +000014 -- Frode Nordahl <frode.nordahl@canonical.com> Wed, 20 Jul 2022 11:42:49 +0200
1315
14ovn (20.03.2-0ubuntu0.20.04.3) focal; urgency=medium16ovn (20.03.2-0ubuntu0.20.04.3) focal; urgency=medium
1517
diff --git a/debian/flaky-tests.txt b/debian/flaky-tests.txt
16new file mode 10064418new file mode 100644
index 0000000..2c1b0f4
--- /dev/null
+++ b/debian/flaky-tests.txt
@@ -0,0 +1,4 @@
1policy-based routing IPv6: 1 HVs, 3 LSs, 1 lport/LS, 1 LR
2ACLs on Port Groups
3multi-vtep SB Chassis encap updates
4ACL with Port Group conjunction flow efficiency
diff --git a/debian/rules b/debian/rules
index 9a528c1..cd3fb6d 100755
--- a/debian/rules
+++ b/debian/rules
@@ -30,6 +30,12 @@ override_dh_auto_configure:
30 --with-ovs-source=$(CURDIR)/ovs \30 --with-ovs-source=$(CURDIR)/ovs \
31 --enable-ssl31 --enable-ssl
3232
33# https://bugs.launchpad.net/ubuntu/+source/ovn/+bug/1956749
34TEST_LIST = $(shell \
35 $(CURDIR)/debian/testlist.py \
36 $(CURDIR)/debian/flaky-tests.txt \
37 $(CURDIR)/tests/testsuite)
38
33override_dh_auto_test:39override_dh_auto_test:
34ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))40ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
35 if $(MAKE) check TESTSUITEFLAGS='$(PARALLEL) $(TEST_LIST)' || \41 if $(MAKE) check TESTSUITEFLAGS='$(PARALLEL) $(TEST_LIST)' || \
diff --git a/debian/testlist.py b/debian/testlist.py
36new file mode 10075542new file mode 100755
index 0000000..24d2ae9
--- /dev/null
+++ b/debian/testlist.py
@@ -0,0 +1,72 @@
1#!/usr/bin/env python3
2import enum
3import itertools
4import os
5import sys
6
7
8if len(sys.argv) < 3:
9 print(
10 "usage: {} skipdescriptionlist testsuite\n"
11 "\n"
12 "This program reads two files, a skiplist containing the \n"
13 "description of tests to skip separated by newline, and a \n"
14 "generated testsuite script.\n"
15 "\n"
16 "From this it produces string with range of tests to execute \n"
17 "which can be provided to the testsuite script.\n".format(sys.argv[0]),
18 file=sys.stderr,
19 )
20 sys.exit(os.EX_USAGE)
21
22
23SKIP_TEST_STRINGS = []
24with open(sys.argv[1]) as fin:
25 SKIP_TEST_STRINGS = [line.rstrip() for line in fin.readlines()]
26
27
28@enum.unique
29class State(enum.Enum):
30 INIT = enum.auto()
31 AT_HELP_ALL = enum.auto()
32
33
34SKIP_TESTS = set()
35TESTS = set()
36with open(sys.argv[2]) as fin:
37 state = State.INIT
38 last_test = 0
39 for line in fin.readlines():
40 if state == State.INIT:
41 if not line.startswith('at_help_all="'):
42 continue
43 else:
44 state = State.AT_HELP_ALL
45 data = line.split('"')[1].rstrip().split(";")
46 elif state == State.AT_HELP_ALL:
47 if line.startswith('"'):
48 break
49 data = line.rstrip().split(";")
50 test_nr = int(data[0])
51 if last_test < test_nr:
52 last_test = test_nr
53 for skip_string in SKIP_TEST_STRINGS:
54 if skip_string in data[2]:
55 SKIP_TESTS.add(test_nr)
56 else:
57 TESTS.add(test_nr)
58
59
60def ranges(testlist):
61 for a, b in itertools.groupby(
62 enumerate(list(testlist)), lambda pair: pair[1] - pair[0]
63 ):
64 b = list(b)
65 yield b[0][1], b[-1][1]
66
67
68testranges = [
69 "{}-{}".format(testrange[0], testrange[1])
70 for testrange in ranges(TESTS - SKIP_TESTS)
71]
72print(" ".join(testranges))

Subscribers

People subscribed via source and target branches