Recently added zephyr\scripts\ci\check_compliance.py ClangFormat check is broken for Windows,
To Reproduce
Steps to reproduce the behavior:
Run in command line: python scripts/ci/check_compliance.py
The ClangFormat raises a Python exception.
Expected behavior
No Python exceptions.
Impact
It is not possible to run the compliance tests on Windows.
Logs and console output
C:\_ddm\ZEPHYR\review\butok_gh_3\zephyr>python scripts/ci/check_compliance.py
Running Nits tests in C:/_ddm/ZEPHYR/review/butok_gh_3/zephyr ...
Running KconfigHWMv2 tests in C:\_ddm\ZEPHYR\review\butok_gh_3\zephyr ...
Running MaintainersFormat tests in C:/_ddm/ZEPHYR/review/butok_gh_3/zephyr ...
Running ImageSize tests in C:/_ddm/ZEPHYR/review/butok_gh_3/zephyr ...
Running Identity tests in C:/_ddm/ZEPHYR/review/butok_gh_3/zephyr ...
Running Kconfig tests in C:\_ddm\ZEPHYR\review\butok_gh_3\zephyr ...
Running Gitlint tests in C:/_ddm/ZEPHYR/review/butok_gh_3/zephyr ...
Running GitDiffCheck tests in C:/_ddm/ZEPHYR/review/butok_gh_3/zephyr ...
Running DevicetreeBindings tests in C:\_ddm\ZEPHYR\review\butok_gh_3\zephyr ...
Running KconfigBasicNoModules tests in C:\_ddm\ZEPHYR\review\butok_gh_3\zephyr ...
Running YAMLLint tests in C:/_ddm/ZEPHYR/review/butok_gh_3/zephyr ...
Running KeepSorted tests in C:/_ddm/ZEPHYR/review/butok_gh_3/zephyr ...
Running BinaryFiles tests in C:/_ddm/ZEPHYR/review/butok_gh_3/zephyr ...
Running ModulesMaintainers tests in C:/_ddm/ZEPHYR/review/butok_gh_3/zephyr ...
Running Pylint tests in C:/_ddm/ZEPHYR/review/butok_gh_3/zephyr ...
Running ClangFormat tests in C:/_ddm/ZEPHYR/review/butok_gh_3/zephyr ...
Python exception in `C:\_ddm\ZEPHYR\review\butok_gh_3\zephyr\scripts\ci\check_compliance.py`:
Traceback (most recent call last):
File "C:\_ddm\ZEPHYR\review\butok_gh_3\zephyr\scripts\ci\check_compliance.py", line 1766, in main
n_fails = _main(args)
^^^^^^^^^^^
File "C:\_ddm\ZEPHYR\review\butok_gh_3\zephyr\scripts\ci\check_compliance.py", line 1701, in _main
test.run()
File "C:\_ddm\ZEPHYR\review\butok_gh_3\zephyr\scripts\ci\check_compliance.py", line 284, in run
subprocess.run(('clang-format-diff.py', '-p1'),
File "C:\Python311\Lib\subprocess.py", line 548, in run
with Popen(*popenargs, **kwargs) as process:
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Python311\Lib\subprocess.py", line 1026, in __init__
self._execute_child(args, executable, preexec_fn, close_fds,
File "C:\Python311\Lib\subprocess.py", line 1538, in _execute_child
hp, ht, pid, tid = _winapi.CreateProcess(executable, args,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [WinError 2] The system cannot find the file specified
Traceback (most recent call last):
File "C:\_ddm\ZEPHYR\review\butok_gh_3\zephyr\scripts\ci\check_compliance.py", line 1793, in <module>
main(sys.argv[1:])
File "C:\_ddm\ZEPHYR\review\butok_gh_3\zephyr\scripts\ci\check_compliance.py", line 1766, in main
n_fails = _main(args)
^^^^^^^^^^^
File "C:\_ddm\ZEPHYR\review\butok_gh_3\zephyr\scripts\ci\check_compliance.py", line 1701, in _main
test.run()
File "C:\_ddm\ZEPHYR\review\butok_gh_3\zephyr\scripts\ci\check_compliance.py", line 284, in run
subprocess.run(('clang-format-diff.py', '-p1'),
File "C:\Python311\Lib\subprocess.py", line 548, in run
with Popen(*popenargs, **kwargs) as process:
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Python311\Lib\subprocess.py", line 1026, in __init__
self._execute_child(args, executable, preexec_fn, close_fds,
File "C:\Python311\Lib\subprocess.py", line 1538, in _execute_child
hp, ht, pid, tid = _winapi.CreateProcess(executable, args,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [WinError 2] The system cannot find the file specified
Environment (please complete the following information):
OS: Windows
SHA-1: 4c16ec1fba56c5631fb0ab19583a8a30d7ded529
Additional context
If to disable the ClangFormat module, the check runs without any error:
C:\_ddm\ZEPHYR\review\butok_gh_3\zephyr>python scripts/ci/check_compliance.py
Running ImageSize tests in C:/_ddm/ZEPHYR/review/butok_gh_3/zephyr ...
Running ModulesMaintainers tests in C:/_ddm/ZEPHYR/review/butok_gh_3/zephyr ...
Running BinaryFiles tests in C:/_ddm/ZEPHYR/review/butok_gh_3/zephyr ...
Running Gitlint tests in C:/_ddm/ZEPHYR/review/butok_gh_3/zephyr ...
Running Identity tests in C:/_ddm/ZEPHYR/review/butok_gh_3/zephyr ...
Running Nits tests in C:/_ddm/ZEPHYR/review/butok_gh_3/zephyr ...
Running Pylint tests in C:/_ddm/ZEPHYR/review/butok_gh_3/zephyr ...
Running KconfigHWMv2 tests in C:\_ddm\ZEPHYR\review\butok_gh_3\zephyr ...
Running GitDiffCheck tests in C:/_ddm/ZEPHYR/review/butok_gh_3/zephyr ...
Running KconfigBasicNoModules tests in C:\_ddm\ZEPHYR\review\butok_gh_3\zephyr ...
Running KconfigBasic tests in C:\_ddm\ZEPHYR\review\butok_gh_3\zephyr ...
Running Kconfig tests in C:\_ddm\ZEPHYR\review\butok_gh_3\zephyr ...
Running DevicetreeBindings tests in C:\_ddm\ZEPHYR\review\butok_gh_3\zephyr ...
Running KeepSorted tests in C:/_ddm/ZEPHYR/review/butok_gh_3/zephyr ...
Running Checkpatch tests in C:/_ddm/ZEPHYR/review/butok_gh_3/zephyr ...
Running YAMLLint tests in C:/_ddm/ZEPHYR/review/butok_gh_3/zephyr ...
Running MaintainersFormat tests in C:/_ddm/ZEPHYR/review/butok_gh_3/zephyr ...
Running BoardYml tests in C:\_ddm\ZEPHYR\review\butok_gh_3\zephyr ...
Complete results in compliance.xml
Describe the bug
Recently added zephyr\scripts\ci\check_compliance.py ClangFormat check is broken for Windows,
To Reproduce
Steps to reproduce the behavior:
Expected behavior No Python exceptions.
Impact It is not possible to run the compliance tests on Windows.
Logs and console output
Environment (please complete the following information):
Additional context
If to disable the ClangFormat module, the check runs without any error: