From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id uDJgIyUZgWQdSwEASxT56A (envelope-from ) for ; Thu, 08 Jun 2023 01:56:21 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id GMNvIyUZgWTocgAA9RJhRA (envelope-from ) for ; Thu, 08 Jun 2023 01:56:21 +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 408ADC069 for ; Thu, 8 Jun 2023 01:56:21 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1q730W-0000vH-Uq; Wed, 07 Jun 2023 19:56:04 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q730V-0000v3-2K for guix-patches@gnu.org; Wed, 07 Jun 2023 19:56:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1q730U-0001qT-PI for guix-patches@gnu.org; Wed, 07 Jun 2023 19:56:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1q730U-0004HA-Lx; Wed, 07 Jun 2023 19:56:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#63951] [PATCH 2/2] gnu: ruby-atoulme-saikuro: Fix tests. Resent-From: gemmaro Original-Sender: "Debbugs-submit" Resent-CC: mail@cbaines.net, guix-patches@gnu.org Resent-Date: Wed, 07 Jun 2023 23:56:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 63951 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 63951@debbugs.gnu.org Cc: gemmaro , Christopher Baines X-Debbugs-Original-Xcc: Christopher Baines Received: via spool by 63951-submit@debbugs.gnu.org id=B63951.168618210816357 (code B ref 63951); Wed, 07 Jun 2023 23:56:02 +0000 Received: (at 63951) by debbugs.gnu.org; 7 Jun 2023 23:55:08 +0000 Received: from localhost ([127.0.0.1]:55195 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q72zc-0004Fl-5c for submit@debbugs.gnu.org; Wed, 07 Jun 2023 19:55:08 -0400 Received: from mail-pj1-f50.google.com ([209.85.216.50]:61608) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q72zZ-0004Ex-KA for 63951@debbugs.gnu.org; Wed, 07 Jun 2023 19:55:07 -0400 Received: by mail-pj1-f50.google.com with SMTP id 98e67ed59e1d1-25632c99eecso11322a91.2 for <63951@debbugs.gnu.org>; Wed, 07 Jun 2023 16:55:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1686182100; x=1688774100; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=hcGDXJEd4fIB1KCQrDXfP2SbWqEH9oHDulFgHiG2cqM=; b=nz9tHV9M6Ce2gY6eyFCuftRw/kNFiPvlQAY+5vaCXgcK2E/9lrVrE7vx9U1hI6mtUT Of644Jtg43d1dYrP3+aTtdDTvgyrlQOh6UQjzwHfJirYErf8Z4kXeYim5mQXvMeXIYan eGIiuoRVph29bp3xLuj6fwP4uHV5r6gtpANrQ4PFkTmBBjTQeZPrIE/aY+GFvX1RUwhk YqDBjM2AWdOkx4aNBpl/PMbRZJauuTDjFIjZ84TiRgLez475qg6oPgF9bde0x1toCagp K0KNoobMTkG4zDD0Fl3tIJM4pPtIyXwAS0R5e5OJ1NQEBrra6YqBtnYIZADZIqikIVa4 X6gw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686182100; x=1688774100; 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=hcGDXJEd4fIB1KCQrDXfP2SbWqEH9oHDulFgHiG2cqM=; b=SU0sIPJeLZfYfvxHGwUcK91BCZkzEevy3lgLCCWRZF7t+Zb4xILNpiP+Kxf8RWycaK lKZtjRkNO8fVqHOgn22J34NswHXKnaQw03GRzUfT/kHgJWQW/MJYypAbub61pRHLJ2GW 2PCgXjDOqqzIFKm4b2qD4zVTwui+x/liQJJUJAMvqE6Em4TCIutIR33L3UOaw6dAInlg qxXn4zXV6sFV2I4IJ3dn6Tp26VqLy6jLrLh1Veofal7qcMr4GSC9esnIt4dORrb8NKw7 rRLhXRsrMCEHlTijg/HmM+1C7FdOGGPNtFW8YWyYKTrFWIK3VCFrluayf9Bk/tGGvhy5 NIYQ== X-Gm-Message-State: AC+VfDzn7WacP3fbJKvV6GYhdHup5Q8UOj0tBH7FAg2a4mZaZhJxwowS 8GQV+d8Rmhz4OuizZomw4qUeVNTjJSlPgw== X-Google-Smtp-Source: ACHHUZ5CYgzDPtI3Jnf1T9HUZ63ztuo1n29XxugiHSvK/XNkuERrjWveA4e3JJiFGMSal7vQmcr5tA== X-Received: by 2002:a17:90b:3006:b0:259:b2c3:2ce9 with SMTP id hg6-20020a17090b300600b00259b2c32ce9mr2616851pjb.37.1686182099809; Wed, 07 Jun 2023 16:54:59 -0700 (PDT) Received: from mac.gemmaro.name ([240f:74:d1f0:1:ba1:e787:c9e:b1dc]) by smtp.gmail.com with ESMTPSA id 28-20020a17090a1a5c00b0024e4f169931sm2037779pjl.2.2023.06.07.16.54.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 07 Jun 2023 16:54:59 -0700 (PDT) From: gemmaro Date: Thu, 8 Jun 2023 08:54:50 +0900 Message-Id: <4ae36dbf9d05d5b605fd93f3cc0a3f6988e08706.1686181717.git.gemmaro.dev@gmail.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN ARC-Seal: i=1; s=key1; d=yhetil.org; t=1686182181; a=rsa-sha256; cv=none; b=P8azsrX0X6qREmSO/prCsvJrrybQm60hRrJ+ZIR+Clw3zM2NFgKRkmqQcUbYZYS3cwtgTX soCF6ZPkW57rc0Gc2+DsLTVrwgK7Edz9Ov+3ecPYkcKmp2Id6hSTU0aayhbxOzb/csRdH/ Dfz57/xqxgbHW5BJrf3M4C3ze0knxSpPE5IT966W4Qqz1fnXxDoZeSrXS3bYpAM/HLjWfe PeAWKoXDUp0M2rEDp4yBcUZcuqLxDOZLRItggw0jUgprpROcsCDAXsB4HtGGjGATipNJVc 61Ertle1PoUN4eOqEqXAR53/jdRN9o4tRK5rnApnhho1qrqLkOWy80jMlwnMXg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20221208 header.b=nz9tHV9M; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1686182181; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=hcGDXJEd4fIB1KCQrDXfP2SbWqEH9oHDulFgHiG2cqM=; b=JMyfSTJVX79Ve1SdkC/ECa9fiRuFamu9LjgV6/aV32divg7jUem8vLvzLN1ONN6nNspfyU YylnBy/9FGcePMhZMjz2oXsMSjAh0bd951yTnTUJwjqFEUGUrc8U1lCXyEe12W6qXsgIyK 9YemCWvmlDvDZUhBCxW5HOmBFSE2O3E2DZh2cmZ2zLt5BPeAGwy4yHQ9dFKXs5J/JWfbts rdhoF+ZzWX8b5HhpNQ70ml1f2wiscjlsXewJ+E0I6cZDn89sh+akKwpjq19NN1bM14AVDp Ffn6ZuVmFHPQ7bYEluvK6e83+cWXvuKOpIB3zGu5wi8/i5sCODbBjmusebIj2w== Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20221208 header.b=nz9tHV9M; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Scanner: scn0.migadu.com X-Migadu-Spam-Score: -2.40 X-Spam-Score: -2.40 X-Migadu-Queue-Id: 408ADC069 X-TUID: q8J6DSX+d2SI * gnu/packages/ruby.scm (ruby-atoulme-saikuro) [propagated-inputs]: Add ruby-irb-1.1.1 and ruby-e2mmap. [arguments]: Enable tests. --- gnu/packages/ruby.scm | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) diff --git a/gnu/packages/ruby.scm b/gnu/packages/ruby.scm index c5b94ffd15d..37b16ae2fdc 100644 --- a/gnu/packages/ruby.scm +++ b/gnu/packages/ruby.scm @@ -1305,9 +1305,27 @@ (define-public ruby-atoulme-saikuro (base32 "0kvd2nsxffbza61d3q4j94wrbnbv50r1zy3a7q26f6k706fw1f19")))) (build-system ruby-build-system) - ;; FIXME: There are no unit tests. The tests are demonstrations of the - ;; "saikuro" tool. - (arguments `(#:tests? #f)) + (arguments + (list + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'fix-module-resolution + (lambda _ + (substitute* "lib/saikuro.rb" + ;; irb 1.2.0 or later doesn't have RubyToken + (("require 'irb/ruby-lex'") + "require 'rubygems'\ngem 'irb', '=1.1.1'\nrequire 'irb/ruby-lex'")))) + (delete 'check) + (add-after 'install 'check + (lambda* (#:key outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (saikuro (string-append out "/bin/saikuro"))) + (setenv "GEM_PATH" (string-append + (getenv "GEM_PATH") ":" + #$output "/lib/ruby/vendor_ruby")) + (invoke saikuro "--cyclo" "--token" "--input_directory" "tests"))))))) + (propagated-inputs (list ruby-irb-1.1.1 + ruby-e2mmap)) ;required by rubygems (synopsis "Cyclomatic complexity analyzer") (description "Saikuro is a Ruby cyclomatic complexity analyzer. When given Ruby source code Saikuro will generate a report listing the cyclomatic -- 2.40.1