From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Paul Eggert Newsgroups: gmane.emacs.devel Subject: Re: make check fails due to missing test directory Date: Fri, 3 May 2019 15:01:58 -0700 Organization: UCLA Computer Science Department Message-ID: References: <83d0kzmjw6.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------56EBC00B564E5F6078ACDF2D" Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="19934"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 Cc: noloader@gmail.com, emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat May 04 00:02:29 2019 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hMgGC-0004rf-Pe for ged-emacs-devel@m.gmane.org; Sat, 04 May 2019 00:02:29 +0200 Original-Received: from localhost ([127.0.0.1]:47784 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hMgG8-0004vY-8M for ged-emacs-devel@m.gmane.org; Fri, 03 May 2019 18:02:24 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:34525) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hMgFs-0004vN-Tm for emacs-devel@gnu.org; Fri, 03 May 2019 18:02:10 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hMgFr-0000e1-8j for emacs-devel@gnu.org; Fri, 03 May 2019 18:02:08 -0400 Original-Received: from zimbra.cs.ucla.edu ([131.179.128.68]:41670) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hMgFn-0000bb-Oa; Fri, 03 May 2019 18:02:04 -0400 Original-Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 60C5516192C; Fri, 3 May 2019 15:02:02 -0700 (PDT) Original-Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id RsKP8bR6ldhz; Fri, 3 May 2019 15:01:59 -0700 (PDT) Original-Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id EE3F816190C; Fri, 3 May 2019 15:01:58 -0700 (PDT) X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu Original-Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id 0bKGGKK-kMhP; Fri, 3 May 2019 15:01:58 -0700 (PDT) Original-Received: from Penguin.CS.UCLA.EDU (Penguin.CS.UCLA.EDU [131.179.64.200]) by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id CADC616189B; Fri, 3 May 2019 15:01:58 -0700 (PDT) Openpgp: preference=signencrypt Autocrypt: addr=eggert@cs.ucla.edu; prefer-encrypt=mutual; keydata= xsFNBEyAcmQBEADAAyH2xoTu7ppG5D3a8FMZEon74dCvc4+q1XA2J2tBy2pwaTqfhpxxdGA9 Jj50UJ3PD4bSUEgN8tLZ0san47l5XTAFLi2456ciSl5m8sKaHlGdt9XmAAtmXqeZVIYX/UFS 96fDzf4xhEmm/y7LbYEPQdUdxu47xA5KhTYp5bltF3WYDz1Ygd7gx07Auwp7iw7eNvnoDTAl KAl8KYDZzbDNCQGEbpY3efZIvPdeI+FWQN4W+kghy+P6au6PrIIhYraeua7XDdb2LS1en3Ss mE3QjqfRqI/A2ue8JMwsvXe/WK38Ezs6x74iTaqI3AFH6ilAhDqpMnd/msSESNFt76DiO1ZK QMr9amVPknjfPmJISqdhgB1DlEdw34sROf6V8mZw0xfqT6PKE46LcFefzs0kbg4GORf8vjG2 Sf1tk5eU8MBiyN/bZ03bKNjNYMpODDQQwuP84kYLkX2wBxxMAhBxwbDVZudzxDZJ1C2VXujC OJVxq2kljBM9ETYuUGqd75AW2LXrLw6+MuIsHFAYAgRr7+KcwDgBAfwhPBYX34nSSiHlmLC+ KaHLeCLF5ZI2vKm3HEeCTtlOg7xZEONgwzL+fdKo+D6SoC8RRxJKs8a3sVfI4t6CnrQzvJbB n6gxdgCu5i29J1QCYrCYvql2UyFPAK+do99/1jOXT4m2836j1wARAQABzSBQYXVsIEVnZ2Vy dCA8ZWdnZXJ0QGNzLnVjbGEuZWR1PsLBfgQTAQIAKAUCTIByZAIbAwUJEswDAAYLCQgHAwIG FQgCCQoLBBYCAwECH In-Reply-To: <83d0kzmjw6.fsf@gnu.org> Content-Language: en-US X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 131.179.128.68 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 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.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:236134 Archived-At: This is a multi-part message in MIME format. --------------56EBC00B564E5F6078ACDF2D Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit On 5/3/19 12:13 PM, Eli Zaretskii wrote: > You need to download the test suite. It is not part of the release > tarball. You can find it in the Emacs development repository. Sure, but as his email suggests, it's better for 'make check' to succeed when the set of tests is empty. That way, standardized build procedures (like his) are more likely to do the right thing. I installed the patch 0001 (attached) into the master branch to do that. We've talked before about distributing tests in the Emacs tarball - which is what the GNU Codings Standards recommend and what pretty much every other GNU package does - and this email suggests that now's a good time to do that. Distributing tests adds about 2.5% to the size of the compressed tarball, and nowadays that is a small price to pay for making tests available to people building from a release tarball rather than a Git clone. Proposed patch attached as patch 0002, and comments welcome. --------------56EBC00B564E5F6078ACDF2D Content-Type: text/x-patch; name="0001-Skip-tests-if-test-subdir-is-missing.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="0001-Skip-tests-if-test-subdir-is-missing.patch" >From 965372cd55c9a9ad5a9e17614dc98502c79ab1e3 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Fri, 3 May 2019 14:19:26 -0700 Subject: [PATCH 1/2] Skip tests if test subdir is missing Problem reported by Jeffrey Walton in: https://lists.gnu.org/r/emacs-devel/2019-05/msg00041.html * Makefile.in (CHECK_TARGETS): New macro; use it to simplify 'check' and similar rules. ($(CHECK_TARGETS)): If tests are missing, do not fail after issuing a diagnostic. Just skip the tests. --- Makefile.in | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/Makefile.in b/Makefile.in index 06da415a4a..21362a9196 100644 --- a/Makefile.in +++ b/Makefile.in @@ -950,17 +950,15 @@ .PHONY: TAGS tags: lib lib-src # src $(MAKE) -C src tags -.PHONY: have-tests -have-tests: - @if test ! -d test; then \ - echo "You do not seem to have the test/ directory."; \ - echo "Maybe you are using a release tarfile, rather than a repository checkout."; \ - exit 1; \ - fi - -.PHONY: check check-maybe check-expensive check-all -check check-maybe check-expensive check-all: have-tests all +CHECK_TARGETS = check check-maybe check-expensive check-all +.PHONY: $(CHECK_TARGETS) +$(CHECK_TARGETS): all +ifeq ($(wildcard test),test) $(MAKE) -C test $@ +else + @echo "You do not seem to have the test/ directory." + @echo "Maybe you used a release tarfile that lacks tests." +endif dist: cd ${srcdir}; ./make-dist -- 2.21.0 --------------56EBC00B564E5F6078ACDF2D Content-Type: text/x-patch; name="0002-Distribute-test-cases-in-tarballs-by-default.patch" Content-Disposition: attachment; filename="0002-Distribute-test-cases-in-tarballs-by-default.patch" Content-Transfer-Encoding: quoted-printable >From c0f5ddc7b376976634fb4708519a12bc147ba312 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Fri, 3 May 2019 14:53:58 -0700 Subject: [PATCH 2/2] Distribute test cases in tarballs by default MIME-Version: 1.0 Content-Type: text/plain; charset=3DUTF-8 Content-Transfer-Encoding: 8bit * INSTALL, INSTALL.REPO, admin/make-tarball.txt: Mention =E2=80=98make check=E2=80=99. * configure.ac: Update comment. * etc/NEWS: Say that tarballs have a test directory. * make-dist (with_tests): Default to "yes". Add an option --no-tests to make it "no". --- INSTALL | 4 ++++ INSTALL.REPO | 4 ++-- admin/make-tarball.txt | 2 +- configure.ac | 3 +-- etc/NEWS | 3 +++ make-dist | 11 ++++++++--- 6 files changed, 19 insertions(+), 8 deletions(-) diff --git a/INSTALL b/INSTALL index e38635c60b..0d5d8aa1cb 100644 --- a/INSTALL +++ b/INSTALL @@ -82,6 +82,10 @@ sections if you need to. =20 src/emacs -Q =20 + To test Emacs further: + + make check + 6. Assuming that the program 'src/emacs' starts and displays its opening screen, you can install the program and its auxiliary files into their installation directories: diff --git a/INSTALL.REPO b/INSTALL.REPO index 6dca9dd714..b7433856c6 100644 --- a/INSTALL.REPO +++ b/INSTALL.REPO @@ -32,8 +32,8 @@ can invoke './configure -C'. After configuring, build = Emacs as follows: =20 $ make =20 -If you want to install Emacs, type 'make install' instead of 'make' in -the last command. +You can also type 'make check' to test and 'make install' to install +Emacs. =20 Occasionally the file 'lisp/loaddefs.el' (and similar automatically generated files, such as 'esh-groups.el', and '*-loaddefs.el' in some diff --git a/admin/make-tarball.txt b/admin/make-tarball.txt index 47b60173f8..43992a0bb2 100644 --- a/admin/make-tarball.txt +++ b/admin/make-tarball.txt @@ -115,7 +115,7 @@ General steps (for each step, check for possible erro= rs): results against the new tar contents. =20 7. tar -xf emacs-NEW.tar; cd emacs-NEW - ./configure --prefix=3D/tmp/emacs && make && make install + ./configure --prefix=3D/tmp/emacs && make check && make install Use 'script' or M-x compile to save the compilation log in compile-NEW.log and compare it against an old one. The easiest way to do that is to visit the old log in Emacs, change the version diff --git a/configure.ac b/configure.ac index 79fe0c98c6..ecce0223e0 100644 --- a/configure.ac +++ b/configure.ac @@ -5726,9 +5726,8 @@ m4_define SUBDIR_MAKEFILES=3D"subdir_makefiles" AC_CONFIG_FILES(subdir_makefiles) =20 -dnl test/ is not present in release tarfiles. +dnl The test/ directory is missing if './make-dist --no-tests' was used. opt_makefile=3Dtest/Makefile - if test -f "$srcdir/$opt_makefile.in"; then SUBDIR_MAKEFILES=3D"$SUBDIR_MAKEFILES $opt_makefile" dnl Again, it's best not to use a variable. Though you can add diff --git a/etc/NEWS b/etc/NEWS index 9e3559d27e..f76000b956 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -97,6 +97,9 @@ option was useful with modern debugging tools such as A= ddressSanitizer. (See etc/DEBUG for the details of using the modern replacements of the removed configure options.) =20 ++++ +** The distribution tarball now has test cases; 'make check' runs them. + --- ** Emacs now requires GTK 2.24 and GTK 3.10 for the GTK 2 and GTK 3 builds respectively. diff --git a/make-dist b/make-dist index 74660032e9..e4e6d40d98 100755 --- a/make-dist +++ b/make-dist @@ -52,7 +52,7 @@ make_tar=3D default_gzip=3Dgzip newer=3D"" with_info=3Dyes -with_tests=3Dno +with_tests=3Dyes changelog=3Dyes verbose=3Dno =20 @@ -110,11 +110,16 @@ verbose=3D ;; =20 ## Include the test/ directory. - ## This option is mainly for the hydra build server. + ## This is for backward compability to when --no-tests was the defau= lt. "--tests") with_tests=3Dyes ;; =20 + ## Exclude the test/ directory. + "--no-tests") + with_tests=3Dno + ;; + "--verbose") verbose=3Dyes ;; @@ -131,9 +136,9 @@ verbose=3D echo " --no-update don't recompile or do analogous things" echo " --no-changelog don't generate the top-level ChangeLog" echo " --no-info don't include info files" + echo " --no-tests don't include the test/ directory" echo " --snapshot same as --clean-up --no-update --tar --no-check= " echo " --tar make a tar file" - echo " --tests include the test/ directory" echo " --verbose noisier output" echo "" exit 0 --=20 2.21.0 --------------56EBC00B564E5F6078ACDF2D--