build: run swig python tests last
What changed, and why it matters
This commit is a build-system fix that changes the order in which automated tests run during 'make check'. It moves the Python wheel-building tests to run last, because building the Python wheel while other tests are running in parallel was causing test failures. There is no security-relevant code change here.
No security action needed. Treat as a normal build/test reliability improvement.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The change modifies src/Makefile.am to reorder check-local dependencies so that check-swig-python runs after check-libwallycore and check-swig-java. It also adds explicit dependencies (check-swig-python: check-libwallycore check-swig-java), removes the virtualenv before rebuilding it, and reorders some .PHONY declarations. These are purely build/test orchestration changes to fix parallel ‘make check’ reliability.
Changed components
src/Makefile.amInspect captured patch +23 / −23
diff --git a/src/Makefile.am b/src/Makefile.am
index 08abbc5..c73d3e4 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -295,9 +295,27 @@ test_elements_tx_LDADD += $(PYTHON_LIBS)
endif
endif
-check-local: check-libwallycore check-swig-python check-swig-java
+check-local: check-libwallycore check-swig-java check-swig-python
$(AM_V_at)! grep '^int ' $(top_srcdir)/include/*.h # Missing WALLY_CORE_API
+if RUN_JAVA_TESTS
+check-swig-java: $(SWIG_JAVA_TEST_DEPS) .libs/libwallycore.$(platform_dso_ext)
+ $(AM_V_at)! grep 'native int wally_' $(sjs)/$(cblw)/Wally.java # Unwrapped Java calls
+ $(AM_V_at)! grep 'native Object wally_' $(sjs)/$(cblw)/Wally.java # Unwrapped Java calls
+if BUILD_ELEMENTS
+ $(AM_V_at)$(JAVA_TEST)test_assets
+ $(AM_V_at)$(JAVA_TEST)test_elements_tx
+ $(AM_V_at)$(JAVA_TEST)test_pegs
+endif
+ $(AM_V_at)$(JAVA_TEST)test_bip32
+ $(AM_V_at)$(JAVA_TEST)test_descriptor
+ $(AM_V_at)$(JAVA_TEST)test_mnemonic
+ $(AM_V_at)$(JAVA_TEST)test_scripts
+ $(AM_V_at)$(JAVA_TEST)test_tx
+else # RUN_JAVA_TESTS
+check-swig-java: ;
+endif # RUN_JAVA_TESTS
+
if SHARED_BUILD_ENABLED
if RUN_PYTHON_TESTS
check-libwallycore: $(PYTHON_TEST_DEPS)
@@ -337,7 +355,8 @@ if BUILD_ELEMENTS
endif
if USE_SWIG_PYTHON
-check-swig-python:
+check-swig-python: check-libwallycore check-swig-java
+ $(AM_V_at)rm -rf $(top_builddir)/venv
$(AM_V_at)$(PYTHON) -m virtualenv $(top_builddir)/venv
$(AM_V_at)$(top_builddir)/venv/bin/python -m pip install $(top_srcdir)
$(AM_V_at)$(top_builddir)/venv/bin/python swig_python/contrib/aes.py
@@ -362,27 +381,8 @@ else # RUN_PYTHON_TESTS
check-libwallycore: ;
endif # RUN_PYTHON_TESTS
-if RUN_JAVA_TESTS
-check-swig-java: $(SWIG_JAVA_TEST_DEPS)
- $(AM_V_at)! grep 'native int wally_' $(sjs)/$(cblw)/Wally.java # Unwrapped Java calls
- $(AM_V_at)! grep 'native Object wally_' $(sjs)/$(cblw)/Wally.java # Unwrapped Java calls
-if BUILD_ELEMENTS
- $(AM_V_at)$(JAVA_TEST)test_assets
- $(AM_V_at)$(JAVA_TEST)test_elements_tx
- $(AM_V_at)$(JAVA_TEST)test_pegs
-endif
- $(AM_V_at)$(JAVA_TEST)test_bip32
- $(AM_V_at)$(JAVA_TEST)test_descriptor
- $(AM_V_at)$(JAVA_TEST)test_mnemonic
- $(AM_V_at)$(JAVA_TEST)test_scripts
- $(AM_V_at)$(JAVA_TEST)test_tx
-else # RUN_JAVA_TESTS
-check-swig-java: ;
-endif # RUN_JAVA_TESTS
-
endif # SHARED_BUILD_ENABLED
-.PHONY: check-libwallycore check-swig-python check-swig-java clean-swig-python clean-swig-java
+.PHONY: check-libwallycore check-swig-java check-swig-python clean-swig-java clean-swig-python
else # RUN_TESTS
-.PHONY: clean-swig-python clean-swig-java
+.PHONY: clean-swig-java clean-swig-python
endif # RUN_TESTS
-
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.