test-coverage icon indicating copy to clipboard operation
test-coverage copied to clipboard

Command hang in the void

Open Driky opened this issue 3 years ago • 5 comments

When running code_coverage, the command hang after printing:

Generated test-all script in test/.test_coverage.dart. Please make sure it is added to .gitignore.

Nothing happens even after waiting a really long time.

I ran that command on a new project.

Dart SDK version: 2.12.1 (stable) (Wed Mar 10 10:18:47 2021 +0100) on "windows_x64" Windows 10 Powershell

Is that a known problem ? Any idea what I could check to try and fix the issue ?

Driky avatar Mar 16 '21 12:03 Driky

Added detail: I tried running the command on my repo with a github action just in case it came from my os or specific system. And it also seems to hang (it's been running for +5 minutes on a project with only one test).

Driky avatar Mar 16 '21 14:03 Driky

I had the same problem and just killed it. You'll probably see that it has already created the .test_coverage.dart script in your test folder. Unfortunately, .test_coverage.dart also hangs.

adrianboyko avatar Mar 19 '21 22:03 adrianboyko

I gave up using test_coverage, now I'm using the coverage package by itself. It doesn't create the test_all.dart file but it's easy to maintain by hand. If you want to see how I did it you can check my LeagueOfApi package.

Driky avatar Mar 20 '21 10:03 Driky

pub run test_coverage is hanging:

flutter pub run test_coverage 
Found 4 test files.
Generated test-all script in test/.test_coverage.dart. Please make sure it is added to .gitignore.

My configuration:

flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 2.0.1, on Linux, locale en_US.UTF-8)
[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
[✗] Chrome - develop for the web (Cannot find Chrome executable at google-chrome)
    ! Cannot find Chrome. Try setting CHROME_EXECUTABLE to a Chrome executable.
[✗] Linux toolchain - develop for Linux desktop
    ✗ clang++ is required for Linux development.
      It is likely available from your distribution (e.g.: apt install clang), or can be downloaded from https://releases.llvm.org/
    ✗ CMake is required for Linux development.
      It is likely available from your distribution (e.g.: apt install cmake), or can be downloaded from https://cmake.org/download/
    ✗ ninja is required for Linux development.
      It is likely available from your distribution (e.g.: apt install ninja-build), or can be downloaded from
      https://github.com/ninja-build/ninja/releases
    ✗ GTK 3.0 development libraries are required for Linux development.
      They are likely available from your distribution (e.g.: apt install libgtk-3-dev)
    ✗ The blkid development library is required for Linux development.
      It is likely available from your distribution (e.g.: apt install libblkid-dev)
    ✗ The lzma development library is required for Linux development.
      It is likely available from your distribution (e.g.: apt install liblzma-dev)
[✓] Android Studio
[✓] Connected device (1 available)

Yuiry-IV avatar Jul 20 '21 16:07 Yuiry-IV

any news on this?

wim07101993 avatar Nov 20 '21 15:11 wim07101993