[LyX/master] Cmake export tests: Make the destination directory for test results unique

Kornel Benko kornel at lyx.org
Sat Aug 1 07:14:22 UTC 2020


commit b62c6e896127f0c90d4558a90346943eeaf30d1a
Author: Kornel Benko <kornel at lyx.org>
Date:   Sat Aug 1 09:35:20 2020 +0200

    Cmake export tests: Make the destination directory for test results unique
    
    Exporting files with identical names (but in different directories)
    could lead to conflicts in parallel executed tests.
---
 development/autotests/export.cmake |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/development/autotests/export.cmake b/development/autotests/export.cmake
index a9f2a01..45a2635 100755
--- a/development/autotests/export.cmake
+++ b/development/autotests/export.cmake
@@ -48,6 +48,15 @@ if(ENCODING STREQUAL "default")
 else()
   set(_enc "_${ENCODING}")
 endif()
+
+# move the the last directory part of LYX_ROOT to filename
+# to make the destination unique for otherwise identical
+# filenames
+get_filename_component(updir_ "${LYX_ROOT}" DIRECTORY)
+get_filename_component(updir2_ "${LYX_ROOT}" NAME)
+set(file "${updir2_}/${file}")
+set(LYX_ROOT "${updir_}")
+
 if(format MATCHES "dvi|pdf")
   message(STATUS "LYX_TESTS_USERDIR = ${LYX_TESTS_USERDIR}")
   message(STATUS "Converting with perl ${Perl_Script}")


More information about the lyx-cvs mailing list