summaryrefslogtreecommitdiff
path: root/solenv
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2023-11-17 14:23:41 +0100
committerStephan Bergmann <sbergman@redhat.com>2023-11-17 16:57:01 +0100
commit533e993f2d11814252c40d60bdab469de03b14db (patch)
tree862e5710fc3fbfe3d1e0e14ac658ddd11da08891 /solenv
parent1750078e3ace30d3ad9798feb81239688b1ea869 (diff)
Don't reuse --unit values across (sequential, even) systemd-run invocations
At least some old versions of systemd-run apparently have occasional issues when sequential invocations reuse the same --unit value, as <https://ci.libreoffice.org/job/lo_ubsan/2982/> now (i.e., after the machine was updated to auto-detect --with-coredumpctl) failed with > [build CUT] basctl_dialogs_test > LO_TEST_LOCALE=de > Running scope as unit: -home-tdf-lode-jenkins-workspace-lo_ubsan-workdir-CppunitTest-basctl_dialogs_test.test:20231117013657:704127.scope [...] > LO_TEST_LOCALE=en-US > Running scope as unit: -home-tdf-lode-jenkins-workspace-lo_ubsan-workdir-CppunitTest-basctl_dialogs_test.test:20231117013657:704127.scope [...] > LO_TEST_LOCALE=fi > Failed to start transient scope unit: Unit -home-tdf-lode-jenkins-workspace-lo_ubsan-workdir-CppunitTest-basctl_dialogs_test.test:20231117013657:704127.scope already exists. Change-Id: If009e26231228bec739637e4140be90c0b86d6b2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159569 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'solenv')
-rw-r--r--solenv/gbuild/CppunitTest.mk7
1 files changed, 4 insertions, 3 deletions
diff --git a/solenv/gbuild/CppunitTest.mk b/solenv/gbuild/CppunitTest.mk
index 18af97e7fff1..adfcccce49fb 100644
--- a/solenv/gbuild/CppunitTest.mk
+++ b/solenv/gbuild/CppunitTest.mk
@@ -27,7 +27,7 @@ gb_CppunitTest_coredumpctl_setup :=
gb_CppunitTest_coredumpctl_run :=
else
gb_CppunitTest_coredumpctl_setup = \
- export LIBO_TEST_UNIT=$$($(SYSTEMD_ESCAPE) "$1:$$(date -u +%Y%m%d%H%M%S):$$$$" | cut -b -249) &&
+ export LIBO_TEST_UNIT=$$($(SYSTEMD_ESCAPE) "$1:$$(date -u +%Y%m%d%H%M%S):$$$$$(if $2,:$2)" | cut -b -249) &&
gb_CppunitTest_coredumpctl_run := $(SYSTEMD_RUN) --scope --user --unit="$$LIBO_TEST_UNIT"
endif
@@ -135,10 +135,11 @@ else
$(if $(gb_CppunitTest__interactive),, \
$(if $(value gb_CppunitTest_postprocess), \
rm -fr $@.core && mkdir $@.core && cd $@.core &&)) \
- $(call gb_CppunitTest_coredumpctl_setup,$@) \
( \
$(if $(gb_CppunitTest_localized),for l in $(WITH_LANG_LIST) ; do \
- printf 'LO_TEST_LOCALE=%s\n' "$$l" && LO_TEST_LOCALE="$$l" ) \
+ printf 'LO_TEST_LOCALE=%s\n' "$$l" && ) \
+ $(call gb_CppunitTest_coredumpctl_setup,$@,$(if $(gb_CppunitTest_localized),$$l)) \
+ $(if $(gb_CppunitTest_localized),LO_TEST_LOCALE="$$l") \
$(if $(gb_CppunitTest__vcl_no_svp), \
$(filter-out SAL_USE_VCLPLUGIN=svp,$(gb_TEST_ENV_VARS)),$(gb_TEST_ENV_VARS)) \
$(EXTRA_ENV_VARS) \