From patchwork Wed May 7 12:12:20 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gert Doering X-Patchwork-Id: 4241 Return-Path: Delivered-To: patchwork@openvpn.net Received: by 2002:a05:7000:e147:b0:656:592e:a137 with SMTP id nw7csp3529744mab; Wed, 7 May 2025 05:13:01 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXFL5HMNfh49aMRM6QNC7oEbbzSlcUVEm3PyYzNXWqyVZH5xpLdnIi0fRfAQcWOgehJ+16XYYMLVrE=@openvpn.net X-Google-Smtp-Source: AGHT+IEfBGsBY+6i65FQjK//XF8CjLI6RSjta9mJSICuKDJW5bQZW/9h7iAfRxBVNGJT9BRVYghw X-Received: by 2002:a05:6e02:3805:b0:3a7:88f2:cfa9 with SMTP id e9e14a558f8ab-3da7390856dmr26043685ab.11.1746619981342; Wed, 07 May 2025 05:13:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1746619981; cv=none; d=google.com; s=arc-20240605; b=cCB3uTsouN0IePhSXxCUbQq2CgTUSgBTtyTa7GnDFN0bA88SEpGINYwi3TCBDNixNl qPAmx0dPhI1NrQe4AOsKU9yQ6fINr3sWn1dDE9DIeVAQVVoCZub+WYbSZ5Wr28rZLVbW af/OEJLKK3hQ3xL8yvoOn04NSL96EvWeuHTBRYASWw4SJR2IQlwhGzDRbK66b5NGBsB8 YyyuOs99Cqyx+zSrfP/7PFA5ICge7zqhbeAxkkE3hkiG3CJjLzmsVLQqbKVUDk8T4rxu L+6edwboPcCBJeg0HUU6CM9jUK0jw3TXenftR+9zlZpgcV1/ETHq50MmwRLtv/y2FcXp D5Xw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=errors-to:content-transfer-encoding:list-subscribe:list-help :list-post:list-archive:list-unsubscribe:list-id:precedence:subject :mime-version:references:in-reply-to:message-id:date:to:from :dkim-signature:dkim-signature:dkim-signature; bh=qdZoaeRAaL8AjFBQjf9raUavglCPig326gwj0pOA62M=; fh=4NbAC/LsuMLI0S0hprUlLSLCiHwg6SCAifhH718Jh0Q=; b=Ggtvrmr13vxoLDIzqXuEpxfYHyoKhvwVb4FZl5e+V2DWz+ZgFQ7PiF1tFIzHz03/o3 tduOuXg1v7Xs5Hodpb1Ep/gwMw1SWsg1EebENXmfIUd5MCvMOGPkxrj5T7xJZ8aaGnZz 0uVKPpf9XAiVfFE+73l6q7DOr0Hcd3Zh7FsaUKSG6ys6d7vv39gSCs+DMTkLgCsQf+Fq JdzO0RRyU/DENEvJjvHE2Gu0BFepH6N8fZyu3bEJ2WDanJFOGSVaqTgqUJXvs/cmGbR5 h4oAOMheDo0iG28621FDzjslKvKCAkmgsA1e0JGPYGuB0wpahUIkO3PMWTk+fgEDHYbO U3Rg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lists.sourceforge.net header.s=beta header.b=YfWW6w6h; dkim=neutral (body hash did not verify) header.i=@sourceforge.net header.s=x header.b=gNTDMMQw; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b=DPcKL50z; spf=pass (google.com: domain of openvpn-devel-bounces@lists.sourceforge.net designates 216.105.38.7 as permitted sender) smtp.mailfrom=openvpn-devel-bounces@lists.sourceforge.net; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=muc.de Received: from lists.sourceforge.net (lists.sourceforge.net. [216.105.38.7]) by mx.google.com with ESMTPS id 8926c6da1cb9f-4f88aa3753fsi13859542173.101.2025.05.07.05.13.01 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 07 May 2025 05:13:01 -0700 (PDT) Received-SPF: pass (google.com: domain of openvpn-devel-bounces@lists.sourceforge.net designates 216.105.38.7 as permitted sender) client-ip=216.105.38.7; Authentication-Results: mx.google.com; dkim=pass header.i=@lists.sourceforge.net header.s=beta header.b=YfWW6w6h; dkim=neutral (body hash did not verify) header.i=@sourceforge.net header.s=x header.b=gNTDMMQw; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b=DPcKL50z; spf=pass (google.com: domain of openvpn-devel-bounces@lists.sourceforge.net designates 216.105.38.7 as permitted sender) smtp.mailfrom=openvpn-devel-bounces@lists.sourceforge.net; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=muc.de DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.sourceforge.net; s=beta; h=Content-Transfer-Encoding:Content-Type: List-Subscribe:List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id: Subject:MIME-Version:References:In-Reply-To:Message-ID:Date:To:From:Sender: Reply-To:Cc:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=qdZoaeRAaL8AjFBQjf9raUavglCPig326gwj0pOA62M=; b=YfWW6w6hCPa/02v60jIIDptXld XKUETrI2Dcne2QuRdWxLSB9oRfPJJS9P8aP1ti5hbzLTtOKW5ctqYLxYEBtgU8g+NrxanIruoYsvT kw3zUbvfmm+VmQGqjFEF+w/PTa2+BAo9aW1KUsd5JADTyPzXz7U78dpAiVBp2nkyrsQA=; Received: from [127.0.0.1] (helo=sfs-ml-3.v29.lw.sourceforge.com) by sfs-ml-3.v29.lw.sourceforge.com with esmtp (Exim 4.95) (envelope-from ) id 1uCddx-0000ol-QK; Wed, 07 May 2025 12:12:57 +0000 Received: from [172.30.29.66] (helo=mx.sourceforge.net) by sfs-ml-3.v29.lw.sourceforge.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1uCddw-0000oZ-Pw for openvpn-devel@lists.sourceforge.net; Wed, 07 May 2025 12:12:56 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sourceforge.net; s=x; h=Content-Transfer-Encoding:MIME-Version:References: In-Reply-To:Message-ID:Date:Subject:To:From:Sender:Reply-To:Cc:Content-Type: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=qJwoDtPKqfMzCCiGzn1QvwEuR2BXX4Ta9Zav44TOjko=; b=gNTDMMQwM7IPUhkuQpyDOi/aEX 7DAjU+SbmGoAzQ689sx9rrlYBmBGZ+83GvJ5hX2TtRmP06h7zpGeFqNFGb1X487C3/zcK/WUZx/8x eEdVWxN+bIof0v829/GIzi75c5Gw9fiHiJjtmmpED/A0lmnw1ABzQacY/Z4mjsoOGwbE=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; h=Content-Transfer-Encoding:MIME-Version:References:In-Reply-To:Message-ID: Date:Subject:To:From:Sender:Reply-To:Cc:Content-Type:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=qJwoDtPKqfMzCCiGzn1QvwEuR2BXX4Ta9Zav44TOjko=; b=DPcKL50zJhkYXs0aDEK2wp9KTf 0mDy/EVVGRzCZInnSiGyEkYesGKv/zfuqTdH5vRMVAYagDaghiMCKuyBQ1+szUtuRyJv4AAGONNVN bOcBWaBhzDm2mLV14Bifc+msbfwGGnmWSEn5sDZ91sFn9WL/+ZTKc58DXy9u/an8aMTM=; Received: from [193.149.48.143] (helo=blue.greenie.muc.de) by sfi-mx-2.v28.lw.sourceforge.com with esmtps (TLS1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.95) id 1uCddf-0004R2-3o for openvpn-devel@lists.sourceforge.net; Wed, 07 May 2025 12:12:55 +0000 Received: from blue.greenie.muc.de (localhost [127.0.0.1]) by blue.greenie.muc.de (8.17.1.9/8.17.1.9) with ESMTP id 547CCRbN013838 for ; Wed, 7 May 2025 14:12:27 +0200 Received: (from gert@localhost) by blue.greenie.muc.de (8.17.1.9/8.17.1.9/Submit) id 547CCRWh013837 for openvpn-devel@lists.sourceforge.net; Wed, 7 May 2025 14:12:27 +0200 From: Gert Doering To: openvpn-devel@lists.sourceforge.net Date: Wed, 7 May 2025 14:12:20 +0200 Message-ID: <20250507121226.13824-1-gert@greenie.muc.de> X-Mailer: git-send-email 2.49.0 In-Reply-To: References: MIME-Version: 1.0 X-Spam-Score: 1.3 (+) X-Spam-Report: Spam detection software, running on the system "6901ab67b84d", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: From: Frank Lichtenheld This makes sure that it is properly normalized, and on Windows seems to prevent CMake from using back slashes which would break the build due to "unknown escape sequence" errors. Content analysis details: (1.3 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 1.3 RDNS_NONE Delivered to internal network by a host with no rDNS X-Headers-End: 1uCddf-0004R2-3o Subject: [Openvpn-devel] [PATCH v1] CMake: Make sure to treat UNIT_TEST_SOURCEDIR as path X-BeenThere: openvpn-devel@lists.sourceforge.net X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: openvpn-devel-bounces@lists.sourceforge.net X-getmail-retrieved-from-mailbox: Inbox X-GMAIL-THRID: =?utf-8?q?1831463793474845314?= X-GMAIL-MSGID: =?utf-8?q?1831463793474845314?= From: Frank Lichtenheld This makes sure that it is properly normalized, and on Windows seems to prevent CMake from using back slashes which would break the build due to "unknown escape sequence" errors. Change-Id: I2551edfaaf5107649398a3fa1db2009ee8644671 Signed-off-by: Frank Lichtenheld Acked-by: Arne Schwabe --- This change was reviewed on Gerrit and approved by at least one developer. I request to merge it to master. Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/981 This mail reflects revision 1 of this Change. Acked-by according to Gerrit (reflected above): Arne Schwabe diff --git a/CMakeLists.txt b/CMakeLists.txt index a8fb64b..6687b56 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -679,11 +679,11 @@ endif () foreach (test_name ${unit_tests}) + cmake_path(SET _UT_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/tests/unit_tests/openvpn) # test_networking needs special environment if (NOT ${test_name} STREQUAL "test_networking") add_test(${test_name} ${test_name}) # for compat with autotools make check - set(_UT_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/tests/unit_tests/openvpn) set_tests_properties(${test_name} PROPERTIES ENVIRONMENT "srcdir=${_UT_SOURCE_DIR}") endif () @@ -703,7 +703,7 @@ # for compat with IDEs like Clion that ignore the tests properties # for the environment variable srcdir when running tests as fallback - target_compile_definitions(${test_name} PRIVATE "-DUNIT_TEST_SOURCEDIR=\"${CMAKE_SOURCE_DIR}/tests/unit_tests/openvpn\"") + target_compile_definitions(${test_name} PRIVATE "UNIT_TEST_SOURCEDIR=\"${_UT_SOURCE_DIR}\"") if (NOT ${test_name} STREQUAL "test_buffer") target_sources(${test_name} PRIVATE