From 92d8e3487bd58bd31af7ef6c5053b8a67aa79a50 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=A0t=C4=9Bp=C3=A1n=20Hor=C3=A1=C4=8Dek?= Date: Wed, 9 Nov 2022 21:01:42 +0100 Subject: [PATCH] use global lib for testing --- configure.ac | 4 ++-- Makefile.am | 5 +---- test/integration/PKCS11JavaTests.java | 2 +- test/integration/pkcs11-dbup.sh.nosetup | 2 +- 4 files changed, 5 insertions(+), 8 deletions(-) diff --git a/configure.ac b/configure.ac index 442ee87..d212b78 100644 --- a/configure.ac +++ b/configure.ac @@ -331,9 +331,9 @@ AC_DEFUN([integration_test_checks], [ AS_IF([test "x$tpm2_abrmd" != "xyes"], [AC_MSG_ERROR([Integration tests enabled but tpm2-abrmd executable not found.])]) - AM_PATH_PYTHON([3.7], + AM_PATH_PYTHON([3.6], [AC_SUBST([PYTHON_INTERPRETER], [$PYTHON])], - [AC_MSG_ERROR([Integration tests enabled but python >= 3.7 executable not found.])] + [AC_MSG_ERROR([Integration tests enabled but python >= 3.6 executable not found.])] ) AC_PYTHON_MODULE([$PYTHON], [pkcs11]) diff --git a/Makefile.am b/Makefile.am index 0f5e05b..c8dfc11 100644 --- a/Makefile.am +++ b/Makefile.am @@ -112,15 +112,12 @@ AM_TESTS_ENVIRONMENT = \ PYTHON_INTERPRETER=@PYTHON_INTERPRETER@ \ TEST_FUNC_LIB=$(srcdir)/test/integration/scripts/int-test-funcs.sh \ TEST_FIXTURES=$(abs_top_srcdir)/test/integration/fixtures \ - PATH=$(abs_top_srcdir)/tools:./src:$(PATH) \ - PYTHONPATH=$(abs_top_srcdir)/tools \ - TPM2_PKCS11_MODULE=$(abs_builddir)/src/.libs/libtpm2_pkcs11.so \ TEST_JAVA_ROOT=$(JAVAROOT) \ PACKAGE_URL=$(PACKAGE_URL) \ CC=$(CC) \ dbus-run-session -TESTS_LDADD = $(noinst_LTLIBRARIES) $(lib_LTLIBRARIES) $(p11lib_LTLIBRARIES) $(AM_LDFLAGS) $(CMOCKA_LIBS) $(CRYPTO_LIBS) +TESTS_LDADD = $(noinst_LTLIBRARIES) /usr/lib64/pkcs11/libtpm2_pkcs11.so $(AM_LDFLAGS) $(CMOCKA_LIBS) $(CRYPTO_LIBS) TESTS_CFLAGS = $(CMOCKA_CFLAGS) diff --git a/test/integration/PKCS11JavaTests.java b/test/integration/PKCS11JavaTests.java index 021c0bb..58e1409 100644 --- a/test/integration/PKCS11JavaTests.java +++ b/test/integration/PKCS11JavaTests.java @@ -38,7 +38,7 @@ public class PKCS11JavaTests { * */ String cwd = System.getProperty("user.dir"); - Path libPath = Paths.get(cwd, "src/.libs/libtpm2_pkcs11.so.0.0.0"); + Path libPath = Paths.get("/usr/lib64/pkcs11/libtpm2_pkcs11.so"); String version = System.getProperty("java.version"); String [] chunks = version.split("\\."); diff --git a/test/integration/pkcs11-dbup.sh.nosetup b/test/integration/pkcs11-dbup.sh.nosetup index 73f6f71..3a64716 100755 --- a/test/integration/pkcs11-dbup.sh.nosetup +++ b/test/integration/pkcs11-dbup.sh.nosetup @@ -67,7 +67,7 @@ echo "TPM2_PKCS11_STORE=$TPM2_PKCS11_STORE" # So we need to use the 1.0 tpm2_ptool # XXX should we prepend the current? # -PYTHONPATH=$tempdir/tpm2-pkcs11-$oldver/tools +export PYTHONPATH=$tempdir/tpm2-pkcs11-$oldver/tools echo $PYTHONPATH tpm2_ptool init -- 2.38.1