File: Mark-lint-checks-as-part-of-a-suite.patch

package info (click to toggle)
totem 43.2-3
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 14,356 kB
  • sloc: ansic: 30,058; python: 964; makefile: 222; xml: 221; sh: 157
file content (55 lines) | stat: -rw-r--r-- 2,099 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
From: Simon McVittie <smcv@debian.org>
Date: Tue, 22 Oct 2024 21:34:42 +0100
Subject: Mark lint checks as part of a suite

It's common for new versions of a lint tool to change behaviour in ways
that cause previously valid source to be rejected, so OS distributions
often won't want to run them at build-time to avoid build regressions.
By marking pylint and other lint checks with a suite, OS distributors
can avoid them by running `meson test --no-suite=lint`.

Signed-off-by: Simon McVittie <smcv@debian.org>
Forwarded: https://gitlab.gnome.org/GNOME/totem/-/merge_requests/395
---
 src/plugins/opensubtitles/meson.build | 1 +
 src/plugins/pythonconsole/meson.build | 1 +
 src/plugins/samplepython/meson.build  | 6 +++++-
 3 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/src/plugins/opensubtitles/meson.build b/src/plugins/opensubtitles/meson.build
index e47681b..f9e5888 100644
--- a/src/plugins/opensubtitles/meson.build
+++ b/src/plugins/opensubtitles/meson.build
@@ -44,5 +44,6 @@ if pylint.found()
        pylint,
        args: pylint_flags + files([ plugin_name + '.py', 'hash.py' ]),
        env: nomalloc,
+       suite: ['lint'],
        timeout: 120)
 endif
diff --git a/src/plugins/pythonconsole/meson.build b/src/plugins/pythonconsole/meson.build
index 4c33077..c215220 100644
--- a/src/plugins/pythonconsole/meson.build
+++ b/src/plugins/pythonconsole/meson.build
@@ -43,5 +43,6 @@ if pylint.found()
        pylint,
        args: pylint_flags + files([ plugin_name + '.py', 'console.py' ]),
        env: nomalloc,
+       suite: ['lint'],
        timeout: 120)
 endif
diff --git a/src/plugins/samplepython/meson.build b/src/plugins/samplepython/meson.build
index 40b1b10..3a5c7be 100644
--- a/src/plugins/samplepython/meson.build
+++ b/src/plugins/samplepython/meson.build
@@ -18,5 +18,9 @@ if plugin_install
 endif
 
 if pylint.found()
-  test('pylint-' + plugin_name, pylint, args: pylint_flags + files([ plugin_name + '.py' ]))
+  test('pylint-' + plugin_name,
+    pylint,
+    args: pylint_flags + files([ plugin_name + '.py' ]),
+    suite: ['lint'],
+  )
 endif