]> git.lyx.org Git - features.git/commitdiff
Cmake export tests: Make the destination directory for test results unique
authorKornel Benko <kornel@lyx.org>
Sat, 1 Aug 2020 07:35:20 +0000 (09:35 +0200)
committerKornel Benko <kornel@lyx.org>
Sat, 1 Aug 2020 07:35:20 +0000 (09:35 +0200)
Exporting files with identical names (but in different directories)
could lead to conflicts in parallel executed tests.

development/autotests/export.cmake

index a9f2a0154021e85d48a665b4e125758c511d6ddc..45a26351527793d3d3d3e18dbdb0c6c15a63f6c9 100755 (executable)
@@ -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}")