public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: DJ Delorie <dj@redhat.com>
To: "Carlos O'Donell" <carlos@redhat.com>
Cc: Szabolcs.Nagy@arm.com, libc-alpha@sourceware.org, nd@arm.com
Subject: Re: [v3, with help] Re: run one test
Date: Mon, 30 Sep 2019 20:07:00 -0000	[thread overview]
Message-ID: <xnmuelk0ps.fsf@greed.delorie.com> (raw)
In-Reply-To: <03ae3014-29d5-ccf8-01d0-2f8de525c888@redhat.com> (carlos@redhat.com)


From a6f669fc4091899c8ebc50159c9e4edc5cc4bdeb Mon Sep 17 00:00:00 2001
From: DJ Delorie <dj@redhat.com>
Date: Mon, 30 Sep 2019 16:04:52 -0400
Subject: Add onetest convenience target and makefile help text

Adds "make onetest" (or "make onecheck") for re-running just
one test.  Also adds "make help" for help with our Makefile
targets, and adds a mini-help when you just run "make".

diff --git a/Makefile b/Makefile
index 67ddd01bfe..f84450e60d 100644
--- a/Makefile
+++ b/Makefile
@@ -26,8 +26,17 @@ include Makeconfig
 
 
 # This is the default target; it makes everything except the tests.
-.PHONY: all
-all: lib others
+.PHONY: all help minihelp
+all: minihelp lib others
+
+help:
+	@sed '0,/^help-starts-here$$/d' Makefile.help
+
+minihelp:
+	@echo
+	@echo type \"make help\" for help with common glibc makefile targets
+	@echo
+
 \f
 ifneq ($(AUTOCONF),no)
 
@@ -499,3 +508,12 @@ FORCE:
 
 iconvdata/% localedata/% po/%: FORCE
 	$(MAKE) $(PARALLELMFLAGS) -C $(@D) $(@F)
+
+# Convenience target to rerun one test, from the top of the build tree
+# Example: make onetest t=wcsmbs/test-wcsnlen
+onecheck : onetest
+onetest :
+	@-rm -f $(objpfx)$t.out
+	$(MAKE) subdir=$(dir $t) -C $(dir $t) ..=../ $(objpfx)$t.out
+	@cat $(objpfx)$t.test-result
+	@cat $(objpfx)$t.out
diff --git a/Makefile.help b/Makefile.help
new file mode 100644
index 0000000000..445085be03
--- /dev/null
+++ b/Makefile.help
@@ -0,0 +1,41 @@
+# Copyright (C) 2019 Free Software Foundation, Inc.
+# This file is part of the GNU C Library.
+
+# The GNU C Library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+
+# The GNU C Library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# Lesser General Public License for more details.
+
+# You should have received a copy of the GNU Lesser General Public
+# License along with the GNU C Library; if not, see
+# <https://www.gnu.org/licenses/>.
+
+This is the file that gets printed when the user runs "make help",
+starting just after the "help-starts-here" line.
+
+help-starts-here
+
+all
+	The usual default; builds everything but doesn't run the
+	tests.
+tests
+	Runs the testsuite.  Also "make check" is a shortcut for this
+
+onetest  (or onecheck)
+	Runs one test.  Use like this:
+		make onetest t=wcsmbs/test-wcsnlen
+	Note that this will rebuild the test if needed, but will not
+	rebuild what "make all" would have rebuilt.
+
+--
+Other useful hints:
+
+$ rm $(objpfx)testroot.pristine/install.stamp
+	Forces the testroot to be reinstalled the next time you run
+	the testsuite (or just rm -rf testroot.pristine)
+

  parent reply	other threads:[~2019-09-30 20:07 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-25 20:41 DJ Delorie
2019-09-25 21:12 ` Carlos O'Donell
2019-09-25 21:18   ` DJ Delorie
2019-09-26  9:10 ` Szabolcs Nagy
2019-09-30 19:37   ` [v2, with help] " DJ Delorie
2019-09-30 19:47     ` Carlos O'Donell
2019-09-30 19:58       ` DJ Delorie
2019-09-30 20:51         ` Carlos O'Donell
2019-09-30 20:07       ` DJ Delorie [this message]
2019-09-30 20:57         ` [v3, " Carlos O'Donell
2019-10-02 18:44         ` [v4, " DJ Delorie
2019-10-18 19:06           ` Carlos O'Donell
2019-10-18 19:47             ` DJ Delorie
2019-09-30 20:12     ` [v2, " Andreas Schwab
2019-09-30 20:20       ` DJ Delorie
2019-09-30 20:26         ` Andreas Schwab
2019-10-04 12:36     ` Florian Weimer
2019-10-04 17:33       ` DJ Delorie

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=xnmuelk0ps.fsf@greed.delorie.com \
    --to=dj@redhat.com \
    --cc=Szabolcs.Nagy@arm.com \
    --cc=carlos@redhat.com \
    --cc=libc-alpha@sourceware.org \
    --cc=nd@arm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).