Hi, pyznap has a test suite. It would be nice to add it to the port's Makefile. I've found out that it requires at least the following things to be added to the Makefile: > TEST_DEPENDS= ${PYTHON_PKGNAMEPREFIX}pytest>0:devel/py-pytest@${PY_FLAVOR} \ > ${PYTHON_PKGNAMEPREFIX}pytest-runner>0:devel/py-pytest-runner@${PY_FLAVOR} \ > faketime:devel/libfaketime > > do-test: > @cd ${WRKSRC} && ${PYTHON_CMD} ${PYDISTUTILS_SETUP} test There is a problem, however. The tests seem to be broken when I ran them in poudriere. I've opened a bug report in the upstream bug tracker.[1] If you could find some time to address those issues as a maintainer then the FreeBSD port of pyznap should be rock-solid! :) Cheers! [1]: https://github.com/yboetz/pyznap/issues/14
Thanks! Will look into this when pyznap maintainer has responded!
These changes are a candidate for implicit/blanket approval for framework/infrastructure compliance/changes Reporter is committer, assign accordingly
https://github.com/Duffyx/py-pyznap I tried to add tests, it succeeds the normal snapshot tests and so on as you can see in the test.log in the github repo. Altough when going to ssh tests its a mess... I don't think we can handle this correctly. pre-test: ${RM} *_ssh.py something like this LOL. The problem is that the tests of the program assumes that the local host is already set-up for ssh priv/public key authentication. This is not something we can guarentee for a poudriere build let alone a local "make test".
(In reply to Dries Michiels from comment #3) That's fine. Either rm or skip tests that you know cant/dont pass, or we cant support passing at the moment. Just include a #comment above that block that explains the issue, so that future people know, and can remember/try to fix them. The correct and permanent solution for tests to SKIP not fail if any required features (python package, uid = root, etc) or environment attributes (some binary at path, whatever) arent available.
I did some further research and its like Mateusz said; in a Poudriere enviroment the other tests fail too. ZFS isn't available in a Poudriere jail. When I execute "poudriere testport -i -o sysutils/py-pyznap -j head -p head" and then try to exectute a ZFS command in interactive mode it sais this every time: root@head-head:~ # zfs internal error: failed to initialize ZFS library root@head-default:~ # zpool internal error: failed to initialize ZFS library Should I create a PR for the above issue? When the ZFS/zpool command isn't available in a Poudriere jail, tests that use the ZFS/ZPOOL command will have a hard time passing. The tests do pass when not in a Poudriere jail, simply on the host with root privileges. Then all the standard ZFS tests pass. Are there any examples in the ports tree where tests are skipped based on env variables? I would like to check if executed from poudriere jail or host if thats possible?
(In reply to Dries Michiels from comment #5) I don't know any existing ports which need to delete certain tests in the pre-test phase. I'll ask people on IRC what they think about tests that does not work in poudriere. I'd try to commit the minimal set of tests which work everywhere for the time being.
Any news here?
Some bits for tests were committed in r494703. I'll close this PR for now. We can revisit it in the future if there is an interest.
Assign to committer that resolved (ports r494703)