2

I'm getting acquainted with the functional testing suite in an attempt to become a bitcoin core developer.

I'm attempting to run a single test with this command.

python feature_shutdown.py

I receive an error such as this. In this error I notice a directory not being created. '@abs_top_builddir@/src/bitcoind@EXEEXT@'

Is this behavior familiar to anyone? It seems like the string isn't being interpolated correctly.

2022-09-01T03:01:04.768000Z TestFramework (ERROR): Unexpected exception caught during testing
Traceback (most recent call last):
  File "/Users/user/git/bitcoin/test/functional/test_framework/test_framework.py", line 132, in main
    self.setup()
  File "/Users/user/git/bitcoin/test/functional/test_framework/test_framework.py", line 295, in setup
    self.setup_network()
  File "/Users/user/git/bitcoin/test/functional/test_framework/test_framework.py", line 389, in setup_network
    self.setup_nodes()
  File "/Users/user/git/bitcoin/test/functional/test_framework/test_framework.py", line 414, in setup_nodes
    self.start_nodes()
  File "/Users/user/git/bitcoin/test/functional/test_framework/test_framework.py", line 547, in start_nodes
    node.start(extra_args[i], *args, **kwargs)
  File "/Users/user/git/bitcoin/test/functional/test_framework/test_node.py", line 211, in start
    self.process = subprocess.Popen(self.args + extra_args, env=subp_env, stdout=stdout, stderr=stderr, cwd=cwd, **kwargs)
  File "/Users/user/opt/anaconda3/envs/bitcoin/lib/python3.6/subprocess.py", line 729, in __init__
    restore_signals, start_new_session)
  File "/Users/user/opt/anaconda3/envs/bitcoin/lib/python3.6/subprocess.py", line 1364, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: '@abs_top_builddir@/src/bitcoind@EXEEXT@': '@abs_top_builddir@/src/bitcoind@EXEEXT@'
2022-09-01T03:01:04.825000Z TestFramework (INFO): Stopping nodes
2022-09-01T03:01:04.825000Z TestFramework (WARNING): Not cleaning up dir /var/folders/cj/1w9q8rc55v99_ynzxz46c3dr0000gn/T/bitcoin_func_test_2u9b62xc
2022-09-01T03:01:04.825000Z TestFramework (ERROR): Test failed. Test logging available at /var/folders/cj/1w9q8rc55v99_ynzxz46c3dr0000gn/T/bitcoin_func_test_2u9b62xc/test_framework.log
2022-09-01T03:01:04.826000Z TestFramework (ERROR): 
2022-09-01T03:01:04.826000Z TestFramework (ERROR): Hint: Call /Users/user/git/bitcoin/test/functional/combine_logs.py '/var/folders/cj/1w9q8rc55v99_ynzxz46c3dr0000gn/T/bitcoin_func_test_2u9b62xc' to consolidate all logs
2022-09-01T03:01:04.826000Z TestFramework (ERROR): 
2022-09-01T03:01:04.826000Z TestFramework (ERROR): If this failure happened unexpectedly or intermittently, please file a bug and provide a link or upload of the combined log.
2022-09-01T03:01:04.826000Z TestFramework (ERROR): @PACKAGE_BUGREPORT@
2022-09-01T03:01:04.826000Z TestFramework (ERROR): ```

Thank you for your time.

Kaizen
  • 331
  • 1
  • 6
  • When I first was running the functional tests I had to uninstall/disable Anaconda and that cleared up a similar problem for me. Not sure if that is definitely the problem here. – Michael Folkson Sep 01 '22 at 09:56
  • 1
    I resolved this, anaconda did cause a lot of headaches for me, but I created a new environment. Thanks! – Kaizen Sep 02 '22 at 01:43

2 Answers2

1

In your test/ folder, you should have a config.ini and config.ini.in file. Your config.ini should look something like:

BUILDDIR=/Users/username/code/bitcoin
EXEEXT=

whereas according to the log message it might rather be:

BUILDDIR=@abs_top_builddir@
EXEEXT=@EXEEXT@

If that's the case, probably something went wrong with the configuration process. The easiest potential fix would be to rerun ./configure and see if that resolves it?

stickies-v
  • 540
  • 1
  • 10
  • Excellent! I'm wondering what the source of this config.ini and config.ini.in are? Does ./configure use config.ini.in and generate the .ini file? My current configuration is for debugging. Ill rerun a few configure and see if that ends up making things work. Thanks for your time! – Kaizen Sep 02 '22 at 01:44
  • `config.ini.in` is in the [repo](https://github.com/bitcoin/bitcoin/blob/ea67232cdb80c4bc3f16fcd823f6f811fd8903e1/test/config.ini.in), from which the build system (through ./configure) creates your own `config.ini` file – stickies-v Sep 02 '22 at 11:10
-1

python3.6 is a little old. try python3.10

NOTE: using homebrew

brew search python will display a list of available python versions

try:

brew install python@3

ADDITIONAL NOTE:

brew install qt is NOT correct!

brew install qt@5 is correct!

You have to uninstall qt first! :)

then

brew install qt@5

  • Python 3.6 is [fine](https://github.com/bitcoin/bitcoin/blob/master/.python-version), there should be no need to upgrade to run the test suite. Also, I'm not sure how qt is related to this? – stickies-v Sep 01 '22 at 17:06