diff --git a/debian/patches/fix-parallel-build.patch b/debian/patches/fix-parallel-build.patch new file mode 100644 index 0000000000000000000000000000000000000000..c001259bd59eef96b057b64b31fc7f50d9036669 --- /dev/null +++ b/debian/patches/fix-parallel-build.patch @@ -0,0 +1,40 @@ +Description: Fix parallel build + hdrl_multiiter-test and hdrl_frameiter-test use the same base names for their + data with a pid suffix but remove all files without using the pid suffix : + + char * fn = cpl_sprintf("frameiter%zu_%zd.fits", i, (intptr_t)getpid()); + ... + if (system("rm -f frameiter*fits")) {} + + So potentially, in parallel builds, tests can remove the files from the + other one which happens systematically to me, which leads to a sigsev. + This fix removes only the pid suffixed .fits created by the current process. +Author: Frédéric Bonnard +--- +This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ +--- a/hdrl/tests/hdrl_multiiter-test.c ++++ b/hdrl/tests/hdrl_multiiter-test.c +@@ -231,7 +231,9 @@ + cpl_test_error(CPL_ERROR_NONE); + + cpl_frameset_delete(frames); +- if (system("rm -f frameiter*fits")) {} ++ char * rm_fns = cpl_sprintf("rm -fr frameiter*_%zd.fits", (intptr_t)getpid()); ++ if (system(rm_fns)) {} ++ cpl_free(rm_fns); + + cpl_test_error(CPL_ERROR_NONE); + +--- a/hdrl/tests/hdrl_frameiter-test.c ++++ b/hdrl/tests/hdrl_frameiter-test.c +@@ -292,7 +292,9 @@ + } + + cpl_frameset_delete(frames); +- if (system("rm -f frameiter*fits")) {} ++ char * rm_fns = cpl_sprintf("rm -fr frameiter*_%zd.fits", (intptr_t)getpid()); ++ if (system(rm_fns)) {} ++ cpl_free(rm_fns); + } + + /*----------------------------------------------------------------------------*/ diff --git a/debian/patches/series b/debian/patches/series index b5461a10ba70e4a187ff4208308605739bdf44b5..e7422518a7878b1ad52d54395250f3b83c09d7e1 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -2,3 +2,4 @@ Set-the-plugin-directory-so-that-esorex-and-python-cpl-ca.patch Force-serial-tests-to-get-better-verbose-output.patch Add-missing-lcpldrs-to-xsh_cfg_recover-recipe.patch Temporarily-disable-XSH_SDP_KEYWORD_APERTURE-test.patch +fix-parallel-build.patch