SublimeText / UnitTesting

Testing Sublime Text Packages
MIT License
111 stars 32 forks source link

Build passing on Mac OS but falling for Linux with: Unit Testing pc_helper(), missing dependencies: {'coverage'} #137

Closed evandrocoan closed 7 months ago

evandrocoan commented 6 years ago

Here you can see everything passing for the others, including Sublime Text on Mac OS:

  1. https://travis-ci.org/evandrocoan/DebugTools/builds/440899598
  2. image

I had added echo "first6 ls"; ls "/home/travis/.config/sublime-text-3/Packages" on .travis.yml, and we can see the coverage dependency there:

ConcurrentLogHandler
coverage
DebugTools
DiffMatchPatch
PortalockerFiles
python-pywin32
UnitTesting
User

I manage to fix it by editing pc_help.py:

  1. https://github.com/evandroforks/UnitTesting/commit/fde9b65eb95577cb99f6a3e39cbd8dc212e7e696
  2. if len(missing_dependencies) == 0:
    # -->
    if len(missing_dependencies) == 0 or len(missing_dependencies) == 1 and 'coverage' in missing_dependencies:

    Now the tests are passing:

  3. image
  4. https://travis-ci.org/evandrocoan/DebugTools/builds/440905484
randy3k commented 6 years ago

It seems to a dirty fix. I would rather check the source if the error: why coverage was not installed or detected?

evandrocoan commented 6 years ago

After working on it, I finally figured it out why the coverage dependency is missing. On the commit:

  1. f834ae7adb2060b35e3e702cee51563de9b5788c enable coverage on windows - 30/11/2016 16:31

You added:

    COV_PATH="$STP/coverage"
    rm -rf "$COV_PATH"

Now, guess why coverage is missing? I removed these lines now it is working without the hack I had committed. Usually package control would install missing dependencies, I use it locally, and it works as expected.

randy3k commented 6 years ago

coverage is removed in that line because it would soon be installed by Package Control

evandrocoan commented 6 years ago

I see AppVeyor also do that, but there are no problems over there. Somehow Package Control cannot install the missing dependency on Travis, while it can install on AppVeyour.

If UnitTesting package could capture the whole Sublime Text console, we could know why Package Control is failing in install the missing dependency on Travis. I also think that capturing the whole console would help most users to figure out errors on the remote machine.


Correction, AppVeyor does not delete the coverage dependency.


I managed to implement to capture the whole Sublime Text console on my fork with:

  1. https://github.com/evandroforks/UnitTesting/commit/b6b43c978ed67c02b2b94f2151ca276202b75ae4 Implemented to capture full Sublime Text console output on AppVeyor
  2. https://github.com/evandroforks/UnitTesting/commit/c2ae10961819eb715bb3b11256453933c07ca520 Implemented to capture full Sublime Text console output on Travis
deathaxe commented 7 months ago

Required libraries (former dependencies) are now resolved automatically via Package Control when running setup action. The mechanism is identical to how it would work locally.