Am Sun, 15 Nov 2020 23:48:55 +0100 schrieb Kornel Benko <kor...@lyx.org>:
> Am Sun, 15 Nov 2020 23:10:48 +0100 (CET) > schrieb Scott Kostyshak <skost...@lyx.org>: > > > commit dbb72a370aa8117c7dee645b195664115a7b70ed > > Author: Scott Kostyshak <skost...@lyx.org> > > Date: Sun Nov 15 17:40:02 2020 -0500 > > > > ctests: fix race condition for parallel testing > > > > The unicode tests would often fail when tested in parallel because > > we were not exporting to unique file names. From what I understand, > > a variant similar to the following race condition occurred: > > > > 1. Thread A exports to file blah.pdf. > > 2. Thread B exports to file blah.pdf. > > 3. Thread A confirms file blah.pdf exists. > > 4. Thread A deletes exported file blah.pdf to clean up. > > 5. Thread B fails to find file blah.pdf and reports a failure. > > --- > > development/autotests/export.cmake | 4 +++- > > 1 files changed, 3 insertions(+), 1 deletions(-) > > > > diff --git a/development/autotests/export.cmake > > b/development/autotests/export.cmake > > index d2a0356..1384800 100755 > > --- a/development/autotests/export.cmake > > +++ b/development/autotests/export.cmake > > @@ -74,7 +74,9 @@ if(format MATCHES "dvi|pdf") > > if(NOT _erg) > > message(FATAL_ERROR "Export failed while converting") > > endif() > > - set(result_file_name ${file}_${_ft}.${extension}) > > + # We only need "_${ENCODING}" for unicode tests (because multiple > > encodings > > + # are tested with the same format), but doesn't hurt to include for all. > > + set(result_file_name ${file}_${_ft}_${ENCODING}.${extension}) > > else() > > message(STATUS "Converting with perl ${Perl_Script}") > > set(LYX_SOURCE "${TempDir}/${file}.lyx") > > GOOD CATCH :) > > Kornel OTOH, it should not matter, because each test runs in its own temporary directory ${TempDir}. (See export.cmake:40, 42) Kornel
pgp1n1OZnxm1k.pgp
Description: Digitale Signatur von OpenPGP
-- lyx-devel mailing list lyx-devel@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-devel