run-tests tool broken with Python 3.14
When trying to run a test case with our run-tests tool, using Python 3.14, it fails with:
./support/testing/run-tests -o ../outputs/ -k tests.toolchain.test_external.TestExternalToolchainCtngMusl.test_run
17:21:53 TestExternalToolchainCtngMusl Starting
E
======================================================================
ERROR: test_run (tests.toolchain.test_external.TestExternalToolchainCtngMusl.test_run)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/thomas/projets/buildroot/support/testing/infra/basetest.py", line 92, in setUp
super(BRTest, self).setUp()
~~~~~~~~~~~~~~~~~~~~~~~~~^^
File "/home/thomas/projets/buildroot/support/testing/infra/basetest.py", line 52, in setUp
self.b.delete()
~~~~~~~~~~~~~^^
File "/home/thomas/projets/buildroot/support/testing/infra/builder.py", line 116, in delete
if os.path.exists(self.builddir):
~~~~~~~~~~~~~~^^^^^^^^^^^^^^^
File "<frozen genericpath>", line 19, in exists
TypeError: stat: path should be string, bytes, os.PathLike or integer, not NoneType
----------------------------------------------------------------------
Ran 1 test in 0.073s
FAILED (errors=1)
The test class is instantiated twice (it was the case prior to Python 3.14 as well). However, since Python 3.14, the second instance doesn't get the class variables like BRConfigTest.outputdir = os.path.abspath(args.output) that are defined by run-tests.