Skip to content

Windows compatibility #15

Closed
Closed

Description

@elenev

If I understand it correctly, right now this package isn't compatible with Windows because there's no windows version of LCOV. And trying to run the genhtml Perl script runs into errors because of Windows paths.

Locally, I've gotten around this by installing LCOV in WSL. Then, it's two lines of code:

First, I replace the slashes in lcov.info:
run(`bash -c "tr '\\\\' '/' < coverage/lcov.info > coverage/lcov.info.tmp && mv coverage/lcov.info.tmp coverage/lcov.info"`)

Next, I call genhtml:
run(`bash -c "genhtml -t "Test" -o coverage coverage/lcov.info"`)

It's very much a hack, but if people think it's useful, maybe it's worth a PR? Or is there a much simpler solution I'm missing? I didn't want to change genhtml's Perl code...

Activity

  1. ExpandingMan commented on Oct 21, 2020

    @ExpandingMan
    Collaborator

    Sorry for the late response. I have essentially no ability to test on windows, I got the impression that @tpapp didn't either, so if you're a windows user and want this working you're going to be pretty much left to your own devices. In particular, I really don't know how appropriate your suggestion is, but I don't think I'd have any objections to it if I were a windows user (who probably needs WSL for a lot anyway).

    As far as I'm concerned, any PR that claims to fix windows and does not break linux would be welcome! Of course, a PR that also includes successful windows tests in appveyor or travis would be really great.

  2. tpapp commented on Oct 22, 2020

    @tpapp
    Collaborator

    Yes, tests for Windows and/or WSL would be nice if anyone adds functionality for those.

  3. bramtayl commented on Aug 16, 2022

    @bramtayl
    Contributor

    On windows, I'm getting:

    ERROR: LoadError: IOError: stat("C:\\Users\\brand\\AppData\\Local\\Microsoft\\WindowsApps\\python3.exe"): permission denied (EACCES)
    Stacktrace:
      [1] uv_error
        @ .\libuv.jl:97 [inlined]
      [2] stat(path::String)
        @ Base.Filesystem .\stat.jl:152
      [3] isfile
        @ .\stat.jl:456 [inlined]
      [4] which(program_name::String)
        @ Base.Sys .\sysinfo.jl:518
      [5] top-level scope
        @ C:\Users\brand\.julia\packages\LocalCoverage\CZlOI\src\LocalCoverage.jl:17
    

    Probably just a matter of changing the permissions on the file but

  4. BambOoxX commented on Jul 9, 2023

    @BambOoxX
    Contributor

    Any chance #42 works to solve this ? I developed that on a Windows machine...

  5. BambOoxX commented on Jul 15, 2026

    @BambOoxX
    Contributor

    This should be closed shouldn't it ? It works fine on my windows since #42.

  6. tpapp commented on Jul 15, 2026

    @tpapp
    Collaborator

    Thanks for the ping, closing. If anyone has problems please comment and I will reopen.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions