From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Thomas Fitzsimmons Newsgroups: gmane.emacs.devel Subject: Re: Tests in core depending on GNU ELPA packages Date: Thu, 18 Feb 2021 20:09:18 -0500 Message-ID: References: <86a6ugnopl.fsf@stephe-leake.org> <83im94b17m.fsf@gnu.org> <834kknatxs.fsf@gnu.org> <83sg86apqb.fsf@gnu.org> <865z52oqfp.fsf@stephe-leake.org> <86wnxinbnx.fsf@stephe-leake.org> <83o8iuann7.fsf@gnu.org> <83h7omakyw.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="23259"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1.90 (gnu/linux) Cc: stephen_leake@stephe-leake.org, Eli Zaretskii , daniele@grinta.net, emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Feb 19 02:10:30 2021 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lCuJR-0005wa-QV for ged-emacs-devel@m.gmane-mx.org; Fri, 19 Feb 2021 02:10:29 +0100 Original-Received: from localhost ([::1]:52110 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lCuJQ-0005cG-RU for ged-emacs-devel@m.gmane-mx.org; Thu, 18 Feb 2021 20:10:28 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:48928) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lCuIQ-000594-WB for emacs-devel@gnu.org; Thu, 18 Feb 2021 20:09:27 -0500 Original-Received: from mail-qk1-x72e.google.com ([2607:f8b0:4864:20::72e]:36084) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lCuIN-0007hf-EM for emacs-devel@gnu.org; Thu, 18 Feb 2021 20:09:26 -0500 Original-Received: by mail-qk1-x72e.google.com with SMTP id v206so4174970qkb.3 for ; Thu, 18 Feb 2021 17:09:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fitzsim-org.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=MX521uB6mFRhUrxnd0mxOIkRXNbbxGC/29jigFX7B98=; b=x3yaBIbcvJqlb13e/fw4Y0PbdcK+V55eDV2FsF3dLBv56Qf5cidZnYiwxPknvaLcQR fIS0an5JzbyWRSY22BoeC8QHsJqUEgg+sSc4fja1aNoKzXhlSO4qDKjnTa7lYoYsPwRS /pjgE5VeYjih4a0Z1QYKbtEFCfr24QCCRL2FQVcZYo4Z/5JEcVPs4b8yiTqeEYP58rv5 Nm5EmDcqj84FmCrLx5If9A+zfBevFeM8vKQXnAqAYGIEXg5gemUr+l2EuVDFUEsLZE8A Xku6JP2H+/+5MmLid/oyuh4kTKJZRk7qcAOGulc5NOuCISOVIFG8VZab2H414G7wUoaV ybKg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=MX521uB6mFRhUrxnd0mxOIkRXNbbxGC/29jigFX7B98=; b=CHU4FbEhmZ66rxUW5OZclyKPt2gYNElCH0l7sXuIZ2H72XtgwqE0AQ7wCoXEPnTFo0 gAUE7cE83SJm/4WrHR04fIMLGk+AD2OoaYM4BXLiaPezId9x8WKr6i7UB72QqM5UGpj1 BMyEAeossN+GbspP12stEWlagz6/Kiol7NKlp5nQSNV19zD0EySz1EIIPOXNIbPFojww UZKkQEMtC29rNDGWKPdPTg5RIlW/y0OhAI0Mf3j3TnFoLWRRfm7MfLpCgNCacpjkvbCt jGvV91KY/ZOkIIPRBoeMA0W43tS7loD6y2sRIteB3Zok5Z1f/jSc3xlAyVc0xytNSDdN os+A== X-Gm-Message-State: AOAM533FtyoIo3uut/Zo6pjdmpmjvgWcmTTQrem3hbbCLNIuA0bOHhaz UkdSfTXbWEzET0oRl/gQqiGxTX1tTDfjxQ== X-Google-Smtp-Source: ABdhPJw6InxEi1lPSjNN3dZdZuzVQff5vBcbj82jTf3bUVTGnVvHhhnx3CqasQaNSNL6xbPfnsWHSA== X-Received: by 2002:a37:8b06:: with SMTP id n6mr7078672qkd.77.1613696961121; Thu, 18 Feb 2021 17:09:21 -0800 (PST) Original-Received: from localhost.localdomain (69-165-165-189.dsl.teksavvy.com. [69.165.165.189]) by smtp.gmail.com with ESMTPSA id k4sm4440863qth.40.2021.02.18.17.09.19 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 18 Feb 2021 17:09:19 -0800 (PST) In-Reply-To: (Stefan Monnier's message of "Tue, 15 Dec 2020 22:24:55 -0500") Received-SPF: none client-ip=2607:f8b0:4864:20::72e; envelope-from=fitzsim@fitzsim.org; helo=mail-qk1-x72e.google.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_NONE=0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:265202 Archived-At: Hi Stefan, Stefan Monnier writes: >>> Also, the proposed bundling doesn't let Emacs's own code depend on GNU >>> ELPA code, so it still wouldn't allow us to use `dash.el` inside Emacs. >>> >>> I don't see any need to "solve" or discuss those issues before we can >>> bundle packages. >> >> Nice work reorganizing GNU ELPA. >> >> As part of my work on bug#43566, I'd like to add a test to >> test/lisp/net/ntlm-tests.el that depends on the GNU ELPA packages >> ws-server and url-http-ntlm. I'd prefer the test to be in core rather >> than GNU ELPA, since it's specifically to prevent ntlm.el regressions >> introduced by core changes (e.g., url). >> >> Can you suggest a way to accomplish this? > > You could add the tests and mark them (skip-unless (fboundp '...)). > This means they won't be tested in the "normal" regression tests where > those extra packages aren't installed, but at least anyone could run them > by installing the corresponding packages. OK, that approach works. For loading the files, how about the attached? It doesn't change the "make check" results on master tip, and I confirmed that my new NTLM tests are properly skipped (via skip-unless) when anything goes wrong locating the GNU ELPA dependencies. Thanks, Thomas diff --git a/test/Makefile.in b/test/Makefile.in index f907602a62..ff228d1261 100644 --- a/test/Makefile.in +++ b/test/Makefile.in @@ -71,6 +71,15 @@ am__v_at_0 = am__v_at_1 = +# Load any GNU ELPA dependencies that are present, for optional tests. +GNU_ELPA_DIRECTORY ?= $(srcdir)/../../elpa +# Keep elpa_dependencies dependency-ordered. +elpa_dependencies = \ + url-http-ntlm/url-http-ntlm.el \ + web-server/web-server.el +elpa_els = $(addprefix $(GNU_ELPA_DIRECTORY)/packages/,$(elpa_dependencies)) +elpa_opts = $(foreach el,$(elpa_els),$(and $(wildcard $(el)),-L $(dir $(el)) -l $(el))) + # We never change directory before running Emacs, so a relative file # name is fine, and makes life easier. If we need to change # directory, we can use emacs --chdir. @@ -81,7 +90,7 @@ EMACS_EXTRAOPT= # Command line flags for Emacs. # Apparently MSYS bash would convert "-L :" to "-L ;" anyway, # but we might as well be explicit. -EMACSOPT = --no-init-file --no-site-file --no-site-lisp -L "$(SEPCHAR)$(srcdir)" $(EMACS_EXTRAOPT) +EMACSOPT = --no-init-file --no-site-file --no-site-lisp -L "$(SEPCHAR)$(srcdir)" $(elpa_opts) $(EMACS_EXTRAOPT) # Prevent any settings in the user environment causing problems. unexport EMACSDATA EMACSDOC EMACSPATH GREP_OPTIONS @@ -105,7 +114,7 @@ TEST_RUN_ERT = $(if $(findstring $(MAKECMDGOALS), all check check-maybe),no,yes) # Additional settings for ert. -ert_opts = +ert_opts += $(elpa_opts) # Maximum length of lines in ert backtraces; nil for no limit. # (if empty, use the default ert-batch-backtrace-right-margin).