bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] maint: mention how to run a single test in HACKING docs


From: Pádraig Brady
Subject: Re: [PATCH] maint: mention how to run a single test in HACKING docs
Date: Fri, 13 Feb 2009 11:15:37 +0000
User-agent: Thunderbird 2.0.0.6 (X11/20071008)

Ralf Wildenhues wrote:
>> Pádraig Brady <P <at> draigBrady.com> wrote:
>>> +  env DEBUG=yes VERBOSE=yes make check -C tests TESTS=mv/hard-link-1 >> log
> 2>&1
> 
> FWIW, 'make -C' is GNU make-specific, the portable equivalent would be
>   cd tests && env DEBUG=yes VERBOSE=yes make check TESTS=...

Good point. The attached patch says:

(cd tests && make check TESTS=misc/newtest VERBOSE=yes)

> and catering to even more ugly make issues (macro settings on the command line
> not being passed down to sub-make invocations; and automake causing check to
> invoke a sub-make for the check-TESTS target), it would be:
>   cd tests && env DEBUG=yes VERBOSE=yes TESTS=... make -e check
> 
> Of course, -e has its own set of problems, depending on what the user has
> set in the environment already.

I'm not worrying about the above for the moment.

thanks,
Pádraig.
>From 48cae1e8642684f0103848b84d5884d1ba2412c8 Mon Sep 17 00:00:00 2001
From: =?utf-8?q?P=C3=A1draig=20Brady?= <address@hidden>
Date: Thu, 12 Feb 2009 13:51:03 +0000
Subject: [PATCH] maint: mention how to run a single test in HACKING docs

* HACKING: Give an example of how to run a test in isolation.
* README: Fix/simplify example for running a single test.
* README-hacking: Reference the HACKING file.
---
 HACKING        |    4 +++-
 README         |   14 +++++---------
 README-hacking |    1 +
 3 files changed, 9 insertions(+), 10 deletions(-)

diff --git a/HACKING b/HACKING
index 6eb0480..2869c03 100644
--- a/HACKING
+++ b/HACKING
@@ -288,7 +288,9 @@ Nearly every significant change must be accompanied by a 
test suite
 addition that exercises it.  If you fix a bug, add at least one test that
 fails without the patch, but that succeeds once your patch is applied.
 If you add a feature, add tests to exercise as much of the new code
-as possible.
+as possible. Note to run tests/misc/newtest in isolation you can do:
+
+  (cd tests && make check TESTS=misc/newtest VERBOSE=yes)
 
 There are hundreds of tests in the tests/ directories.  You can use
 tests/sample-test as a template, or one of the various Perl-based ones
diff --git a/README b/README
index 157432e..58aec01 100644
--- a/README
+++ b/README
@@ -161,17 +161,13 @@ Reporting bugs:
 IMPORTANT: if you take the time to report a test failure,
 please be sure to include the output of running `make check'
 in verbose mode for each failing test.  For example,
-if the test that fails is tests/mv/hard-link-1, then you
-would run this command:
+if the test that fails is tests/misc/df, then you would
+run this command:
 
-  env VERBOSE=yes make check -C tests/mv TESTS=hard-link-1 >> log 2>&1
+  (cd tests && make check TESTS=misc/df VERBOSE=yes) >> log 2>&1
 
-For some tests, you can get even more detail by including
-DEBUG=yes in the environment:
-
-  env DEBUG=yes VERBOSE=yes make check -C tests/mv TESTS=hard-link-1 >> log 
2>&1
-
-and then include the contents of the file `log' in your bug report.
+For some tests, you can get even more detail by adding DEBUG=yes.
+Then include the contents of the file `log' in your bug report.
 
 ***************************************
 
diff --git a/README-hacking b/README-hacking
index 8333cd0..7a8b4c4 100644
--- a/README-hacking
+++ b/README-hacking
@@ -2,6 +2,7 @@
 
 These notes intend to help people working on the checked-out sources.
 These requirements do not apply when building from a distribution tarball.
+See also HACKING for more detailed coreutils contribution guidlines.
 
 * Requirements
 
-- 
1.5.3.6


reply via email to

[Prev in Thread] Current Thread [Next in Thread]