automake-ng
[Top][All Lists]
Advanced

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

[Automake-NG] [FYI] [ng] check: fix incompatibility with Solaris nawk


From: Stefano Lattarini
Subject: [Automake-NG] [FYI] [ng] check: fix incompatibility with Solaris nawk
Date: Fri, 25 May 2012 18:59:45 +0200

On Solaris 10, the parallel testsuite harness could fail with errors
like this when /usr/bin/nawk was the selected awk program.

  nawk: next is illegal inside a function at source line 1 in \
  function input_error; context is:
      function input_error(file) { ... close_current(); next; >>> } <<<

* lib/am/parallel-tests.am (am__create_global_log): In the awk script
defined by this function, avoid use of the 'next' directive inside a
function.

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

 Automake-NG first documented regression :-)
 I've already pushed the fix to ng/master.

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

diff --git a/lib/am/parallel-tests.am b/lib/am/parallel-tests.am
index 0c3e9ff..819b4e2 100644
--- a/lib/am/parallel-tests.am
+++ b/lib/am/parallel-tests.am
@@ -189,7 +189,6 @@ function input_error(file) \
 { \
   error("awk" ": cannot read \"" file "\""); \
   close_current(); \
-  next; \
 } \
 function rst_section(header) \
 { \
@@ -209,7 +208,10 @@ BEGIN { exit_status = 0; } \
   while ((rc = (getline line < ($$0 ".trs"))) != 0) \
     { \
       if (rc < 0) \
-        input_error($$0 ".trs"); \
+        { \
+          input_error($$0 ".trs"); \
+          next; \
+        } \
       if (line ~ /$(am__global_test_result_rx)/) \
         { \
           sub("$(am__global_test_result_rx)", "", line); \
@@ -225,7 +227,10 @@ BEGIN { exit_status = 0; } \
       while ((rc = (getline line < ($$0 ".log"))) != 0) \
       { \
         if (rc < 0) \
-          input_error($$0 ".log"); \
+          { \
+            input_error($$0 ".log"); \
+            next; \
+          } \
         print line; \
       }; \
       printf "\n"; \
-- 
1.7.9.5




reply via email to

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