From 3c32cf0a15701b6b24ba05ec457078b5b4c63696 Mon Sep 17 00:00:00 2001 From: Juergen Repp Date: Wed, 17 Jan 2024 10:36:11 +0100 Subject: [PATCH] cirrus ci: Fix race condition in make distcheck The removing of the ca files is added to clean-local and distclean-local in Makefile.am The deletion in clean-hook and uninstall-local is removed. "make -j check" is used instead of "make -j distcheck". Signed-off-by: Juergen Repp --- .cirrus.yml | 5 ++++- Makefile.am | 16 +++++++++++----- 2 files changed, 15 insertions(+), 6 deletions(-) diff --git a/.cirrus.yml b/.cirrus.yml index 91297e69a..2b638f8a2 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -28,6 +28,9 @@ task: - cd libusb && ./bootstrap.sh && ./configure && gmake -j install - cd - && rm -fr libusb script: + # + # Due to a race condition that only occurs in the cirrus ci, "make distcheck" has been replaced by "make check". + # ./bootstrap && ./configure --enable-self-generated-certificate --enable-unit=yes --enable-integration=yes --with-crypto=ossl --disable-doxygen-doc --enable-tcti-swtpm=no --enable-tcti-libtpms=no --enable-tcti-mssim=yes --disable-dependency-tracking && - gmake -j distcheck || { cat /tmp/cirrus-ci-build/tpm2-tss-*/_build/sub/test-suite.log; exit 1; } + gmake -j check || { cat /tmp/cirrus-ci-build/tpm2-tss-*/_build/sub/test-suite.log; exit 1; } diff --git a/Makefile.am b/Makefile.am index af0d83347..2327266f1 100644 --- a/Makefile.am +++ b/Makefile.am @@ -55,9 +55,16 @@ GITIGNOREFILES = "" if AUTOCONF_CODE_COVERAGE_2019_01_06 include $(top_srcdir)/aminclude_static.am clean-local: code-coverage-clean + -rm -r -f $(top_builddir)/ca distclean-local: code-coverage-dist-clean + -rm -r -f $(top_builddir)/ca else @CODE_COVERAGE_RULES@ +clean-local: + -rm -r -f $(top_builddir)/ca +distclean-local: + -rm -r -f $(top_builddir)/ca + endif GITIGNOREFILES += $(TSS_GITIGNOREFILES) CODE_COVERAGE_DIRECTORY = $(top_builddir)/src $(top_builddir)/test @@ -990,15 +997,11 @@ install-data-hook: install-dirs fi uninstall-local: - -rm -r -f $(top_builddir)/ca -rm $(DESTDIR)$(udevrulesdir)/$(udevrulesprefix)tpm-udev.rules cd $(DESTDIR)$(man3dir) && \ [ -L Tss2_TctiLdr_Initialize_Ex.3 ] && \ rm -f Tss2_TctiLdr_Initialize_Ex.3 || true -clean-hook: - -rm -r -f $(top_builddir)/ca - prepare-check: if INIT_CA $(top_srcdir)/script/ekca/init_ca.sh $(top_builddir) @@ -1037,7 +1040,10 @@ EXTRA_DIST += \ CLEANFILES += \ $(man3_MANS) \ - $(man7_MANS) + $(man7_MANS) \ + $(top_builddir)/ca + +DISTCLEANFILES += $(top_builddir)/ca # function to transform man .in files to man pages # $1: target