You've already forked opencryptoki
mirror of
https://github.com/opencryptoki/opencryptoki.git
synced 2026-10-24 05:39:17 +03:00
This patch will look for the PKCS11_TEST_USER environemnt variable and if set, will run the testsuite as that user instead of root. If the env var is missing, the tests are run as root. Signed-off-by: Kent Yoder <key@linux.vnet.ibm.com> testcases/Makefile.am | 6 +++++- 1 files changed, 5 insertions(+), 1 deletions(-)
34 lines
1.1 KiB
Makefile
34 lines
1.1 KiB
Makefile
SUBDIRS=common driver init_tok mkobj oc-digest rsa_keygen rsa_test speed test_crypto threadmkobj tok_obj v2.11 login
|
|
|
|
noinst_SCRIPTS = ock_tests.sh init_token.sh
|
|
|
|
EXTRA_DIST = ock_tests.sh.in init_token.sh.in
|
|
|
|
CLEANFILES = ock_tests.sh init_token.sh
|
|
|
|
ock_tests.sh: ock_tests.sh.in
|
|
@SED@ -e s!\@localstatedir\@!"@localstatedir@"!g \
|
|
-e s!\@sbindir\@!"@sbindir@"!g \
|
|
-e s!\@libdir\@!"@libdir@"!g < $< > $@-t
|
|
@CHMOD@ a+x $@-t
|
|
mv $@-t $@
|
|
|
|
init_token.sh: init_token.sh.in
|
|
@SED@ -e s!\@localstatedir\@!"@localstatedir@"!g \
|
|
-e s!\@sbindir\@!"@sbindir@"!g \
|
|
-e s!\@libdir\@!"@libdir@"!g < $< > $@-t
|
|
@CHMOD@ a+x $@-t
|
|
mv $@-t $@
|
|
|
|
|
|
installcheck-local: all
|
|
killall -HUP pkcsslotd || true
|
|
@sbindir@/pkcs11_startup
|
|
@sbindir@/pkcsslotd
|
|
if test ! -z ${PKCS11_TEST_USER}; then \
|
|
su ${PKCS11_TEST_USER} -c "PKCS11_SO_PIN=76543210 PKCS11_USER_PIN=01234567 PKCSLIB=@libdir@/opencryptoki/libopencryptoki.so sh ./ock_tests.sh"; \
|
|
else \
|
|
PKCS11_SO_PIN=76543210 PKCS11_USER_PIN=01234567 PKCSLIB=@libdir@/opencryptoki/libopencryptoki.so sh ./ock_tests.sh; \
|
|
fi
|
|
killall -HUP pkcsslotd
|