Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

not able to run the lcov.bat file in windows #10

Open
mukhia88 opened this issue Apr 16, 2020 · 0 comments
Open

not able to run the lcov.bat file in windows #10

mukhia88 opened this issue Apr 16, 2020 · 0 comments

Comments

@mukhia88
Copy link

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";

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant