automake-patches
[Top][All Lists]
Advanced

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

Re: parallel-tests: avoid command-line length limit issue.


From: Bob Friesenhahn
Subject: Re: parallel-tests: avoid command-line length limit issue.
Date: Wed, 28 Dec 2011 13:27:33 -0600 (CST)
User-agent: Alpine 2.01 (GSO 1266 2009-07-14)

Sorry for top-posting. I don't want to lose any text of the original mail.

I totally forgot that I had applied Ralf's patch to my 1.11.1 install. Now that I have updated GraphicsMagick to using Automake 1.11.2, the patch is no longer present and so 'make check' on MinGW/MSYS leads to this:

/usr/bin/csmake  check-TESTS check-local
csmake[2]: Entering directory `/home/bfriesen/mingw/GM-16-static'
csmake[3]: Entering directory `/home/bfriesen/mingw/GM-16-static'
csmake[3]: execvp: /bin/sh: Invalid argument
csmake[3]: *** [tests/constitute_char_bgr.log] Error 127
csmake[3]: Leaving directory `/home/bfriesen/mingw/GM-16-static'
csmake[2]: *** [check-TESTS] Error 2
csmake[2]: Leaving directory `/home/bfriesen/mingw/GM-16-static'
csmake[1]: *** [check-am] Error 2
csmake[1]: Leaving directory `/home/bfriesen/mingw/GM-16-static'
csmake: *** [check] Error 2

Today I lost more hair because I had totally forgotten about this issue and the problem was first noticed after making some changes to configure.ac.

Hopefully this problem can be resolved before Automake 1.12 is released.

Bob

On Sat, 2 Oct 2010, Ralf Wildenhues wrote:

* Ralf Wildenhues wrote on Tue, Sep 07, 2010 at 05:10:38AM CEST:
I'm applying the following patch to maint to avoid the issue.

Unfortunately, the same technique will not work for recheck and
recheck-html.  So no rechecking unless the number of failures is
lower than the command-line length limit allows.

    parallel-tests: avoid command-line length limit issue.

    * automake.in (handle_tests): New argument $makefile, new
    substitution %MAKEFILE%.
    (generate_makefile): Adjust.
    * lib/am/check.am [%?PARALLEL_TESTS%] (check-TESTS): Pass
    sanitized TEST_LOGS value as makefile snippet on standard
    input to $(MAKE), to avoid exceeding the command line limit on
    w32 (MSYS).
    * NEWS: Update.
    Report by Bob Friesenhahn.

Ah, even this patch was borked.  I don't have a good solution yet
without thinking yet some more.  Since I would really like to get
rid of known regressions, I'm reverting the patch for now.

Committing the patch below to a new branch off of the above commit,
and merging into maint and thus branch-1.11 and master.

This is the first time I'm doing this with the new git development
model, so we don't have prior samples for revert commit messages;
I'm leaning this on the way GCC does it.

Cheers, and sorry,
Ralf

   Revert "parallel-tests: avoid command-line length limit issue."

   This reverts commit 24e3b4ee2f8cb9f72dd94a05a893f3d4e88b7835,
   because it re-opened the bug fixed by v1.11-10-g218e678.

   2010-09-07  Ralf Wildenhues  <address@hidden>

   parallel-tests: avoid command-line length limit issue.
   * automake.in (handle_tests): New argument $makefile, new
   substitution %MAKEFILE%.
   (generate_makefile): Adjust.
   * lib/am/check.am [%?PARALLEL_TESTS%] (check-TESTS): Pass
   sanitized TEST_LOGS value as makefile snippet on standard
   input to $(MAKE), to avoid exceeding the command line limit on
   w32 (MSYS).
   * NEWS: Update.
   Report by Bob Friesenhahn.

diff --git a/NEWS b/NEWS
index 3a0ca06..b3d4131 100644
--- a/NEWS
+++ b/NEWS
@@ -22,9 +22,6 @@ Bugs fixed in 1.11.0a:
  - The AM_COND_IF macro also works if the shell expression for the conditional
    is no longer valid for the condition.

-  - The `parallel-tests' driver works around a problem with command-line
-    length limits with `make check' on w32 (MSYS).
-
* Long standing bugs:

  - On Darwin 9, `pythondir' and `pyexecdir' pointed below `/Library/Python'
diff --git a/automake.in b/automake.in
index fa098bb..381202b 100755
--- a/automake.in
+++ b/automake.in
@@ -4908,13 +4908,9 @@ sub handle_tests_dejagnu
}


-# handle_tests ($MAKEFILE)
-# ------------------------
# Handle TESTS variable and other checks.
-sub handle_tests ($)
+sub handle_tests
{
-  my ($makefile) = @_;
-
  if (option 'dejagnu')
    {
      &handle_tests_dejagnu;
@@ -4933,8 +4929,7 @@ sub handle_tests ($)
      push (@check_tests, 'check-TESTS');
      $output_rules .= &file_contents ('check', new Automake::Location,
                                       COLOR => !! option 'color-tests',
-                                      PARALLEL_TESTS => !! option 
'parallel-tests',
-                                      MAKEFILE => basename $makefile);
+                                      PARALLEL_TESTS => !! option 
'parallel-tests');

      # Tests that are known programs should have $(EXEEXT) appended.
      # For matching purposes, we need to adjust XFAIL_TESTS as well.
@@ -8216,7 +8211,7 @@ sub generate_makefile ($$)
  handle_tags;
  handle_minor_options;
  # Must come after handle_programs so that %known_programs is up-to-date.
-  handle_tests ($makefile);
+  handle_tests;

  # This must come after most other rules.
  handle_dist;
diff --git a/lib/am/check.am b/lib/am/check.am
index b79201f..c612b22 100644
--- a/lib/am/check.am
+++ b/lib/am/check.am
@@ -236,10 +236,10 @@ check-TESTS:
## we rely on .PHONY to work portably.
        @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG)
        @list='$(TEST_LOGS)';                                           \
-       { echo "TEST_LOGS = \\";                                      \
-         for f in $$list; do test .log = $$f || echo "$$f \\"; done; \
-       } | sed '$$s/\\$$//'                                            \
-         | $(MAKE) -f %MAKEFILE% -f - $(AM_MAKEFLAGS) $(TEST_SUITE_LOG)
+       list=`for f in $$list; do                                       \
+         test .log = $$f || echo $$f;                                  \
+       done | tr '\012\015' '  '`;                                     \
+       $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) TEST_LOGS="$$list"

AM_RECURSIVE_TARGETS += check



--
Bob Friesenhahn
address@hidden, http://www.simplesystems.org/users/bfriesen/
GraphicsMagick Maintainer,    http://www.GraphicsMagick.org/



reply via email to

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