Twister Blackbox tests' paths are too long for CMake on Windows #83229
Labels
area: Twister
Twister
area: Windows Support
Related to building Zephyr on Windows
bug
The issue is a bug, or the PR is fixing a bug
Describe the bug
When trying to run Twister BlackBox tests on Windows, paths used by CMake are too long, which causes a fatal error on all tests requiring a proper build step.
To Reproduce
pytest
Expected behavior
Tests run without a warning about paths, which causes a fatal error further down the line.
Impact
I cannot include BlackBox testing in my CI, which makes me unable to known how my changes impact Windows users.
Logs and console output
Path length warning:
Eventual error:
Environment (please complete the following information):
Additional context
Note that I was aware of the restriction on path length in Windows. I have created a junction in the Temp folder (
C:\Windows\Temp\d\s
) to the parent of the normalZEPHYR_BASE
directory and used the shortened path (C:\Windows\Temp\d\s\zephyr
) as theZEPHYR_BASE
.Additionally, I have used the
--basetemp
flag inpytest
in order to shorten the file path of thetmp_path
used to create theoutdir
toC:\Windows\Temp\p
.All those methods were insufficient.
I'd like to avoid changing registry keys on my machine.
The Twister flag
--short-build-paths
is not an answer, because it requires the use ofninja
, while some blackbox tests requireninja
not to be used.Note that getting just under 250 is insufficient -
pytest
always appends test name to the path, so it would take just one slightly longer test to break it all again.One change that would help a bit - shortening the
blackbox-out-container/blackbox-out
section - it's not often viewed by users, so I could changeconftest.py
so it creates something likebboc/bbo
. It would save 27 characters. It's not enough here, but a nice thought.I'd like to point out one place in which a change might be warranted to fix this Issue:
zephyr/scripts/pylib/twister/twisterlib/testsuite.py
Lines 517 to 533 in 75463fe
The method for getting unique paths/names of
TestSuite
s is already deemed as not the best. In my case, the path appended here "costs" me 79 characters out of possible 250 because blackbox tests use alternative test roots in order to e.g. have tests that always fail without breaking normal CI. Of course,--no-detailed-test-id
flag is an option, however, blackbox tests also check that flag (i.a.test_detailed_test_id
), so it cannot just be added to all blackbox tests.The text was updated successfully, but these errors were encountered: