ci: [refactor] Move run_unit_tests to ci-windows-cross.py
What changed, and why it matters
This change simply moves existing Windows unit-test commands out of a GitHub workflow file and into a Python helper script. It is a pure code reorganization with no visible security relevance.
No security action needed; treat as routine CI refactoring.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The commit refactors CI logic: the inline shell block that ran Windows unit tests in .github/workflows/ci.yml is replaced by a call to a new run_unit_tests() function in .github/ci-windows-cross.py. The exact same test binaries and arguments are preserved, including the sequential execution comment. No build products, dependencies, permissions, or execution semantics are changed.
Changed components
.github/ci-windows-cross.py.github/workflows/ci.ymlInspect captured patch +20 / −9
diff --git a/.github/ci-windows-cross.py b/.github/ci-windows-cross.py
index 9b59f2a2..13ca3b49 100755
--- a/.github/ci-windows-cross.py
+++ b/.github/ci-windows-cross.py
@@ -116,12 +116,29 @@ def run_functional_tests():
run(cmd_feature_unsupported_db)
+def run_unit_tests():
+ # Can't use ctest here like other jobs as we don't have a CMake build tree.
+ commands = [
+ ["./bin/test_bitcoin-qt.exe"],
+ # Intentionally run sequentially here, to catch test case failures caused by dirty global state from prior test cases:
+ ["./bin/test_bitcoin.exe", "-l", "test_suite"],
+ ["./src/secp256k1/bin/exhaustive_tests.exe"],
+ ["./src/secp256k1/bin/noverify_tests.exe"],
+ ["./src/secp256k1/bin/tests.exe"],
+ ["./src/univalue/object.exe"],
+ ["./src/univalue/unitester.exe"],
+ ]
+ for cmd in commands:
+ run(cmd)
+
+
def main():
parser = argparse.ArgumentParser(description="Utility to run Windows CI steps.")
steps = [
"print_version",
"check_manifests",
"prepare_tests",
+ "run_unit_tests",
"run_functional_tests",
]
parser.add_argument("step", choices=steps, help="CI step to perform.")
@@ -138,6 +155,8 @@ def main():
check_manifests()
elif args.step == "prepare_tests":
prepare_tests()
+ elif args.step == "run_unit_tests":
+ run_unit_tests()
elif args.step == "run_functional_tests":
run_functional_tests()
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index c821999e..c86832b4 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -415,15 +415,7 @@ jobs:
run: py -3 .github/ci-windows-cross.py check_manifests
- name: Run unit tests
- # Can't use ctest here like other jobs as we don't have a CMake build tree.
- run: |
- ./bin/test_bitcoin-qt.exe
- ./bin/test_bitcoin.exe -l test_suite # Intentionally run sequentially here, to catch test case failures caused by dirty global state from prior test cases.
- ./src/secp256k1/bin/exhaustive_tests.exe
- ./src/secp256k1/bin/noverify_tests.exe
- ./src/secp256k1/bin/tests.exe
- ./src/univalue/object.exe
- ./src/univalue/unitester.exe
+ run: py -3 .github/ci-windows-cross.py run_unit_tests
- name: Prepare Windows test environment
run: |
Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.