From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id qDBRIb4WdmKwzAAAbAwnHQ (envelope-from ) for ; Sat, 07 May 2022 08:50:38 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id 4DQzIb4WdmIO0gAA9RJhRA (envelope-from ) for ; Sat, 07 May 2022 08:50:38 +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 33654EC08 for ; Sat, 7 May 2022 08:50:37 +0200 (CEST) Received: from localhost ([::1]:48458 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nnEGx-0001Eu-OU for larch@yhetil.org; Sat, 07 May 2022 02:50:35 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:49592) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nnEGu-0001DX-1t for gwl-devel@gnu.org; Sat, 07 May 2022 02:50:32 -0400 Received: from sender4-of-o50.zoho.com ([136.143.188.50]:21095) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nnEGs-0004TF-2s for gwl-devel@gnu.org; Sat, 07 May 2022 02:50:31 -0400 ARC-Seal: i=1; a=rsa-sha256; t=1651906213; cv=none; d=zohomail.com; s=zohoarc; b=hA8g78wA/ogrmPvNJjIdwK58u+EatwqlzCtXAWMwUMfFw9zDfz8dfoqbcOqnA3LLVweVyA4jlZaoQfL/pbKZCZBwPzia6viI1cfjAUtpPwrtAJGKZ5pKeGijAMyF5l3D3dBjr4aOYPc/RZJ6/il1n6LGttr3LLCLNSOvXnfqakE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1651906213; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To; bh=Anc36Z0f9t95r4nXMAh07em2SD2JHzHtRr+H2V8IWow=; b=Bl6gdd+kSfm/P16LjgYQTV47Y95MzVszejCK9yRO5owN2iTKz6yAHYCi7Jh9eDxt4hMNGyAoFH4Z+w4pJ9IcSOAvU9fvyK4NMs6qwnPd8mqeJ7O6kfRgkzP7CJKrzjvgVk+R8iAaTIxqENT0tRusaFUAjJVPLdSPLIJobyE6//Y= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass header.i=elephly.net; spf=pass smtp.mailfrom=rekado@elephly.net; dmarc=pass header.from= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1651906213; s=zoho; d=elephly.net; i=rekado@elephly.net; h=References:From:From:To:To:Cc:Cc:Subject:Subject:Date:Date:In-reply-to:Message-ID:MIME-Version:Content-Type:Content-Transfer-Encoding:Message-Id:Reply-To; bh=Anc36Z0f9t95r4nXMAh07em2SD2JHzHtRr+H2V8IWow=; b=RLu5Cj0ZH8QEzvxEApZjGJ0IASBSj2r38bTQoeUyRqzqb5q7somKKwJBePRWNA01 IUZbndyTBTJvz4AHAydVHbo4F/xLA9XJHcDuAI3Rei2RiBKL8e/OpI96GmDF1dFQlS8 ZIET9xrmsfOtfXpd0kmUYenFkndfaEDp51/1nyN8= Received: from localhost (i5E862DE4.versanet.de [94.134.45.228]) by mx.zohomail.com with SMTPS id 1651906212713502.35173966334105; Fri, 6 May 2022 23:50:12 -0700 (PDT) References: <20220429175500.17176-1-olivier.dion@polymtl.ca> <87sfpvzkmj.fsf@elephly.net> <87sfpva9ch.fsf@laura> User-agent: mu4e 1.6.10; emacs 28.0.50 From: Ricardo Wurmus To: Olivier Dion Cc: gwl-devel@gnu.org Subject: Re: [PATCH] tests/examples: Add running of workflow examples Date: Sat, 07 May 2022 08:46:31 +0200 In-reply-to: <87sfpva9ch.fsf@laura> X-URL: https://elephly.net X-PGP-Key: https://elephly.net/rekado.pubkey X-PGP-Fingerprint: BCA6 89B6 3655 3801 C3C6 2150 197A 5888 235F ACAC Message-ID: <871qx5u99a.fsf@elephly.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-ZohoMailClient: External Received-SPF: pass client-ip=136.143.188.50; envelope-from=rekado@elephly.net; helo=sender4-of-o50.zoho.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: gwl-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gwl-devel-bounces+larch=yhetil.org@gnu.org Sender: "gwl-devel" X-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1651906238; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc: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=Anc36Z0f9t95r4nXMAh07em2SD2JHzHtRr+H2V8IWow=; b=kSDqmWLxqs9Llo6VVTy8FBG7OTSWCznlvFzS5uB4wYmqf9ijE8ejTmTQHpMkUH3dth/lcf tmBHc/jfrlHT+se8WmKFDTtnHoZ75HiI9a3fzyO76LJ9RV7O+oo30wL+X2V1rnyDbfoKuE EekAeJGWqNXHGDQ1ZXG+/6FczxW3juqRskCsX034vVbgMXhoHxHXk6dtZ36yc8wzO/9uPx H6AC+d3/l1Q8Enw4sRilmuOKVf9BU+RP1BiOAxsijwYdqYzkeHjDalJFjy+myLskMkm5cF 8jAJ7p6YodHPdEkyACoG587DAfVzmREe/pccLgxxzN7BiQ4k6h1E4RoiHGMJAQ== ARC-Seal: i=2; s=key1; d=yhetil.org; t=1651906238; a=rsa-sha256; cv=pass; b=N6FX6BBMQCfKMGZbxhF7Rd0NIUfXoxqOgVdSJAhClRRSDLkIZ8R1ATs9omemOElk6jPPp0 9ja5X6Dgn5dl0rXp9Ev3CXPhUvdif6EssKCSbh3T0SQj2Vvk6LiRMZQ9/vc4LcPeXrO9PJ Yh0gfnC2eT+j/YRclU0AkBbSxqYZUqqYXifVMFZ8+QUTOTAQIdzdGCPd37Tvj4i+SPOJCy bvSAId40q4ic2yutK9iZ8BHp0+8eZ98zBzHStPQddsosOXp/yahQYXrNxRFjLk6y6f4tZJ ZXQwyKOj9YySZzhNOYXaPMS74q5l6ps8c6wbU4ixy5GoZ0OYPTKBmxBWa9ab+w== ARC-Authentication-Results: i=2; aspmx1.migadu.com; dkim=pass header.d=elephly.net header.s=zoho header.b=RLu5Cj0Z; arc=pass ("zohomail.com:s=zohoarc:i=1"); dmarc=none; spf=pass (aspmx1.migadu.com: domain of "gwl-devel-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="gwl-devel-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -5.30 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=elephly.net header.s=zoho header.b=RLu5Cj0Z; arc=pass ("zohomail.com:s=zohoarc:i=1"); dmarc=none; spf=pass (aspmx1.migadu.com: domain of "gwl-devel-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="gwl-devel-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 33654EC08 X-Spam-Score: -5.30 X-Migadu-Scanner: scn0.migadu.com X-TUID: sDxCe15Sm+z7 Olivier Dion writes: >>> + (define scenarios >>> + (list "extended-example-workflow.w")) >> >> Should these better be discovered automatically via SCANDIR? > > Well some example are not full workflow. Only processes. So I think that > yes, if we set a common prefix for full workflow: > > (scandir "." (cut string-prefix "exemple-workflow" <>)) > > However, it's nice -- even more true when debugging -- to be able to > cherry-pick the tests. This is easier with the list above by commenting > tests that are passing. That makes sense. >> Why shell out to RM when we have DELETE-FILE and its recursive friend in >> Guix? I=E2=80=99d also rather move clean-up work to a DYNAMIC-UNWIND ha= ndler. > > I hesitated to include Guix's module in test. If you're okay with it, I > will use the helpers available in Guix. I concur that the cleanup > should be in dynamic-unwind. Yes, using the helpers from Guix is fine. The GWL doesn=E2=80=99t make much sense without Guix anyway :) >>> + (format (error-output-port) >>> + "Example directory: ~a\n" tmp-dir)) >> >> Nitpick: ~% instead of \n. > > Is there a reason why? I don't mind I just never really understood why > scheme has this special format rule for newline. I don=E2=80=99t know if there=E2=80=99s a reason for it, but I prefer it fo= r consistency. >>> + success?))) >>> + scenarios)) >> >> This FOR-EACH loop combines test definition with test running, which >> seems wrong to me. Maybe SRFI-64 is not the best fit for tests that >> only care about whether a shell command was run successfully. Perhaps >> we should do as Guix does and just have a shell script to run these >> tests. > > What do you find wrong about it? We could re-write it as: > > (define (run-example path) > ...) > > (test-assert (run-example "extended-workflow.w")) > (test-assert (run-example "...")) > > if you like it better. However, we lose the power of SCANDIR mentioned > above. Hmm, you=E2=80=99re right about that. If you could split this up into smal= ler procedures (one definition of RUN-EXAMPLE and another that loops TEST-ASSERT and RUN-EXAMPLE on the test files) I=E2=80=99d already be happy= :) > Let me know, I will send a v2 with your above recommendations and answers > to my questions. Thank you! --=20 Ricardo