Page MenuHomePhabricator

[electrum] fix return type handling of transaction.deserialize in trezor and keepkey plugins
ClosedPublic

Authored by PiRK on Sep 19 2023, 08:47.

Details

Summary

This is broken since D14470 (not released yet).

Depends on D14502

Test Plan

python test_runner.py

Send a transaction with a trezor device

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

PiRK requested review of this revision.Sep 19 2023, 08:47

Tail of the build log:

-- Configuring native build in /work/abc-ci-builds/electrum-tests/native
-- Configuring done
-- Generating done
-- Build files have been written to: /work/abc-ci-builds/electrum-tests
[1/2] link test_runner.py
[2/2] Run Electrum ABC unit tests...
FAILED: electrum/CMakeFiles/check-electrum 
cd /work/abc-ci-builds/electrum-tests/electrum && /usr/bin/python3.9 ./test_runner.py
[secp256k1] warning: libsecp256k1 library failed to load
Testing `setup.py --version`: OK

[ecc] info: libsecp256k1 library not available, falling back to python-ecdsa. This means signing operations will be slower. Try running:

  $  contrib/make_secp

(You need to be running from the git sources for contrib/make_secp to be available)
.........................................................................................................127.0.0.1 - - [19/Sep/2023 08:48:43] "GET /invoice HTTP/1.1" 503 -
.127.0.0.1 - - [19/Sep/2023 08:48:43] "GET / HTTP/1.1" 200 -
.127.0.0.1 - - [19/Sep/2023 08:48:43] "GET /invoice HTTP/1.1" 200 -
127.0.0.1 - - [19/Sep/2023 08:48:43] "POST /pay HTTP/1.1" 200 -
.127.0.0.1 - - [19/Sep/2023 08:48:44] "GET / HTTP/1.1" 200 -
.s..................Traceback (most recent call last):
  File "/work/electrum/electrumabc_plugins/trezor/trezor.py", line 29, in <module>
    import trezorlib
ModuleNotFoundError: No module named 'trezorlib'
................................................................................................................s.........sss......................................s.s.EE
======================================================================
ERROR: electrumabc_plugins.keepkey.tests.test_keepkey (unittest.loader._FailedTest)
----------------------------------------------------------------------
ImportError: Failed to import test module: electrumabc_plugins.keepkey.tests.test_keepkey
Traceback (most recent call last):
  File "/usr/lib/python3.9/unittest/loader.py", line 436, in _find_test_path
    module = self._get_module_from_name(name)
  File "/usr/lib/python3.9/unittest/loader.py", line 377, in _get_module_from_name
    __import__(name)
  File "/work/electrum/electrumabc_plugins/keepkey/tests/test_keepkey.py", line 3, in <module>
    import keepkeylib
ModuleNotFoundError: No module named 'keepkeylib'


======================================================================
ERROR: electrumabc_plugins.trezor.tests.test_trezor (unittest.loader._FailedTest)
----------------------------------------------------------------------
ImportError: Failed to import test module: electrumabc_plugins.trezor.tests.test_trezor
Traceback (most recent call last):
  File "/usr/lib/python3.9/unittest/loader.py", line 436, in _find_test_path
    module = self._get_module_from_name(name)
  File "/usr/lib/python3.9/unittest/loader.py", line 377, in _get_module_from_name
    __import__(name)
  File "/work/electrum/electrumabc_plugins/trezor/tests/test_trezor.py", line 3, in <module>
    from trezorlib.messages import TransactionType, TxInputType, TxOutputBinType
ModuleNotFoundError: No module named 'trezorlib'


----------------------------------------------------------------------
Ran 293 tests in 10.504s

FAILED (errors=2, skipped=7)
ninja: build stopped: cannot make progress due to previous errors.
Build electrum-tests failed with exit code 1
PiRK planned changes to this revision.Sep 19 2023, 08:51

I need to install hardware requirements on CI

install requirement-hw on CI

The build failed due to an unexpected infrastructure outage. The administrators have been notified to investigate. Sorry for the inconvenience.

add libpcsclite1 to required packages for installing hardware dependencies on debian

The build failed due to an unexpected infrastructure outage. The administrators have been notified to investigate. Sorry for the inconvenience.
The build failed due to an unexpected infrastructure outage. The administrators have been notified to investigate. Sorry for the inconvenience.
This revision is now accepted and ready to land.Sep 19 2023, 12:07