From patchwork Fri Jul 19 19:57:29 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sharlatan Hellseher X-Patchwork-Id: 29391 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id C5F0227BBEA; Fri, 19 Jul 2024 20:59:46 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI, SPF_HELO_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id D891A27BBE2 for ; Fri, 19 Jul 2024 20:59:45 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sUtl5-00036w-72; Fri, 19 Jul 2024 15:59:15 -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 1sUtkw-00033y-A1 for guix-patches@gnu.org; Fri, 19 Jul 2024 15:59:06 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sUtkv-0001wT-Fk for guix-patches@gnu.org; Fri, 19 Jul 2024 15:59:06 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sUtku-0000Gq-OM for guix-patches@gnu.org; Fri, 19 Jul 2024 15:59:04 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#72189] [PATCH 4/7] gnu: go-github-com-jdkato-twine: Enable tests. Resent-From: Sharlatan Hellseher Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 19 Jul 2024 19:59:04 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 72189 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 72189@debbugs.gnu.org Cc: Sharlatan Hellseher Received: via spool by 72189-submit@debbugs.gnu.org id=B72189.1721419130971 (code B ref 72189); Fri, 19 Jul 2024 19:59:04 +0000 Received: (at 72189) by debbugs.gnu.org; 19 Jul 2024 19:58:50 +0000 Received: from localhost ([127.0.0.1]:51014 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sUtkf-0000FV-Lp for submit@debbugs.gnu.org; Fri, 19 Jul 2024 15:58:50 -0400 Received: from mail-wr1-f49.google.com ([209.85.221.49]:45453) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sUtka-0000Dq-1S for 72189@debbugs.gnu.org; Fri, 19 Jul 2024 15:58:44 -0400 Received: by mail-wr1-f49.google.com with SMTP id ffacd0b85a97d-368663d7f80so869390f8f.3 for <72189@debbugs.gnu.org>; Fri, 19 Jul 2024 12:58:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1721419059; x=1722023859; darn=debbugs.gnu.org; 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=qpDRwWvDV+L15z6TmgyYGPtlt2MfhUTeQbaQvsvD+SU=; b=AtlVfsxhMgR18tQXNSCREpG6L4WVn9taMctoRgJ2n6N9kfrZPnsxHjphUnhz4rMfis ZYnfzUPbQdYtWx5PAUKHowSsZp+njyjoVsChZHmCWm4oXFoMbMl1gOnAnKSv7qNkNzmJ I+jSsSfK9w9Y6MGrYx9A9nxCgUjBTKEWsJJz7OtzN/xDaSrAS5UaGjNWNgKxiT/Y9maw 1yIiVSdPKXCBre+CY9ueudtAovYrVoSAv+aSYV/l0M+Yn6VQKKrthvH369u0dM233c88 ook6hOGLGZvQ1DFNXIUOEL6xByTeFjUos3+5n1YZlY5bC/z+zZt9JeSkcPD1kn9AKH/l 1ACQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1721419059; x=1722023859; 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=qpDRwWvDV+L15z6TmgyYGPtlt2MfhUTeQbaQvsvD+SU=; b=gAuo1G+yxVa3BX3OyuoeCxsdF3+5JvVSUdFwiimr7EWxpIa5u6sYxRTq/GbgLhUUXs vtNF6l2SISTXHtvbc+yJ3QsQC3A6661HayL9huKt/wRSZrooy2jU3nD+z4Ocgk6zb9Lk HTmOpqoQepf6jwMZoJQGC9BLVZ2ibrUkSOWBvCpAt2iC1EGmRLb6Enyec1QwUtYZprbc d9LUlVNDdI8INH2FiakzK15xgupW1G3x/aXNx4HZuFP1zrTppaqWK6w2nc92fzYNxzgl Jwf5zXQcTrYPctXthcdJpO27AlegD0IBtpkLC3XqbLHq7jJFl6bODGHYmuWCkaeY+SMB T6QQ== X-Gm-Message-State: AOJu0Yz0N3ytQYiMWScxnK7pu97vDVqCXXMXlYa68w7uCucSPzRB5h+H PVYPdDfhHQ/BnKzuSuDeQph1vSmTmiAYa3zzoQcit9n5wMboehhGxJUMSH4g X-Google-Smtp-Source: AGHT+IFbGkzHikTgjkXPpJN8qiU+vjF89BLtBRNnQCwndbeT+EFen7SlL/djjEogz+ehpXz3OWcw/g== X-Received: by 2002:adf:fa03:0:b0:367:963b:ab81 with SMTP id ffacd0b85a97d-3683175d0b8mr6001494f8f.46.1721419058869; Fri, 19 Jul 2024 12:57:38 -0700 (PDT) Received: from guxtil.incerto.xyz (bagu-15-b2-v4wan-170076-cust245.vm21.cable.virginm.net. [77.98.0.246]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-368787ec6e5sm2411559f8f.96.2024.07.19.12.57.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 19 Jul 2024 12:57:38 -0700 (PDT) From: Sharlatan Hellseher Date: Fri, 19 Jul 2024 20:57:29 +0100 Message-ID: X-Mailer: git-send-email 2.41.0 In-Reply-To: References: MIME-Version: 1.0 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+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * gnu/packages/golang-xyz.scm (go-github-com-jdkato-twine) [source]: Add snippet adjusting changed upstream module import path. [arguments]: <#:phases>: Remove 'build and 'patch-module-import-path phases. Add 'disable-failing-tests phase. Use custom 'check phase. Change-Id: I8553705ca0b812c772005460b242ce47b0c65ced --- gnu/packages/golang-xyz.scm | 40 ++++++++++++++++++------------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/gnu/packages/golang-xyz.scm b/gnu/packages/golang-xyz.scm index 159f2dd44e..6b6c953a1d 100644 --- a/gnu/packages/golang-xyz.scm +++ b/gnu/packages/golang-xyz.scm @@ -2644,33 +2644,33 @@ (define-public go-github-com-jdkato-twine (commit (string-append "v" version)))) (file-name (git-file-name name version)) (sha256 - (base32 "1hbpxcrcsbi975lklrhzyzk0fzn79pxicvfyf2sckmd2n6jb4ayy")))) + (base32 "1hbpxcrcsbi975lklrhzyzk0fzn79pxicvfyf2sckmd2n6jb4ayy")) + (modules '((guix build utils))) + (snippet + #~(begin + ;; Module name has been changed upstream. + (substitute* (find-files "." "\\.go$") + (("gopkg.in/neurosnap/sentences.v1") + "github.com/neurosnap/sentences")))))) (build-system go-build-system) (arguments (list - ;; FIXME: Adjust tests sute or check with upstram: - ;; === Failed - ;; === FAIL: nlp/segment TestGoldenRules (0.00s) - ;; segment_test.go:143: 25. Double quotations inside sentence - ;; segment_test.go:144: Actual: [She turned to him, "This is great." she said.] - ;; segment_test.go:145: Actual: 2, Expected: 1 - ;; segment_test.go:146: === - #:tests? #f #:import-path "github.com/jdkato/twine" #:phases #~(modify-phases %standard-phases - (add-after 'unpack 'patch-module-import-path - (lambda* (#:key import-path #:allow-other-keys) - (with-directory-excursion (string-append "src/" import-path) - (substitute* (find-files "." "\\.go$") - (("gopkg.in/neurosnap/sentences.v1") - "github.com/neurosnap/sentences"))))) - (replace 'build - (lambda* (#:key import-path #:allow-other-keys) + (add-after 'unpack 'disable-failing-tests + (lambda* (#:key tests? import-path #:allow-other-keys) (with-directory-excursion (string-append "src/" import-path) - (invoke "go" "build" "-v" "-x" "-ldflags=-s -w" "-trimpath" "./..."))))))) - (native-inputs - (list gotestsum)) + (substitute* "nlp/segment/segment_test.go" + (("TestGoldenRules") "OffTestGoldenRules"))))) + ;; XXX: Workaround for go-build-system's lack of Go modules + ;; support. + (delete 'build) + (replace 'check + (lambda* (#:key tests? import-path #:allow-other-keys) + (when tests? + (with-directory-excursion (string-append "src/" import-path) + (invoke "go" "test" "-v" "./...")))))))) (propagated-inputs (list go-github-com-montanaflynn-stats go-github-com-neurosnap-sentences