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

quodlibet: fix tests #77796

Merged
merged 3 commits into from Jan 30, 2020
Merged

quodlibet: fix tests #77796

merged 3 commits into from Jan 30, 2020

Conversation

101100
Copy link
Contributor

@101100 101100 commented Jan 16, 2020

Motivation for this change

Attempting to fix Quodlibet by building on the comments in #61219.
Fixes #53938

Things done

Steps performed:

  • excluded the quality tests and removed extra inputs for those tests
  • added $XDG_ICON_DIRS to XDG_DATA_DIRS as in done in wrap-gapps-hook.sh
  • added gdk-pixbuf to checkInputs

I'm not sure on the syntax I used for adding gdk-pixbuf. It feels awkward; perhaps there is a better way to make that change?

  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

@101100
Copy link
Contributor Author

101100 commented Jan 16, 2020

I ran nix-shell -p nixpkgs-review --run "nixpkgs-review wip" but I can't tell if the output is a "pass":

$ git -c fetch.prune=false fetch --force https://github.com/NixOS/nixpkgs master:refs/nixpkgs-review/0
remote: Enumerating objects: 10, done.
remote: Counting objects: 100% (10/10), done.
remote: Compressing objects: 100% (5/5), done.
remote: Total 12 (delta 5), reused 5 (delta 5), pack-reused 2
Unpacking objects: 100% (12/12), done.
From https://github.com/NixOS/nixpkgs
   3c2e9fa53d2..6d24724adc1  master     -> refs/nixpkgs-review/0
$ git worktree add /home/jasonpheard/.cache/nixpkgs-review/rev-f1ead65a6eef5033b34bd199f69348e07ad353cb-dirty/nixpkgs 6d24724adc1be6a470af80424b9aef3d00288d25
Preparing worktree (detached HEAD 6d24724adc1)
Updating files: 100% (20762/20762), done.
HEAD is now at 6d24724adc1 Merge pull request #77728 from dywedir/skim
$ nix-env -f /home/jasonpheard/.cache/nixpkgs-review/rev-f1ead65a6eef5033b34bd199f69348e07ad353cb-dirty/nixpkgs -qaP --xml --out-path --show-trace
No diff detected, stopping review...
$ git worktree prune

@101100
Copy link
Contributor Author

101100 commented Jan 16, 2020

I tried running nix path-info -S nixpkgs.quodlibet but it seems to be using the system nixpkgs as it says that the package is broken. How do I run it on the git repository?

@sauyon
Copy link
Member

sauyon commented Jan 16, 2020

I ran nix-shell -p nixpkgs-review --run "nixpkgs-review wip" but I can't tell if the output is a "pass":

I don't think there are packages that depend on quodlibet, so this shouldn't be an issue.

I tried running nix path-info -S nixpkgs.quodlibet but it seems to be using the system nixpkgs as it says that the package is broken. How do I run it on the git repository?

I think you're missing -I <path/to/nixpkgs>. Let me try this out.

@sauyon
Copy link
Member

sauyon commented Jan 16, 2020

This still doesn't build for me, because operon tests fail. I suspect this has something to do with it trying to write to non-writable paths, but it's inconsequential enough that I think just adding --ignore=tests/test_operon.py is fine.

FWIW you should run nix path-info -S <path to your built derivation>. (In any case the previous derivation doesn't build and the built derivation is 9M so it should be fine).

@alyssais
Copy link
Member

Please format your commit messages according to CONTRIBUTING.md.

- Add XDG_ICONS_DIRS to XDG_DATA_DIRS so tests can see icons.
- Skip quality tests and remove their dependencies.
- Add gdk-pixbuf to checkInputs to fix a test that uses SVGs.
@101100
Copy link
Contributor Author

101100 commented Jan 16, 2020

@alyssais Done.

@sauyon What environment/version are you using to get the failed tests?

Also, is there an easy way to automatically build all of the possible iterations of quodlibet? I manually built quodlibet, quodlibet-full, quodlibet-xine, quodlibet-xine-full and quodlibet-without-gst-plugins but that seems like a very manual process.

@101100 101100 changed the title Fix quodlibet quodlibet: fix tests Jan 16, 2020
@sauyon
Copy link
Member

sauyon commented Jan 16, 2020

Arch Linux, x84_64.

@101100
Copy link
Contributor Author

101100 commented Jan 16, 2020

@sauyon I wasn't able to get the build to fail with Arch in docker, but I can just disable that test if that is the only way it works for you. Is that what you recommend?

@sauyon
Copy link
Member

sauyon commented Jan 16, 2020

Give me a little bit to see if I can fix it. Not sure what the official stance is on these things, but it's just a test and honestly I'd prefer to have a package that I can install that may have some broken parts than nothing :P.

@sauyon
Copy link
Member

sauyon commented Jan 17, 2020

My initial stab resulted in not much success and I'm likely to be busy over MLK weekend, so I'm happy with this with the additional tests ignored.

- Excluded test_operon.py as it fails on ArchLinux for @sauyon.
@101100
Copy link
Contributor Author

101100 commented Jan 17, 2020

@sauyon I've excluded the test you indicated.

Copy link
Member

@sauyon sauyon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

@ofborg ofborg bot requested a review from sauyon January 17, 2020 23:52
Copy link
Member

@sauyon sauyon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems the 🤖 has decided that my review was not sufficient.

@jtojnar
Copy link
Contributor

jtojnar commented Jan 18, 2020

@GrahamcOfBorg build quodlibet quodlibet-full quodlibet-xine quodlibet-xine-full quodlibet-without-gst-plugins

@sauyon could you share the error from openon test failing?

@sauyon
Copy link
Member

sauyon commented Jan 18, 2020

Here's the error output:

=================================== FAILURES ===================================
___________________________ TOperonEdit.test_dry_run ___________________________

self = <tests.test_operon.TOperonEdit testMethod=test_dry_run>

    def test_dry_run(self):
        if os.name == "nt" or sys.platform == "darwin":
            return

        realitems = lambda s: [(k, s[k]) for k in s.realkeys()]

        os.environ["VISUAL"] = "truncate -s 0"
        old_items = realitems(self.s)
        os.utime(self.f, (42, 42))
>       e = self.check_true(["edit", "--dry-run", self.f], False, True)[1]

tests/test_operon.py:369:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tests/test_operon.py:55: in check_true
    return self._check(args, True, so, se, **kwargs)
tests/test_operon.py:64: in _check
    self.failUnlessEqual(s == 0, success, msg=repr((s, o, e)))
tests/__init__.py:40: in assertEqual
    super().assertEqual(second, first, msg)
E   AssertionError: True != False : (1, '', 'edit: No changes detected\n')
_________________________ TOperonEdit.test_remove_all __________________________

self = <tests.test_operon.TOperonEdit testMethod=test_remove_all>

    def test_remove_all(self):
        if os.name == "nt" or sys.platform == "darwin":
            return

        os.environ["VISUAL"] = "truncate -s 0"
        os.utime(self.f, (42, 42))
>       self.check_true(["edit", self.f], False, False)

tests/test_operon.py:385:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tests/test_operon.py:55: in check_true
    return self._check(args, True, so, se, **kwargs)
tests/test_operon.py:64: in _check
    self.failUnlessEqual(s == 0, success, msg=repr((s, o, e)))
tests/__init__.py:40: in assertEqual
    super().assertEqual(second, first, msg)
E   AssertionError: True != False : (1, '', 'edit: No changes detected\n')

My guess is it's some sort of permissions error, but I haven't had the time to look into too closely.

@101100
Copy link
Contributor Author

101100 commented Jan 18, 2020

@GrahamcOfBorg build quodlibet quodlibet-full quodlibet-xine quodlibet-xine-full quodlibet-without-gst-plugins

@ofborg ofborg bot requested a review from sauyon January 18, 2020 17:54
@101100
Copy link
Contributor Author

101100 commented Jan 27, 2020

@jtojnar @sauyon All comments have been addressed; ready for another round of reviews.

Copy link
Member

@sauyon sauyon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, this looks fine to me.

@101100
Copy link
Contributor Author

101100 commented Jan 30, 2020

@jtojnar How can I get this merged?

@jtojnar jtojnar merged commit f65f633 into NixOS:master Jan 30, 2020
@jtojnar
Copy link
Contributor

jtojnar commented Jan 30, 2020

Thanks.

@101100
Copy link
Contributor Author

101100 commented Jan 31, 2020

Thanks! Could I merge this change into 19.09 too since it is broken there?

anna328p pushed a commit to anna328p/nixpkgs that referenced this pull request Feb 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

quodlibet-full fails to install on nixos-unstable
5 participants