Re: [PATCH] {master} release-stats: account for generated `instspc-*.test' tests.

2010-11-20 Thread Stefano Lattarini
On Saturday 20 November 2010, Ralf Wildenhues wrote:
 * Stefano Lattarini wrote on Fri, Nov 19, 2010 at 09:18:33PM CET:
  I've realized that my patch on instspc.test split  refactoring has
  broken the release-stats target, since now there are other generated
  tests besides the `*-p.test' tests.
  
  The attached patch fix this glitch in a quick  dirty way; a better
  fix would probably involve a refactoring of the whole release-stats
  target, but that can be done later IMHO.
  
  So, OK to apply the attached patch to a temporary branch based off
  of commit `v1.11-395-ge118126' Overhauled and modularized tests in
  `instspc.test'., and merge to master?
 
 This will break again when we add the next set of generated tests.

True.  That's why in the refactoring I have in mind we would define a
new variable `$(generated_tests)' in tests/Makefile.am, and fetch its
value from top-level Makefile.

 How about determining them by grepping the test source for 'GENERATED
 AUTOMATICALLY' in the test source?

That might be a bit fragile too in the long run, but it's definitely
better than my hack in the short run.  So I'll make the change.

Thanks,
  Stefano



Re: [PATCH] {master} release-stats: account for generated `instspc-*.test' tests.

2010-11-20 Thread Stefano Lattarini
I pushed this:

-*-*-*-

release-stats: account for more generated tests.

* Makefile.am (release-stats): Be sure to take into account all
the generated tests, by grepping the test scripts to decide which
ones of them are automatically generated.
---
 ChangeLog   |7 +++
 Makefile.am |2 +-
 Makefile.in |2 +-
 3 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 2d0a145..fddb01f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2010-11-20  Stefano Lattarini  stefano.lattar...@gmail.com
+
+   release-stats: account for more generated tests.
+   * Makefile.am (release-stats): Be sure to take into account all
+   the generated tests, by grepping the test scripts to decide which
+   ones of them are automatically generated.
+
 2010-11-03  Stefano Lattarini  stefano.lattar...@gmail.com
 
Overhauled and modularized tests in `instspc.test'.
diff --git a/Makefile.am b/Makefile.am
index a5df109..1dec51e 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -658,7 +658,7 @@ release-stats: ps
if test . != '$(srcdir)'; then tests=$$tests $(srcdir)/tests/*.test; \
else :; fi  \
t=`ls -1 $$tests | wc -l`  \
-   tgen=`ls -1 $$tests | grep '.-p\.test' | wc -l`  \
+   tgen=`grep 'GENERATED AUTOMATICALLY' $$tests | wc -l`  \
today=`date +%Y-%m-%d`  \
echo add this to the table in doc/automake.texi after verification: 
 \
printf '@item %s @tab %-6s @tab %4d @tab %4d @tab %4d @tab %4d %-4s 
@tab %4d %-4s @tab %3d @tab %d %-4s\n' \
diff --git a/Makefile.in b/Makefile.in
index d9cff86..a721fce 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -1334,7 +1334,7 @@ release-stats: ps
if test . != '$(srcdir)'; then tests=$$tests $(srcdir)/tests/*.test; \
else :; fi  \
t=`ls -1 $$tests | wc -l`  \
-   tgen=`ls -1 $$tests | grep '.-p\.test' | wc -l`  \
+   tgen=`grep 'GENERATED AUTOMATICALLY' $$tests | wc -l`  \
today=`date +%Y-%m-%d`  \
echo add this to the table in doc/automake.texi after verification: 
 \
printf '@item %s @tab %-6s @tab %4d @tab %4d @tab %4d @tab %4d %-4s 
@tab %4d %-4s @tab %3d @tab %d %-4s\n' \
-- 
1.7.1

-*-*-*-

Regards,
   Stefano



Re: [PATCH] {master} release-stats: account for generated `instspc-*.test' tests.

2010-11-19 Thread Ralf Wildenhues
* Stefano Lattarini wrote on Fri, Nov 19, 2010 at 09:18:33PM CET:
 I've realized that my patch on instspc.test split  refactoring has
 broken the release-stats target, since now there are other generated
 tests besides the `*-p.test' tests.
 
 The attached patch fix this glitch in a quick  dirty way; a better
 fix would probably involve a refactoring of the whole release-stats
 target, but that can be done later IMHO.
 
 So, OK to apply the attached patch to a temporary branch based off
 of commit `v1.11-395-ge118126' Overhauled and modularized tests in
 `instspc.test'., and merge to master?

This will break again when we add the next set of generated tests.
How about determining them by grepping the test source for 'GENERATED
AUTOMATICALLY' in the test source?  OK with that change, and after
testing suitably.

Thanks,
Ralf

 From 00dbb4fe7d27510718a60d721c932d4f8fb6b2dc Mon Sep 17 00:00:00 2001
 From: Stefano Lattarini stefano.lattar...@gmail.com
 Date: Fri, 19 Nov 2010 21:16:03 +0100
 Subject: [PATCH] release-stats: account for generated `instspc-*.test' tests.
 
 * Makefile.am (release-stats): Also account for generated tests
 `instspc-*.test'.