mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-29 05:01:49 +00:00
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.
This commit is contained in:
parent
b75b0d2a83
commit
dbb72a370a
@ -74,7 +74,9 @@ if(format MATCHES "dvi|pdf")
|
|||||||
if(NOT _erg)
|
if(NOT _erg)
|
||||||
message(FATAL_ERROR "Export failed while converting")
|
message(FATAL_ERROR "Export failed while converting")
|
||||||
endif()
|
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()
|
else()
|
||||||
message(STATUS "Converting with perl ${Perl_Script}")
|
message(STATUS "Converting with perl ${Perl_Script}")
|
||||||
set(LYX_SOURCE "${TempDir}/${file}.lyx")
|
set(LYX_SOURCE "${TempDir}/${file}.lyx")
|
||||||
|
Loading…
Reference in New Issue
Block a user