Page MenuHomePhabricator

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

Authored by jasonbcox on Apr 20 2020, 23:31.

Details

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

Diff Detail

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

Event Timeline

[Bot Message]
One or more PR numbers were detected in the summary.
Links to those PRs have been inserted into the summary for reference.

deadalnix requested changes to this revision.Apr 21 2020, 00:09
deadalnix added a subscriber: deadalnix.

Why not backport the whole PR?

This revision now requires changes to proceed.Apr 21 2020, 00:09

Why not backport the whole PR?

The skip_if_no_cli parts seem to have different test plans, so it's not clear why they were part of the original patch in the first place. This one in particular was a clear-cut case of "something is broken and this particular commit fixes it". The rest could come later.

But since this review was blocked, I have more time to do the rest, so I guess I'll just update it..

Added remainder of the backport

jasonbcox retitled this revision from test: skip bitcoin_cli test when the cli isn't compiled to Merge #17497: test: skip tests when utils haven't been compiled.Apr 22 2020, 19:02
jasonbcox edited the summary of this revision. (Show Details)
jasonbcox edited the test plan for this revision. (Show Details)
This revision is now accepted and ready to land.Apr 22 2020, 20:16