Skip to content
Bitcoin Roots

v29.4-roots.1 · Commit 8: [PATCH 08/13] ci: restore assurance and isolate Core fixtures

ci/test/test_gui_qrencode.py

Before: /dev/null · After: ci/test/test_gui_qrencode.py

File metadata
new file mode 100755
index 0000000000000000000000000000000000000000..ef04ba61e4003d4aa3118633ca366c3f7fb7776e

Download original patch · Release notes

Diff rows 1–38 of 38. Line numbers refer to the original before/after files.

+ Added− RemovedUnmarked lines are context.

Scroll the code area horizontally to read long lines. Before is on the left; after is on the right. Unified view fits narrow screens more easily.

ci/test/test_gui_qrencode.py ADDED
@@ -0,0 +1,38 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/usr/bin/env python3
2
+ # Copyright (c) 2026-present The Bitcoin Roots developers
3
+ # Distributed under the MIT software license, see the accompanying
4
+ # file COPYING or http://www.opensource.org/licenses/mit-license.php.
5
+
6
+ from pathlib import Path
7
+ import unittest
8
+
9
+
10
+ ROOT = Path(__file__).resolve().parents[2]
11
+ CI_ENV_DIR = ROOT / "ci/test"
12
+ WORKFLOW_DIR = ROOT / ".github/workflows"
13
+
14
+
15
+ class GuiQrencodeTest(unittest.TestCase):
16
+ def test_gui_ci_environments_require_qrencode(self):
17
+ gui_environments = []
18
+ for path in sorted(CI_ENV_DIR.glob("00_setup_env_*.sh")):
19
+ content = path.read_text(encoding="utf-8")
20
+ if "-DBUILD_GUI=ON" in content:
21
+ gui_environments.append(path)
22
+ self.assertIn("-DWITH_QRENCODE=ON", content, path)
23
+
24
+ self.assertTrue(gui_environments)
25
+
26
+ def test_direct_gui_workflow_builds_require_qrencode(self):
27
+ gui_commands = []
28
+ for path in sorted(WORKFLOW_DIR.glob("*.yml")):
29
+ for line_number, line in enumerate(path.read_text(encoding="utf-8").splitlines(), start=1):
30
+ if "cmake -B" in line and "-DBUILD_GUI=ON" in line:
31
+ gui_commands.append((path, line_number))
32
+ self.assertIn("-DWITH_QRENCODE=ON", line, f"{path}:{line_number}")
33
+
34
+ self.assertTrue(gui_commands)
35
+
36
+
37
+ if __name__ == "__main__":
38
+ unittest.main()