From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id kBRdEqyFhGEBYAAAgWs5BA (envelope-from ) for ; Fri, 05 Nov 2021 02:15:24 +0100 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id mAAJDqyFhGF/VQAA1q6Kng (envelope-from ) for ; Fri, 05 Nov 2021 01:15:24 +0000 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 EFBA32BC7C for ; Fri, 5 Nov 2021 02:15:22 +0100 (CET) Received: from localhost ([::1]:54354 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1minpC-0003Xk-2C for larch@yhetil.org; Thu, 04 Nov 2021 21:15:22 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:49632) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1minp1-0003XX-Nr for help-guix@gnu.org; Thu, 04 Nov 2021 21:15:11 -0400 Received: from mx1.riseup.net ([198.252.153.129]:49800) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1minoz-0002Ac-I8 for help-guix@gnu.org; Thu, 04 Nov 2021 21:15:11 -0400 Received: from fews2.riseup.net (fews2-pn.riseup.net [10.0.1.84]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "mail.riseup.net", Issuer "R3" (not verified)) by mx1.riseup.net (Postfix) with ESMTPS id 4HljGz1FBMzDqSs; Thu, 4 Nov 2021 18:15:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=riseup.net; s=squak; t=1636074907; bh=YUJLd+0s7EZgRZw03gLK7x3fneOuuf5SpsYtDXMbHzw=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=fe0+aMkOsUfp0sfVZQY3OCRH7f6BlJwqUhySIxDjlAcF/1NIKWyvyZotXbudw8WSh yMnIFVmKpWspciZVJKJSGoxEGvfxZuk9szMLWgKOjeMt18fdv6/yCrtjxM+uPgRq8C y0DiJvym+HXUPAnR3ishtl98XwClF+h3bz2YFOdE= X-Riseup-User-ID: 906433805B382F65E2BAF491E13925BDF26528B351154F0D8B122E027758BB6F Received: from [127.0.0.1] (localhost [127.0.0.1]) by fews2.riseup.net (Postfix) with ESMTPSA id 4HljGy30K9z1yWH; Thu, 4 Nov 2021 18:15:05 -0700 (PDT) Date: Fri, 5 Nov 2021 02:15:03 +0100 From: raingloom To: Phil Beadling Subject: Re: Getting Unit Test Results Out Of Guix Build Message-ID: <20211105021503.4ba68ba9@riseup.net> In-Reply-To: References: <20211026062429.242a504a@riseup.net> <878ryffxj3.fsf@beadling.co.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Received-SPF: pass client-ip=198.252.153.129; envelope-from=raingloom@riseup.net; helo=mx1.riseup.net X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-guix@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: help-guix Errors-To: help-guix-bounces+larch=yhetil.org@gnu.org Sender: "Help-Guix" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1636074924; 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=91xFPrE5K3n0ykfw+PegNunR0LZJ96PbPYuUlew7Yhk=; b=EKaCPX9Pn49p9aXjRMt0E9DOY0AvKCVP1a0yIY02wbFLLvGmu9WQoVieq1MaN3xK4ek+WR pein9+BordWirzLBKNHsNWGaeMheP94WtzpdwVyt+gRI2cujucEhsFFshLJcFbmGdFd+IM VktDAPXIWw2gY8m8RfvpF46TigjiTXdlBk0Dp0W0d3JXWdP3w64f+ohJ2DPVB3jnPXBtlT hH6zlkYBFZiH0QgJDoGddcVhEfLuQjPu6HeSpPao7Ot7Sv+OFZM2o66lq7uatieI+Udv3S qCMBQuYGvXsZcZgP1W9Sa3Bv7NDt9Y5A3bo6gcw8CunmgYd0g56rMhXzJpgP3w== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1636074924; a=rsa-sha256; cv=none; b=Y4uVEdUNRIMg0z0H8V/Wp6bfKXiMKUgvUH8N4uVReMRqYow4dkRaFcUNmCHdrozTLNhnzq tA2Al4Zh5o9E9VaCR6TsTQSQ0Qp/c6ID+kchAs1mCZkm7eYTMqdy7we7GuOn2K3mEW8lNz Qtd4DmwUMwZsi9v5wI+UDJwzFkSBbo/dgpfcKFC+6jnFZnzgqhCKQrJxzbGk2raJ8A1ghF EWZWxUY6n+4/3Wgh857FMGkBRErHzoVfrpY8yJnbQ8tnaoiiect7uLvpnMVGemA5OSUDuC jkBXtrP9fLpTLCNdzooe18xA7Qy/3/AyUfzWsFNqMHseJeiE8Nb9d3Gf43G37w== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=riseup.net header.s=squak header.b=fe0+aMkO; dmarc=pass (policy=none) header.from=riseup.net; spf=pass (aspmx1.migadu.com: domain of help-guix-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=help-guix-bounces@gnu.org X-Migadu-Spam-Score: -3.12 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=riseup.net header.s=squak header.b=fe0+aMkO; dmarc=pass (policy=none) header.from=riseup.net; spf=pass (aspmx1.migadu.com: domain of help-guix-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=help-guix-bounces@gnu.org X-Migadu-Queue-Id: EFBA32BC7C X-Spam-Score: -3.12 X-Migadu-Scanner: scn0.migadu.com X-TUID: xsKqQJziPtNh On Thu, 4 Nov 2021 13:52:02 +0000 Phil Beadling wrote: > Hi, > > On Tue, 26 Oct 2021 at 19:31, Phil wrote: > > > Hi, > > > > raingloom writes: > > > > > > > Couldn't this just be another package output? Maybe not the most > > > elegant solution, since those are not usually used this way, but > > > it can sort of work. Just add a phase that copies the logs to the > > > "tests" output if it exists. Kinda like how the "debug" is > > > currently used. > > > > Yes this could work - so for my-package I could just define > > my-package:tests which would add an extra test directory to the > > package in the store which I would copy the test results into. > > > > > I gave this a got it almost working with one significant snag I was > hoping someone might be able to help with? > > Once the build is complete is possible to retrieve the location of > the test files using a simple REPL script - In my example this is > nested in Groovy script in my case which will interpolate the > ${packageExpression} for me to give a proper Scheme expression (this > isn't important just mentioning it so the script makes sense): > > > > > > > > > > > > > > *(use-modules (guix packages) (gnu packages) > (guix store) (guix derivations))(define my-drv > (with-store store (run-with-store store (package->derivation > ${packageExpression}))))(format #t "~a~%" (assoc-ref > (derivation->output-paths my-drv) "test"))* > > > The below details are no overly important (IMHO), but script is fed > into a Groovy variable called testLocationSCript, and called from > shell script like so (localCannelSwitch is just a "-L > /path/to/my/local/channel" variable): > TESTDIR=`guix repl ${localChannelSwitch} -- <(cat <<< > '${testLocationScript}')` > > > This all works great *until* you actually have a unit test failure - > then because that unit test failure will fail the "guix build", the > "package->derivation" command seems to try to rebuild the package, > which of course fails again for exactly the same reason.as the > original failure and provides no location for > derivation->output-paths. > > *So what I need is a way of asking what will the output path be, > without actually building, or inspite of a build failure?* > > This must be techincally possible because mid-build the output paths > are available - so they are known ahead of build completion. > > So, does anyone have a way of getting the output directories from Guix > without first requiring a successful build? > > > Thanks! The --dry-run option is the closest thing that I know of. Not sure what its Scheme equivalent is.