From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp47.i.mail.ru (smtp47.i.mail.ru [94.100.177.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id B44D2469719 for ; Thu, 15 Oct 2020 19:26:25 +0300 (MSK) From: "Timur Safin" References: <11457da6c5f5f29b511a809cbc0908b19458d284.1602778378.git.tsafin@tarantool.org> In-Reply-To: <11457da6c5f5f29b511a809cbc0908b19458d284.1602778378.git.tsafin@tarantool.org> Date: Thu, 15 Oct 2020 19:26:24 +0300 Message-ID: <044401d6a30f$ecd50a30$c67f1e90$@tarantool.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Content-Language: ru Subject: Re: [Tarantool-patches] (no subject) List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: imun@tarantool.org, alexander.turenko@tarantool.org Cc: tarantool-patches@dev.tarantool.org Sorry for not subject - will fix it soon. : -----Original Message----- : From: Timur Safin : Sent: Thursday, October 15, 2020 7:20 PM : To: imun@tarantool.org; alexander.turenko@tarantool.org : Cc: Timur Safin ; tarantool- : patches@dev.tarantool.org : Subject: : : Subject: [PATCH] luajit - avoid hardcode of paths to luajit test : : We try to avoid hardcode of paths to LuaJIT tests, which : live in the 3rd party repository and might get updated : without our notice. : : - to simplify cmake code we introduce symlink inside of `test` : directory which is now pointing to `third_party/luajit/test` : subdirectory : - and we use `file(GLOB...)` statement now to propagate list : of all available test directories we found inside of luajit : submodule. : : Closes #5425 : --- : test/CMakeLists.txt | 14 +++++++++++--- : test/luajit | 1 + : 2 files changed, 12 insertions(+), 3 deletions(-) : create mode 120000 test/luajit : : diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt : index 7b28e2bd4..8e36cba6c 100644 : --- a/test/CMakeLists.txt : +++ b/test/CMakeLists.txt : @@ -20,6 +20,16 @@ function(build_lualib lib sources) : endif(TARGET_OS_DARWIN) : endfunction() : : +macro(add_subdirectories base_directory) : + file(GLOB entries RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} : "${base_directory}/*") : + foreach(entry ${entries}) : + if (IS_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/${entry}) : + add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/${entry} : + ${PROJECT_BINARY_DIR}/${entry}) : + endif() : + endforeach() : +endmacro() : + : add_compile_flags("C;CXX" : "-Wno-unused-parameter") : : @@ -75,9 +85,7 @@ add_subdirectory(app-tap) : add_subdirectory(box) : add_subdirectory(box-tap) : add_subdirectory(unit) : -add_subdirectory(${PROJECT_SOURCE_DIR}/third_party/luajit/test/gh-4427- : ffi-sandwich ${PROJECT_BINARY_DIR}/third_party/luajit/test/gh-4427-ffi- : sandwich) : -add_subdirectory(${PROJECT_SOURCE_DIR}/third_party/luajit/test/lj-flush- : on-trace ${PROJECT_BINARY_DIR}/third_party/luajit/test/lj-flush-on-trace) : -add_subdirectory(${PROJECT_SOURCE_DIR}/third_party/luajit/test/misclib- : getmetrics-capi ${PROJECT_BINARY_DIR}/third_party/luajit/test/misclib- : getmetrics-capi) : +add_subdirectories(luajit) : : # Move tarantoolctl config : if (NOT ${PROJECT_BINARY_DIR} STREQUAL ${PROJECT_SOURCE_DIR}) : diff --git a/test/luajit b/test/luajit : new file mode 120000 : index 000000000..c83b4ed65 : --- /dev/null : +++ b/test/luajit : @@ -0,0 +1 @@ : +../third_party/luajit/test : \ No newline at end of file : -- : 2.20.1