Merge ~nteodosio/update-manager:lint-at-build-time into update-manager:main

Proposed by Nathan Teodosio
Status: Merged
Approved by: Sebastien Bacher
Approved revision: c92172bdbf56c865ef2b03848ba3212673d84df8
Merged at revision: cd13ff5475224cb803e1e6f2d5fea7f3a76b98dd
Proposed branch: ~nteodosio/update-manager:lint-at-build-time
Merge into: update-manager:main
Diff against target: 31 lines (+7/-0)
2 files modified
debian/control (+2/-0)
debian/rules (+5/-0)
Reviewer Review Type Date Requested Status
Sebastien Bacher Needs Information
Review via email: mp+452934@code.launchpad.net

Description of the change

They are run as autopkgtests but are easy to miss, as was the case of version 1:22.04.14.

So I'd like to propose to run them during build time.

To post a comment you must log in.
Revision history for this message
Sebastien Bacher (seb128) wrote :

Thanks, that would have helped us to catch the error earlier than after upload/review from the SRU team/waiting on autopkgtest results

One small note, shouldn't we call dh_auto_test in the override section still? It's currently not doing anything but this way if tests get added to the upstream build in a way that dh_auto_test would pick then we would be have them included in the package build?

review: Needs Information
Revision history for this message
Nathan Teodosio (nteodosio) wrote :

True, amended, thanks!

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/debian/control b/debian/control
2index c481028..a75dbe8 100644
3--- a/debian/control
4+++ b/debian/control
5@@ -6,11 +6,13 @@ Build-Depends: debhelper (>= 9),
6 dh-python,
7 gir1.2-gtk-3.0,
8 gir1.2-snapd-2,
9+ pycodestyle,
10 python3-all (>= 3.3.0-2),
11 python3-dbus,
12 python3-distro-info,
13 python3-distupgrade,
14 python3-distutils-extra (>= 2.38),
15+ pyflakes3,
16 python3-gi (>= 3.8),
17 python3-yaml,
18 Build-Depends-Indep: intltool,
19diff --git a/debian/rules b/debian/rules
20index eb62e51..42eb584 100755
21--- a/debian/rules
22+++ b/debian/rules
23@@ -4,3 +4,8 @@ export PYBUILD_INTERPRETERS=python3
24
25 %:
26 dh $@ --with=python3 --buildsystem=pybuild
27+
28+override_dh_auto_test:
29+ python3 ./tests/test_pyflakes.py
30+ python3 ./tests/test_pycodestyle.py
31+ dh_auto_test

Subscribers

People subscribed via source and target branches