From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from [87.239.111.99] (localhost [127.0.0.1]) by dev.tarantool.org (Postfix) with ESMTP id A716064ED0E; Thu, 9 Nov 2023 16:09:01 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org A716064ED0E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1699535341; bh=7R3VqhGxL2oywjPb8i99+f5jr1MuYL1yzqIS6BrklZQ=; h=To:Date:In-Reply-To:References:Subject:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=BuZ5c81FfI4s/aMJ5fgokud+4JZK1gZgFOAaVO/LIGjd/6VLAFFKl3x6nJ8SSagUb edgQG2Bm9Nhx4OeeUmoqkK+6mpqDaiDr2x988hDSCtES/0mTEbuqjTDV1m3CkXkkZ9 8iUXLptdyxJzMEngVmUWEq8XFAGiFRuMu/EHBQVk= Received: from mail-ed1-f46.google.com (mail-ed1-f46.google.com [209.85.208.46]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id B759E64ED07 for ; Thu, 9 Nov 2023 16:08:47 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org B759E64ED07 Received: by mail-ed1-f46.google.com with SMTP id 4fb4d7f45d1cf-53b32dca0bfso1799484a12.0 for ; Thu, 09 Nov 2023 05:08:47 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1699535327; x=1700140127; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=V6lWBTqj7URSuQNqHWpJj3vgiL7wZZCqsxtRyTfKPic=; b=TAkYJfmQDdqWjyfl4LtthWs5tw9RnAa5IXStUfQY3V1NbZRPd8UeP0tL0yjbnYA823 3+kxRuRaaUTKlx3hCgKfxJOwRzI2EwZ4dus3K+X1kJ0CnU5Ea7XAty0JmqFbzUtUjh0F awQdgqaTWsiE5uRqVNXQzwwSNd2HeXJamEUMHVhjS0xj6xa5nBfvIxB00WeD0ZDqAVDU DlNfl6e0kEQp4s1kAQXodjghhNNp4TRa2GB3DuOZ1s0uBguc5vWxGoWZGC+r5EvWO/71 OHiiSVvSG/HPndGhN4/kfac0xr/R1b5pUMfaMVxxIJ3HzdMh2ucSFeSGYPSS+hFL1qLS xvUw== X-Gm-Message-State: AOJu0Yz10Bc4G7zizwXKEFADzjPc1z+7BKpmLvGGyjHy4LR8CSWzcCGX 3UaS9E3EnxwWcGzHLVTkD5SNh+j4Ua4= X-Google-Smtp-Source: AGHT+IFp9u4Dizw6D5Kz2Kvo9YccQycZhqldIUOi4M58qjE4LcV0r8wRCEN6WinSv0YAzadnFKdJYQ== X-Received: by 2002:aa7:cd8b:0:b0:541:342b:2469 with SMTP id x11-20020aa7cd8b000000b00541342b2469mr5384687edv.1.1699535326557; Thu, 09 Nov 2023 05:08:46 -0800 (PST) Received: from pony.. ([185.6.247.97]) by smtp.gmail.com with ESMTPSA id v10-20020aa7dbca000000b0052ff9bae873sm8022784edt.5.2023.11.09.05.08.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 09 Nov 2023 05:08:46 -0800 (PST) To: tarantool-patches@dev.tarantool.org, Sergey Kaplun , max.kokryashkin@gmail.com Date: Thu, 9 Nov 2023 16:08:38 +0300 Message-Id: <6ea1998ab3bf37b75e3f399fc55572bb99392c0f.1699534835.git.sergeyb@tarantool.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [Tarantool-patches] [PATCH luajit 2/3][v2] test: set dependencies to tarantool-tests explicitly X-BeenThere: tarantool-patches@dev.tarantool.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Sergey Bronnikov via Tarantool-patches Reply-To: Sergey Bronnikov Errors-To: tarantool-patches-bounces@dev.tarantool.org Sender: "Tarantool-patches" From: Sergey Bronnikov In testsuite `tarantool-tests` we are using CMake macro `BuildTestCLib` for building test C libraries. This macro builds a list `TESTLIBS` that contains all libraries required for tarantool tests. However, CMake skips adding C library to `TESTLIBS` on building test C library in the following commit. The patch removes `TESTLIBS` and adds each test C library as dependence to CMake target `tarantool-tests` explicitly using `add_dependence` command. --- test/tarantool-tests/CMakeLists.txt | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/test/tarantool-tests/CMakeLists.txt b/test/tarantool-tests/CMakeLists.txt index c15d6037..d46e69a0 100644 --- a/test/tarantool-tests/CMakeLists.txt +++ b/test/tarantool-tests/CMakeLists.txt @@ -10,6 +10,10 @@ if(NOT PROVE) return() endif() +add_custom_target(tarantool-tests + DEPENDS ${LUAJIT_TEST_BINARY} +) + macro(BuildTestCLib lib sources) add_library(${lib} SHARED EXCLUDE_FROM_ALL ${sources}) target_include_directories(${lib} PRIVATE @@ -37,12 +41,7 @@ macro(BuildTestCLib lib sources) CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS}" ) endif() - # XXX: Append the lib to be built to the dependency list. - # Unfortunately, there is no convenient way in CMake to extend - # the list in parent scope other than join two strings with - # semicolon. If one finds the normal way to make it work, feel - # free to reach me. - set(TESTLIBS "${lib};${TESTLIBS}" PARENT_SCOPE) + add_dependencies(tarantool-tests ${lib}) # Add the directory where the lib is built to the list with # entries for LUA_CPATH environment variable, so LuaJIT can find # and load it. See the comment about extending the list in the @@ -133,11 +132,6 @@ else() list(APPEND LUA_TEST_ENV_MORE LD_LIBRARY_PATH=${LD_LIBRARY_PATH}) endif() -# LUA_CPATH and LD_LIBRARY_PATH variables and also TESTLIBS list -# with dependecies are set in scope of BuildTestLib macro. -add_custom_target(tarantool-tests - DEPENDS ${LUAJIT_TEST_BINARY} ${TESTLIBS} -) add_custom_command(TARGET tarantool-tests COMMENT "Running Tarantool tests" COMMAND @@ -154,4 +148,3 @@ add_custom_command(TARGET tarantool-tests ${LUA_TEST_FLAGS} WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} ) - -- 2.34.1