user/dev discussion of public-inbox itself
 help / color / mirror / code / Atom feed
Search results ordered by [date|relevance]  view[summary|nested|Atom feed]
thread overview below | download mbox.gz: |
* Re: [PATCH] doc: HACKING: add a bit about faster testing
  2020-04-20  7:05 14%         ` [PATCH] doc: HACKING: add a bit about faster testing Eric Wong
@ 2020-04-20 13:26  9%           ` Kyle Meyer
  0 siblings, 0 replies; 2+ results
From: Kyle Meyer @ 2020-04-20 13:26 UTC (permalink / raw)
  To: Eric Wong; +Cc: meta

Eric Wong <e@80x24.org> writes:

> `make test' is annoyingly slow, and `make check-run' works
> wonders for improving the edit && test cycle.
> ---
>  Documentation/txt2pre |  5 +++--
>  HACKING               | 18 ++++++++++++++++++
>  INSTALL               |  2 +-
>  3 files changed, 22 insertions(+), 3 deletions(-)

Great, thank you for the information!

^ permalink raw reply	[relevance 9%]

* [PATCH] doc: HACKING: add a bit about faster testing
  @ 2020-04-20  7:05 14%         ` Eric Wong
  2020-04-20 13:26  9%           ` Kyle Meyer
  0 siblings, 1 reply; 2+ results
From: Eric Wong @ 2020-04-20  7:05 UTC (permalink / raw)
  To: meta; +Cc: Kyle Meyer

Eric Wong <e@80x24.org> wrote:
> Kyle Meyer <kyle@kyleam.com> wrote:
> > Ah, sorry.  Aside from, er, actually knowing what I'm doing in perl and
> > seeing that obvious mistake, is there a way I could see the warning when
> > I run the tests?  To run only the tests in that file as I was working on
> > it, I started with the command I saw when I called 'make test' and
> > restricted it to just the file, So, with typo included for historical
> > accuracy :), I was running
> 
> Ah, oops.  I normally use `make check' (or `check-run' after
> being primed by `check').  HACKING needs to be patched, and
> maybe a pointer to it in INSTALL.

------8<-----
Subject: [PATCH] doc: HACKING: add a bit about faster testing

`make test' is annoyingly slow, and `make check-run' works
wonders for improving the edit && test cycle.
---
 Documentation/txt2pre |  5 +++--
 HACKING               | 18 ++++++++++++++++++
 INSTALL               |  2 +-
 3 files changed, 22 insertions(+), 3 deletions(-)

diff --git a/Documentation/txt2pre b/Documentation/txt2pre
index c3a7657e..cf58bad8 100755
--- a/Documentation/txt2pre
+++ b/Documentation/txt2pre
@@ -39,9 +39,9 @@ for (qw[copydatabase(1) xapian-compact(1)]) {
 	$xurls{$_} = ".$n.1.html"
 }
 
-for (qw[flock(2) setrlimit(2) vfork(2)]) {
+for (qw[make(1) flock(2) setrlimit(2) vfork(2) tmpfs(5)]) {
 	my ($n, $s) = (/([\w\-]+)\((\d)\)/);
-	$xurls{$_} = "http://www.man7.org/linux/man-pages/man2/$n.$s.html";
+	$xurls{$_} = "http://www.man7.org/linux/man-pages/man$s/$n.$s.html";
 }
 
 for (qw[git(1)
@@ -82,6 +82,7 @@ $xurls{'git-filter-repo(1)'} = 'https://github.com/newren/git-filter-repo'.
 			'./blob/master/Documentation/git-filter-repo.txt';
 $xurls{'ssoma(1)'} = 'https://ssoma.public-inbox.org/ssoma.txt';
 $xurls{'cgitrc(5)'} = 'https://git.zx2c4.com/cgit/tree/cgitrc.5.txt';
+$xurls{'prove(1)'} = 'https://perldoc.perl.org/prove.html';
 
 my $str = do { local $/; <STDIN> };
 my ($title) = ($str =~ /\A([^\n]+)/);
diff --git a/HACKING b/HACKING
index cceb686f..74a3096f 100644
--- a/HACKING
+++ b/HACKING
@@ -59,6 +59,24 @@ directory for design decisions made during development.
 See Documentation/technical/ in the source tree for more details
 on specific topics, in particular data_structures.txt
 
+Faster tests
+------------
+
+The `make test' target provided by MakeMaker does not run in
+parallel.  Our `make check' target supports parallel runs, and
+it also creates a `.prove' file to optimize `make check-run'.
+
+The prove(1) command (distributed with Perl) may also be used
+for finer-grained testing: prove -bvw t/foo.t
+
+If using a make(1) (e.g. GNU make) with `include' support, the
+`config.mak' Makefile snippet can be used to set environment
+variables such as PERL_INLINE_DIRECTORY and TMPDIR.
+
+With PERL_INLINE_DIRECTORY set to enable Inline::C support and
+TMPDIR pointed to a tmpfs(5) mount, `make check-run' takes 6-10s
+(load-dependent) on a busy workstation built in 2010.
+
 Perl notes
 ----------
 
diff --git a/INSTALL b/INSTALL
index 3984df71..2dd7dcff 100644
--- a/INSTALL
+++ b/INSTALL
@@ -191,7 +191,7 @@ install the system (into /usr/local) with:
 
         perl Makefile.PL
         make
-        make test
+        make test    # see HACKING for faster tests for hackers
         make install # root permissions may be needed
 
 When installing Search::Xapian, make sure the underlying Xapian

^ permalink raw reply related	[relevance 14%]

Results 1-2 of 2 | reverse | options above
-- pct% links below jump to the message on this page, permalinks otherwise --
2020-04-12 21:59     [RFC PATCH] watchmaildir: support multiple watchheader values Eric Wong
2020-04-20  0:13     ` [PATCH v2] " Kyle Meyer
2020-04-20  0:45       ` Eric Wong
2020-04-20  1:13         ` Kyle Meyer
2020-04-20  1:32           ` Eric Wong
2020-04-20  7:05 14%         ` [PATCH] doc: HACKING: add a bit about faster testing Eric Wong
2020-04-20 13:26  9%           ` Kyle Meyer

Code repositories for project(s) associated with this public inbox

	https://80x24.org/public-inbox.git

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).