We need a way to test the python stuff?
Eric S. Raymond
esr at thyrsus.com
Mon Nov 7 23:46:30 UTC 2016
Hal Murray <hmurray at megapathdsl.net>:
> Or several ways.
> Step one is to run the local copy of ntpq (for example) using local
> libraries. The trick is to be sure that it is using the local libraries
> rather than a previously installed library.
We can force this with "waf uninstall". In order to avoid this problem
I normally run without the libaries installed.
> Step two is to test the installed code to be sure the libraries got installed
> where it can find them and that it is using the new libraries rather than a
> previously installed version.
I'm pretty sure the only way using a previously installed version is possible
is if you change the target directory for library installation to one that's
later on your path than the stale one. It's not a case I worry about.
> Mostly, this is testing the waf recipe, but we need most of this in order to
> be able to test new features in the pything code and/or new features in the
> libraries before they get installed.
> If nothing else, something like this should get added to the release
> checklist. (I think I'm assuming we would be willing to manually clean out
> the installed libraries to verify they aren't getting used. I don't want to
> do that very often, but I'd be willing to do it occasionally as part of
> getting ready for a release.)
I think I know a better attack on the problem - that is, one less reliant on
intervention by a human who might forget a step.
It's contingent on the fact that new ntpq was deliberately written
with as much of its functionality as possible pushed to the ntp Python
library, in particular ntp.packet and ntp.util. If you look at
ntpq/ntpq there's not much there besides a command interpreter wrapped
around those library calls.
I think the right answer is that the ntp Python library needs to have its
own set of unit tests that are run as part of waf check. I haven't figured
out the mechanics of this yet, but I'm sure looking closely at the way
the existing tests are run will be enlightening.
I guess I need to do this before I write ntpmon. Sigh.
<a href="http://www.catb.org/~esr/">Eric S. Raymond</a>
More information about the devel