Page MenuHomeSoftware Heritage

getting-started: Add missing system dependencies for tests
ClosedPublic

Authored by ardumont on Jan 7 2019, 2:57 PM.

Details

Summary

Without this dependency, the pifpaf tests won't execute. They will
fail with a cryptic error.

That cryptic error message is currently fixed by pifpaf's author. It's
pending in a PR and should soon land.

Related P341
Related https://github.com/jd/pifpaf/issues/108
Related https://github.com/jd/pifpaf/pull/119

Diff Detail

Repository
rDDOC Development documentation
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

pg_config is provided by postgresql-common (which is a dependency of postgresql-server-dev-10).

And you need to fix the indent

This revision is now accepted and ready to land.Jan 7 2019, 3:10 PM

pg_config is provided by postgresql-common (which is a dependency of postgresql-server-dev-10).

Yes, but that's not pg_config i am after here.
We need pg_ctl (P341).

Installing postgresql-common is somehow not enough, i unstuck myself only after installing that dependency (well postgresql-server-dev-all, i'm on testing).

And you need to fix the indent

Ah right!
I need to chase that configuration gotcha on my emacs' setup, thanks.

Fix indentation and dependency name

Yes, but that's not pg_config i am after here.
We need pg_ctl (P341).

pg_ctl is in postgresql-10.

We need pg_ctl (P341).

pg_ctl is in postgresql-10.

Yes, right. There is something strange on my environment. Will check further.


As this was inconsistent, I digged a little further.
Turned out i had a conflicted version of postgresql-server-dev-*.
Cleaning up everything and getting back to square one (only installing postgresql server and postgresql-autodoc).

We still need the diff's content because otherwise, pg_config --bindir will complain:

$ tox
[...]
ERROR [pifpaf] Error while running command: ['pg_config', '--bindir']
ERROR: InvocationError: '/home/tony/work/inria/repo/swh/swh-environment/swh-indexer/.tox/py3/bin/pifpaf run postgresql -- pytest --doctest-modules --hypothesis-profile=fast --cov=swh --cov-branch'
___________________________________________________________________________________________ summary ___________________________________________________________________________________________
  flake8: commands succeeded
ERROR:   py3: commands failed
$ pg_config --bindir
You need to install postgresql-server-dev-NN for building a server-side extension or libpq-dev for building a client-side application.

All this could go away if we fix pifpaf to stop relying on this package [1]

In the mean time, that should do.

[1] https://github.com/jd/pifpaf/issues/108

This revision was automatically updated to reflect the committed changes.