diff --git a/debian/patches/fix-parallel-build.patch b/debian/patches/fix-parallel-build.patch new file mode 100644 index 0000000000000000000000000000000000000000..f575096c909b471120d312de4596059192da0823 --- /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/mosca/hdrl/tests/hdrl_multiiter-test.c ++++ b/mosca/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/mosca/hdrl/tests/hdrl_frameiter-test.c ++++ b/mosca/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 01835f1aa9a78ec005ec725cb63cabbdfb38a290..6c72ca6fa377b7526410b3d2041635b66e733039 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -4,3 +4,4 @@ Use-system-provided-sextractor-binary.patch Disable-buggy-libmosca-testsuite.patch Increase-tolerance-to-fix-FTBS-on-mips-mipsel64-and-ia64.patch Force-serial-tests-for-better-verbose-output.patch +fix-parallel-build.patch \ No newline at end of file