From 74551e7970b463aeda2deebe3777e31be78150b1 Mon Sep 17 00:00:00 2001 From: Noel Kuntze Date: Wed, 19 Oct 2022 22:26:08 +0200 Subject: [PATCH 4/4] tests: use better Makefile integration of test running --- tests/Makefile.am | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/tests/Makefile.am b/tests/Makefile.am index a85c81a6..32eb363e 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -434,13 +434,16 @@ subdirs += \ endif check: all - if [ ! -e $$HOME/.rnd ] ; then \ - openssl rand -writerand $$HOME/.rnd; \ + RANDFILE=$(top_builddir)/.rnd + if [ ! -e $(top_builddir)/.rnd ] ; then \ + openssl rand -writerand $(top_builddir)/.rnd; \ fi for required in certutil cmsutil pk12util openssl diff cmp mktemp \ - dos2unix unix2dos dbus-launch ; do \ - which $$required || exit 1; \ - done - env srcdir=$(srcdir) \ - builddir=$(top_builddir)/tests \ - $(srcdir)/run-tests.sh $(subdirs) + dos2unix unix2dos dbus-launch; do \ + if ! command -v $$required >/dev/null; then \ + echo $$required required but not available;\ + exit 1; \ + fi \ + done;\ + env;\ + RANDFILE=$(top_builddir)/.rnd srcdir=$(srcdir) builddir=$(top_builddir)/tests ./run-tests.sh $(subdirs) -- 2.38.1