automake-ng
[Top][All Lists]
Advanced

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

[Automake-NG] [PATCH] [ng] parallel-tests: use 'am__error' instead of ha


From: Stefano Lattarini
Subject: [Automake-NG] [PATCH] [ng] parallel-tests: use 'am__error' instead of hand-rolled equivalent
Date: Wed, 6 Jun 2012 18:40:22 +0200

The API offered by 'am__error' (as introduced in recent commit
'v1.12.1-302-g67d6102') is cleaner, and allows us to diagnose more
issues (even if unrelated), rather than stopping at the first one.

* lib/am/parallel-tests.am: Use '$(am__error)' instead of an hand-rolled
poor man's equivalent to diagnose invalid $(TEST_EXTENSIONS).  In
particular ...
(am__maybe_invalid_test_extensions): Remove this as now useless.

Signed-off-by: Stefano Lattarini <address@hidden>
---

 This patch should be pretty uncontroversial, and I intend to push it
 soon.  Still, a couple more of eyeballs going over it won't hurt, so
 a review is welcome.

 Regards,
   Stefano

 lib/am/parallel-tests.am |   11 ++---------
 1 file changed, 2 insertions(+), 9 deletions(-)

diff --git a/lib/am/parallel-tests.am b/lib/am/parallel-tests.am
index b628853..8f4c0f9 100644
--- a/lib/am/parallel-tests.am
+++ b/lib/am/parallel-tests.am
@@ -28,13 +28,6 @@ include color-tests.am
 ## Used by (at least) 'check-typos.am'.
 am__using_parallel_tests := yes
 
-am__maybe_invalid_test_extensions = \
-  $(if \
-    $(strip $1), \
-    $(foreach am__e, $1,\
-      $(warning invalid test extension: '$(am__e)')) \
-    $(error invalid test extensions have been encountered))
-
 am__is_xfail_test = \
   $(if $(filter-out $(am__xfail_test_bases), \
                     $(patsubst $(srcdir)/%,%,$(1))),no,yes)
@@ -94,8 +87,8 @@ am__tpfx = \
 ## FIXME: this will pick up the default from the environment; are we sure
 ## FIXME: we want that?
 !TEST_EXTENSIONS ?= .test
-!$(call am__maybe_invalid_test_extensions,\
-!  $(filter-out .%,$(TEST_EXTENSIONS)))
+!$(foreach am__e,$(filter-out .%,$(TEST_EXTENSIONS)),\
+!     $(call am__error,invalid test extension: '$(am__e)'))
 !$(foreach am__e,$(TEST_EXTENSIONS), \
 !  $(eval $(call am__handle_per_suffix_test,$(am__e))))
 ## It is *imperative* that the "empty" suffix goes last.  Otherwise, a
-- 
1.7.9.5




reply via email to

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