[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: hyphy and test philosophy



On 7/2/19 4:02 PM, Andreas Tille wrote:
Hi,

Hello,
On Tue, Jul 02, 2019 at 03:01:00PM +0100, Saira Hussain wrote:
I am writing autopkgtests for the package hyphy, which is a phylogeny
hypothesis testing tool.

Thanks for working on this.
Sorry for my philosophical questions (again!) but I am not sure what is
supposed to be part of autopkgtests vs unit tests vs already existing
package tests.

As a rule of thumb:  Try to put yourself into the position of a user and
test what you want to be tested.  Having at least a few test is better
than no test at all.  Gaining for completeness might be a valuable goal
but its not always necessary.
OK. That means that the build time tests and autopkgtests serve a different purpose right? I am always insecure if what I do is enough.

I know that I've asked this before but the reason of repeating that question
is that hyphy has loads of internal tests. They way they are run though is
quite tricky for me to understand (on same cases) or some of them fail
completely

What tests are failing completely?  I've checked the build log

    https://buildd.debian.org/status/fetch.php?pkg=hyphy&arch=amd64&ver=2.3.14%2Bdfsg-1&stamp=1537976360&raw=0

which says

[----------] Global test environment tear-down
[==========] 180 tests from 6 test cases ran. (25 ms total)
[  PASSED  ] 180 tests.

Do you get some other results?

Could I use some of the more meaningful tests (or modify them) and use a
couple of them for autopkgtest? (Instead of auto running a 100-test suit?)

I've checked the override_dh_auto_test target in d/rules and it seems
its really a bit tricky to reproduce since the cmake process seems to
produce an own script.  If I were you I would try to run the build
process on the local machine (not in pbuilder) which leaves the build
dir behind which enables you to inspect HYPHYGTEST.

If this is not enlightening feel free to follow your own gut feeling and
may be create a hand full of tests you consider sensible.

Undestood. I am doing this currently. Got two different tests to work but I feel that is not enough and I need more. I am unsure about supporting the whole HYPHYGTEST so I may re-visit this on a later time!

In short:  May be the hint to HYPHYGTEST enables you to find out the
trick how the build time test suite is crafted.  However, since there is
no rule that autopkgtest should replicate the build time test feel free
to diverge from that test and craft your own instead.

Hope this helps

It did thanks!

        Andreas.




Reply to: