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

Make it possible to run tests. #2553

Merged
merged 1 commit into from
Nov 17, 2021
Merged

Make it possible to run tests. #2553

merged 1 commit into from
Nov 17, 2021

Conversation

jfly
Copy link
Contributor

@jfly jfly commented Nov 17, 2021

What type of PR is this? (check all applicable)

  • Refactor
  • Feature
  • Bug Fix
  • Optimization
  • Documentation Update
  • Other: Replace this with a description of the type of this PR

Description

I followed the instructions on
https://github.com/polybar/polybar/wiki/Testing, and this happened to
me:

$ cmake .. -DBUILD_TESTS=ON
...
[ 11%] Creating directories for 'googletest'
[ 22%] Performing download step (git clone) for 'googletest'
Cloning into 'googletest-src'...
fatal: invalid reference: master
CMake Error at googletest-download/googletest-prefix/tmp/googletest-gitclone.cmake:40 (message):
  Failed to checkout tag: 'master'

make[2]: *** [CMakeFiles/googletest.dir/build.make:99: googletest-prefix/src/googletest-stamp/googletest-download] Error 1
make[1]: *** [CMakeFiles/Makefile2:83: CMakeFiles/googletest.dir/all] Error 2
make: *** [Makefile:91: all] Error 2
CMake Error at tests/CMakeLists.txt:19 (message):
  Build step for googletest failed: 2

It looks like the problem is that
googletest changed their branch from
master to main at some point.

Related Issues & Documents

N/A

Documentation (check all applicable)

  • This PR requires changes to the Wiki documentation (describe the changes)
  • This PR requires changes to the documentation inside the git repo (please add them to the PR).
  • Does not require documentation changes: I fixed a broken link
    https://github.com/polybar/polybar/wiki/Testing. Hopefully it's
    intentional that random members of the public such as myself are allowed
    to do that?

I followed the instructions on
https://github.com/polybar/polybar/wiki/Testing, and this happened to
me:

    $ cmake .. -DBUILD_TESTS=ON
    ...
    [ 11%] Creating directories for 'googletest'
    [ 22%] Performing download step (git clone) for 'googletest'
    Cloning into 'googletest-src'...
    fatal: invalid reference: master
    CMake Error at googletest-download/googletest-prefix/tmp/googletest-gitclone.cmake:40 (message):
      Failed to checkout tag: 'master'

    make[2]: *** [CMakeFiles/googletest.dir/build.make:99: googletest-prefix/src/googletest-stamp/googletest-download] Error 1
    make[1]: *** [CMakeFiles/Makefile2:83: CMakeFiles/googletest.dir/all] Error 2
    make: *** [Makefile:91: all] Error 2
    CMake Error at tests/CMakeLists.txt:19 (message):
      Build step for googletest failed: 2

It looks like the problem is that
[googletest](https://github.com/google/googletest/) changed their branch from
`master` to `main` at some point.

I also fixed a broken link
https://github.com/polybar/polybar/wiki/Testing. Hopefully it's
intentional that random members of the public such as myself are allowed
to do that?
@patrick96
Copy link
Member

Thanks for the fix :)

Seems that changed just a few days ago. Their readme still references master 😅

Hopefully it's intentional that random members of the public such as myself are allowed to do that?

Yes, that is intentional, exactly because of things like this.

@patrick96 patrick96 merged commit a3b5e3e into polybar:master Nov 17, 2021
@jfly jfly deleted the fix-tests branch November 17, 2021 16:43
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

Successfully merging this pull request may close these issues.

None yet

2 participants