lcov
lcov copied to clipboard
not able to run the lcov.bat file in windows
Please help I'm getting below error:
C:\Users\abhm\Desktop\gcov_test>..\lcov\lcov.bat A subdirectory or file C:\Users\abhm\Desktop\gcov_test\gcov already exists. Creating gcov\lcov.info ... Capturing coverage data from . C:\Users\abhm\Desktop\lcov/geninfo.perl . --output-filename gcov/lcov.info --base-directory .'C:\Program' is not recognized as an internal or external command, operable program or batch file. geninfo.perl: Use of uninitialized value $version_string in pattern match (m//) at C:\Users\abhm\Desktop\lcov\geninfo.perl line 1931. geninfo.perl: Use of uninitialized value $version_string in substitution (s///) at C:\Users\abhm\Desktop\lcov\geninfo.perl line 1937. geninfo.perl: Use of uninitialized value $version_string in pattern match (m//) at C:\Users\abhm\Desktop\lcov\geninfo.perl line 1940. geninfo.perl: Use of uninitialized value $version_string in pattern match (m//) at C:\Users\abhm\Desktop\lcov\geninfo.perl line 1953. 'C:\Program' is not recognized as an internal or external command, operable program or batch file. geninfo.perl: Use of uninitialized value $gcov_version_string in pattern match (m//) at C:\Users\abhm\Desktop\lcov\geninfo.perl line 3743. geninfo.perl: Use of uninitialized value $gcov_version_string in pattern match (m//) at C:\Users\abhm\Desktop\lcov\geninfo.perl line 3743. Scanning . for .da files ... Found 1 data files in . Processing test.gcda geninfo.perl: ERROR: C:\Users\abhm\Desktop\gcov_test/test.bb: could not open file Fixing back slashes ... Generating html ... The syntax of the command is incorrect. genhtml.perl: ERROR: cannot create directory gcov/html/!
My gcov.exe is installed in location : C:\Program Files (x86)\mingw-w64\i686-8.1.0-posix-dwarf-rt_v6-rev0\mingw32\bin
LCOV.bat:
@echo off :: Full dirname of current executable set idir=%~dp0 set perl=C:\Perl64\bin\perl.exe
md "%CD%\gcov" echo Creating gcov\lcov.info ... %perl% %idir%lcov.perl -b . -d . -c -o gcov/lcov.info :: echo Cleaning up ... :: %perl% %idir%lcov.perl --remove gcov/lcov.info "unneeded" -o gcov/lcov.info
echo Fixing back slashes ... type "gcov\lcov.info"|%~dp0repl.bat "\" "/" >"gcov\lcov.info.tmp" move /y "gcov\lcov.info.tmp" "gcov\lcov.info" >nul
echo Generating html ... %perl% %idir%genhtml.perl -o gcov/html/ gcov/lcov.info -p "%CD%"
I have given gcov_tool variable in geninfo.perl file as: our $gcov_tool = "C:\Program Files (x86)\mingw-w64\i686-8.1.0-posix-dwarf-rt_v6-rev0\mingw32\bin\gcov.exe";