0

Windows 11 GCOV v6.0 Python 3.11.3 gcc.exe (Rev2, Built by MSYS2 project) 12.1.0 gcov (Rev2, Built by MSYS2 project) 12.1.0

I compile my project, run the executable and get a full set of .gcda and .gcno files as expected, however when I run:

gcovr -r . within the folder with all of the .gcda and .gcno files I get:

PS C:\emwi_testframework\Application\Project\GCC\obj> gcovr -r . (ERROR) Trouble processing 'C:/emwi_testframework/Application/Project/GCC/obj/ewheap.gcda' with working directory 'C:\emwi_testframework\Application\Project\GCC\obj'. Stdout of gcov was >>None<< End of stdout Stderr of gcov was >>None<< End of stderr Current processed gcov file was None. Use option --verbose to get extended informations. Traceback (most recent call last): File "C:\Users\xxxx\AppData\Local\Programs\Python\Python311\Lib\site-packages\gcovr\workers.py", line 80, in worker work(*args, **kwargs) File "C:\Users\xxxx\AppData\Local\Programs\Python\Python311\Lib\site-packages\gcovr\gcov.py", line 323, in process_datafile done = run_gcov_and_process_files( ^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\xxxx\AppData\Local\Programs\Python\Python311\Lib\site-packages\gcovr\gcov.py", line 530, in run_gcov_and_process_files gcov_cmd.identify_and_cache_capabilities() File "C:\Users\xxxx\AppData\Local\Programs\Python\Python311\Lib\site-packages\gcovr\gcov.py", line 417, in identify_and_cache_capabilities if self.__check_gcov_option("--demangled-names"): ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\xxxx\AppData\Local\Programs\Python\Python311\Lib\site-packages\gcovr\gcov.py", line 451, in __check_gcov_option if option in self.__get_help_output(): ^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\xxxx\AppData\Local\Programs\Python\Python311\Lib\site-packages\gcovr\gcov.py", line 435, in __get_help_output gcov_process = self.__get_gcov_process( ^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\xxxx\AppData\Local\Programs\Python\Python311\Lib\site-packages\gcovr\gcov.py", line 470, in __get_gcov_process return subprocess.Popen( ^^^^^^^^^^^^^^^^^ File "C:\Users\xxxx\AppData\Local\Programs\Python\Python311\Lib\subprocess.py", line 1024, in init self._execute_child(args, executable, preexec_fn, close_fds, File "C:\Users\xxxx\AppData\Local\Programs\Python\Python311\Lib\subprocess.py", line 1509, 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:\Users\xxxx\AppData\Local\Programs\Python\Python311\Lib\site-packages\gcovr\workers.py", line 80, in worker work(*args, **kwargs) File "C:\Users\xxxx\AppData\Local\Programs\Python\Python311\Lib\site-packages\gcovr\gcov.py", line 323, in process_datafile done = run_gcov_and_process_files( ^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\xxxx\AppData\Local\Programs\Python\Python311\Lib\site-packages\gcovr\gcov.py", line 530, in run_gcov_and_process_files gcov_cmd.identify_and_cache_capabilities() File "C:\Users\xxxx\AppData\Local\Programs\Python\Python311\Lib\site-packages\gcovr\gcov.py", line 417, in identify_and_cache_capabilities if self.__check_gcov_option("--demangled-names"): ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\xxxx\AppData\Local\Programs\Python\Python311\Lib\site-packages\gcovr\gcov.py", line 451, in __check_gcov_option if option in self.__get_help_output(): ^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\xxxx\AppData\Local\Programs\Python\Python311\Lib\site-packages\gcovr\gcov.py", line 435, in __get_help_output gcov_process = self.__get_gcov_process( ^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\xxxx\AppData\Local\Programs\Python\Python311\Lib\site-packages\gcovr\gcov.py", line 470, in __get_gcov_process return subprocess.Popen( ^^^^^^^^^^^^^^^^^ File "C:\Users\xxxx\AppData\Local\Programs\Python\Python311\Lib\subprocess.py", line 1024, in init self._execute_child(args, executable, preexec_fn, close_fds, File "C:\Users\xxxx\AppData\Local\Programs\Python\Python311\Lib\subprocess.py", line 1509, in execute_child hp, ht, pid, tid = winapi.CreateProcess(executable, args, ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ FileNotFoundError: [WinError 2] The system cannot find the file specified (ERROR) Uncaught EXCEPTION Traceback (most recent call last): File "", line 198, in run_module_as_main File "", line 88, in run_code File "C:\Users\xxxx\AppData\Local\Programs\Python\Python311\Scripts\gcovr.exe_main.py", line 7, in sys.exit(main()) ^^^^^^ File "C:\Users\xxxx\AppData\Local\Programs\Python\Python311\Lib\site-packages\gcovr_main.py", line 328, in main covdata = collect_coverage_from_gcov(options) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\xxxx\AppData\Local\Programs\Python\Python311\Lib\site-packages\gcovr_main.py", line 380, in collect_coverage_from_gcov with Workers( File "C:\Users\xxxx\AppData\Local\Programs\Python\Python311\Lib\site-packages\gcovr\workers.py", line 173, in exit self.wait() File "C:\Users\xxxx\AppData\Local\Programs\Python\Python311\Lib\site-packages\gcovr\workers.py", line 164, in wait raise self.exceptions[0][1] File "C:\Users\xxxx\AppData\Local\Programs\Python\Python311\Lib\site-packages\gcovr_main.py", line 387, in collect_coverage_from_gcov contexts = pool.wait() ^^^^^^^^^^^ File "C:\Users\xxxx\AppData\Local\Programs\Python\Python311\Lib\site-packages\gcovr\workers.py", line 164, in wait raise self.exceptions[0][1] File "C:\Users\xxxx\AppData\Local\Programs\Python\Python311\Lib\site-packages\gcovr\workers.py", line 80, in worker work(*args, **kwargs) File "C:\Users\xxxx\AppData\Local\Programs\Python\Python311\Lib\site-packages\gcovr\gcov.py", line 323, in process_datafile done = run_gcov_and_process_files( ^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\xxxx\AppData\Local\Programs\Python\Python311\Lib\site-packages\gcovr\gcov.py", line 530, in run_gcov_and_process_files gcov_cmd.identify_and_cache_capabilities() File "C:\Users\xxxx\AppData\Local\Programs\Python\Python311\Lib\site-packages\gcovr\gcov.py", line 417, in identify_and_cache_capabilities if self.__check_gcov_option("--demangled-names"): ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\xxxx\AppData\Local\Programs\Python\Python311\Lib\site-packages\gcovr\gcov.py", line 451, in __check_gcov_option if option in self.__get_help_output(): ^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\xxxx\AppData\Local\Programs\Python\Python311\Lib\site-packages\gcovr\gcov.py", line 435, in __get_help_output gcov_process = self.__get_gcov_process( ^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\xxxx\AppData\Local\Programs\Python\Python311\Lib\site-packages\gcovr\gcov.py", line 470, in __get_gcov_process return subprocess.Popen( ^^^^^^^^^^^^^^^^^ File "C:\Users\xxxx\AppData\Local\Programs\Python\Python311\Lib\subprocess.py", line 1024, in init self._execute_child(args, executable, preexec_fn, close_fds, File "C:\Users\xxxx\AppData\Local\Programs\Python\Python311\Lib\subprocess.py", line 1509, in _execute_child hp, ht, pid, tid = _winapi.CreateProcess(executable, args, ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ FileNotFoundError: [WinError 2] The system cannot find the file specified

I would appreciate any suggestions as I am new to gcov.

  • How do you invoke GCC? Is it in your PATH? What happens when you run `gcov --help`? Gcovr needs gcov from the GCC project, which should have been compiled alongside the compiler. If gcov is somewhere else, you can tell gcovr about this with `gcovr --gcov-executable C:/path/to/gcov`. See also: https://gcovr.com/en/stable/guide/compiling.html#choosing-the-right-gcov-executable – amon Jun 13 '23 at 06:51

0 Answers0