HomePhabricator

Merge #17497: test: skip tests when utils haven't been compiled

Description

Merge #17497: test: skip tests when utils haven't been compiled

Summary:

a67352161c68fea9764cc31aff199f112d8572c6 test: skip tool_wallet test when bitcoin-wallet isn't compiled (fanquake)
e9277baed64e1d4054a102e40b39a9aed7839c2f test: skip wallet_listreceivedby test when the cli isn't compiled (fanquake)
621d398750d9f5ce3e7ec75ccb160b3534dcc436 test: skip bitcoin_cli test when the cli isn't compiled (fanquake)

Pull request description:

  Don't try and run the `interface_bitcoin_cli.py` test when `bitcoin-cli` isn't available.

  ```bash
  stdout:
  2019-11-17T01:51:41.623000Z TestFramework (INFO): Initializing test directory /var/folders/z2/cn877pxd3czdfh47mfkmbwgm0000gn/T/test_runner_₿_🏃_20191116_205141/interface_bitcoin_cli_0
  2019-11-17T01:51:41.890000Z TestFramework (ERROR): Unexpected exception caught during testing
  Traceback (most recent call last):
    File "/Users/michael/github/bitcoin/test/functional/test_framework/test_framework.py", line 111, in main
      self.run_test()
    File "/Users/michael/github/bitcoin/test/functional/interface_bitcoin_cli.py", line 18, in run_test
      cli_response = self.nodes[0].cli("-version").send_cli()
    File "/Users/michael/github/bitcoin/test/functional/test_framework/test_node.py", line 528, in send_cli
      process = subprocess.Popen(p_args, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE, universal_newlines=True)
    File "/Users/michael/.pyenv/versions/3.5.6/lib/python3.5/subprocess.py", line 676, in __init__
      restore_signals, start_new_session)
    File "/Users/michael/.pyenv/versions/3.5.6/lib/python3.5/subprocess.py", line 1289, in _execute_child
      raise child_exception_type(errno_num, err_msg)
  FileNotFoundError: [Errno 2] No such file or directory: '/Users/michael/github/bitcoin/src/bitcoin-cli'
  ```

Top commit has no ACKs.

Tree-SHA512: de27513a615d9d21271a0948e012c3209351e7374efd19bfa1bb9cda77e8fffe15d99e3424e4dbfa8cf826084f8af1670726f4703bd2b6093e7d37df4bea64f0

Backport of Core PR17497

Test Plan:

ninja && test_runner.py

cmake -GNinja -DBUILD_BITCOIN_CLI=OFF -DBUILD_BITCOIN_WALLET=OFF ..
ninja && test_runner.py interface_bitcoin_cli tool_wallet wallet_listreceivedby   # should be skipped

Reviewers: #bitcoin_abc, deadalnix

Reviewed By: #bitcoin_abc, deadalnix

Subscribers: deadalnix

Differential Revision: https://reviews.bitcoinabc.org/D5789

Details

Provenance
MarcoFalke <falke.marco@gmail.com>Authored on Nov 19 2019, 15:11
jasonbcoxCommitted on Apr 22 2020, 21:13
nakihitoPushed on Apr 22 2020, 21:49
Reviewer
Restricted Project
Differential Revision
D5789: Merge #17497: test: skip tests when utils haven't been compiled
Parents
rSTAGING69616da09d8b: refactor: test/bench: dedup Build{Crediting,Spending}Transaction()
Branches
Unknown
Tags
Unknown