From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id WDaXL+0CT2MSKQAAbAwnHQ (envelope-from ) for ; Tue, 18 Oct 2022 21:47:57 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id cMynL+0CT2P9NQAAauVa8A (envelope-from ) for ; Tue, 18 Oct 2022 21:47:57 +0200 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 5514C8458 for ; Tue, 18 Oct 2022 21:47:57 +0200 (CEST) Received: from localhost ([::1]:38078 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oksZA-0000ct-H5 for larch@yhetil.org; Tue, 18 Oct 2022 15:47:56 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:52580) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oksXh-0000cl-NV for emacs-orgmode@gnu.org; Tue, 18 Oct 2022 15:46:26 -0400 Received: from smtp3-g21.free.fr ([2a01:e0c:1:1599::12]:17602) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oksXf-0006xl-Hh for emacs-orgmode@gnu.org; Tue, 18 Oct 2022 15:46:25 -0400 Received: from [IPV6:2a01:e35:39f3:4610:b65d:6cff:acab:eb92] (unknown [IPv6:2a01:e35:39f3:4610:b65d:6cff:acab:eb92]) (Authenticated sender: tbanelwebmin@free.fr) by smtp3-g21.free.fr (Postfix) with ESMTPSA id 2CF2813F8AC for ; Tue, 18 Oct 2022 21:46:19 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=free.fr; s=smtp-20201208; t=1666122379; bh=YzZHgg9G2puVME6CaQccaXQ+KU3VyWYuaiOkVXniZjE=; h=Date:Subject:To:References:From:In-Reply-To:From; b=jVNnS3yg/rRfneetVqmrcDu5l0Kl7ZbIQ86/0fhiJIRU3ASzwjx/2x3zq86Rb06I/ xR3FJM5zeStJF7zfLBZnmB1DlRtF8u/tFq+NXQ61hzflCi46YHS9FsWyxA4EsoalN1 Gjv+YbAXq7I+6pGRxE/M4G934f845A1ED4Y98ASap18bc9Jw69JOGmlMCzEpBYAQby fxpBrWYflwIJvuL1AgY7Sk8O+W7OfLOEsGyxQ2ZkSQNqSGQqQ99LIX8sh4WyJq+pXk +RpMVcipDF7qTJ2cA+nBjy5+Fc2wrE0Q2W7DEMg7LglfAul7qTdgAmpB2KIjfrfYFp 5FRdAvrlSsuSA== Message-ID: <732a0fde-208c-8cbe-b634-9b9aecf0c915@free.fr> Date: Tue, 18 Oct 2022 21:46:18 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.2.2 Subject: Re: [PATCH] Unit-test for Please add support for dlangs packagemanager to ob-C.el Content-Language: fr, en-US To: emacs-orgmode@gnu.org References: <8735c61y5o.fsf@localhost> From: tbanelwebmin In-Reply-To: <8735c61y5o.fsf@localhost> Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=2a01:e0c:1:1599::12; envelope-from=tbanelwebmin@free.fr; helo=smtp3-g21.free.fr X-Spam_score_int: -19 X-Spam_score: -2.0 X-Spam_bar: -- X-Spam_report: (-2.0 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, MIME_HTML_ONLY=0.1, NICE_REPLY_A=-0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1666122477; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=o1tLUryq2B3vdZYQj0AJgaVdoBUPXqBtNsEndY0wNW8=; b=mFgSdSMTrXzsg7sECo2gtJG9GJh5kyrHMFxzoVLAXWuhbSbwrts1+dLUv1db+Vb1nnpQMV VApuoqtAtjshvsFbCR/adoGdPG21u0L1HwUXVp+aI+r1tMz3EwnDw0yGTj39JGaK3ECuie g+7BSsxZvhD4WKLtfUpWYjzCpnv8/jjZq8Ny0FaupaBuZivgdf3S/2zGq+VtRKRQL3CO8g ++IlBdl0p0by3h0xUz11I1976kxbxWU3xieBXeqaKBeV0WEc7soDpDpBRX58zi3RWNhE+y ZBTVjMQPOJAjGI/N78OIEp3v2VsOQ9YR59YNGEcVTC8f8KBhBCBwb6JgdFhzJQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1666122477; a=rsa-sha256; cv=none; b=eBQTNNgB2FsX+5BK9fb8az4JEVw/dzGNypeHqVS70s742NcNlEVl+/T2XuhjcUumqJEkPA 2KpqmaT4+0SUG0lzZ6MmbAkRqzjDxEpat6H+b2w7FbuXYCrETMKnFBTSlB/C61R7ZRq0AU a5ReKtt+U/xDEe186YBuq6Wu80ze1smN7uOLW05aW18TirzDjBsMlsyD72f/zXdGtlX1SB 6GaAdVAHAivhxTXSFhBtHap3rNvfIZ/zqgEwXkDNHpNJm7ba6Il83KZJyTwB7NOgE+/LT6 r7KHoaTNzQiMcNx+KVEqcQNhWWv4Ejm48EbdGvhKnzYpTP7MqQp3snPGFo3lYQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=free.fr header.s=smtp-20201208 header.b=jVNnS3yg; dmarc=pass (policy=none) header.from=free.fr; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -3.62 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=free.fr header.s=smtp-20201208 header.b=jVNnS3yg; dmarc=pass (policy=none) header.from=free.fr; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 5514C8458 X-Spam-Score: -3.62 X-Migadu-Scanner: scn1.migadu.com X-TUID: 2xK29CyC7SvL For unit-testing Dlang, we could mock the «dub» command (compiler+packager). For instance, we could replace it by the «cat» Linux command, just while running the unit-test.

But the «cat» command introduces a new dependency on Linux. Is there a portable equivalent for «cat»?


On 10/2/22 09:29, Ihor Radchenko wrote:
Max Nikulin <manikulin@gmail.com> writes:

I am unsure concerning general policy related to org-babel test, so the 
following is rather discussion than a direct request to change the test.

Is there a way to avoid dependency on remote resources? My concern is 
test results affected by network issues. In addition, more required 3rd 
party tools means less probability that a developer after modification 
of generic babel code noticed that the changes break D backend because 
missing tool on the development machine. I have no idea how much efforts 
is required to create a mock for isolated environment.
Tests must not rely on remote resources.
However, it does not mean that we cannot test remote resources in Org
tests. One simply needs to mock the url-retrieve or whatever function is
used to retrieve remove resource.

Another point is that missed dub binary is not reflected in test report. 
If `skip-unless' feature of ert is available in Emacs-26 then it should 
be used.
The current approach to optional binaries is throwing
'missing-test-dependency error when the binary is not available.