commit: 875bcd2e2e7d8738018303d6b2a71289fc782f58 Author: Alfred Wingate <parona <AT> protonmail <DOT> com> AuthorDate: Fri May 9 16:00:45 2025 +0000 Commit: Sam James <sam <AT> gentoo <DOT> org> CommitDate: Sun May 11 00:29:34 2025 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=875bcd2e
app-crypt/yubihsm-shell: hook up atleast some tests Most tests require a running connector, but any test is a better than no tests. So lets leave the rest to a TODO. Signed-off-by: Alfred Wingate <parona <AT> protonmail.com> Part-of: https://github.com/gentoo/gentoo/pull/42005 Signed-off-by: Sam James <sam <AT> gentoo.org> app-crypt/yubihsm-shell/yubihsm-shell-2.6.0.ebuild | 45 +++++++++++++++++++++- 1 file changed, 44 insertions(+), 1 deletion(-) diff --git a/app-crypt/yubihsm-shell/yubihsm-shell-2.6.0.ebuild b/app-crypt/yubihsm-shell/yubihsm-shell-2.6.0.ebuild index e3ab00ef57ef..7ea1e4b8c1fc 100644 --- a/app-crypt/yubihsm-shell/yubihsm-shell-2.6.0.ebuild +++ b/app-crypt/yubihsm-shell/yubihsm-shell-2.6.0.ebuild @@ -12,7 +12,6 @@ SRC_URI="https://developers.yubico.com/${PN}/Releases/${P}.tar.gz" LICENSE="Apache-2.0" SLOT="0" KEYWORDS="~amd64" -RESTRICT="test" DEPEND=" dev-libs/openssl:= @@ -41,3 +40,47 @@ src_configure() { cmake_src_configure } + +src_test() { + # TODO: hook up more tests. Requires unpackaged dependencies and hosting a connector. + # See https://github.com/Yubico/yubihsm-shell/issues/381 and the github workflow. + local CMAKE_SKIP_TESTS=( + # main: Assertion `yrc == YHR_SUCCESS' failed. + attest + generate_ec + generate_hmac + import_authkey + import_rsa + info + wrap + wrap_data + yubico_otp + echo + asym_auth + import_ec + generate_rsa + logs + ssh + decrypt_rsa + decrypt_ec + import_ed + change_authkey + encrypt_aes + # Unpackaged + # https://github.com/YubicoLabs/pkcs11test + # line 42: pkcs11test: command not found + pkcs11test + # open_session: Assertion `rv == CKR_OK' failed. + aes_encrypt_test + ecdh_derive_test + ecdh_sp800_test + rsa_enc_test + pss_sign_test + asym_wrap_test + # Requires unpackaged ghostunnel to host connector locally + # Failed connecting 'http://localhost:12345': Unable to find a suitable connector + bash_tests + wrapped_tests + ) + cmake_src_test +}
