bug-automake
[Top][All Lists]
Advanced

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

use 'jot' if available (was: automake-1.11 test failure on darwin9 - ins


From: Ralf Wildenhues
Subject: use 'jot' if available (was: automake-1.11 test failure on darwin9 - instmany-python.test)
Date: Mon, 18 May 2009 23:05:24 +0200
User-agent: Mutt/1.5.18 (2008-05-17)

Hi Peter,

thanks for the bug report; will address in a separate message.  For now:

* Peter O'Gorman wrote on Mon, May 18, 2009 at 03:43:00AM CEST:
> Also, I wonder if it is worth checking for bsd''s 'jot' utility in these
> tests that use seq?

That sounds like a good idea to me.  I didn't know jot.
I'm pushing this.

Cheers,
Ralf

    testsuite: also try `jot' as `seq' replacement.
    
    * tests/instmany-mans.test: Try BSD `jot' before resorting to a
    slow but portable shell loop.
    * tests/instmany-python.test: Likewise.
    * tests/instmany.test: Likewise.
    Suggestion by Peter O'Gorman.

diff --git a/tests/instmany-mans.test b/tests/instmany-mans.test
index 3ba8334..5fafa67 100755
--- a/tests/instmany-mans.test
+++ b/tests/instmany-mans.test
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2008  Free Software Foundation, Inc.
+# Copyright (C) 2008, 2009  Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -31,8 +31,8 @@ limit=2500
 subdir=long_subdir_name_with_many_characters
 nfiles=81
 
-# Let's use `seq' if available, it's faster than the loop.
-list=`(seq 1 $nfiles) 2>/dev/null || {
+# Let's use `seq' or `jot' if available, they are faster than the loop.
+list=`(seq 1 $nfiles) 2>/dev/null || (jot $nfiles) 2>/dev/null || {
   i=1
   while test $i -le $nfiles; do
     echo $i
diff --git a/tests/instmany-python.test b/tests/instmany-python.test
index d55af0f..9407948 100755
--- a/tests/instmany-python.test
+++ b/tests/instmany-python.test
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2008  Free Software Foundation, Inc.
+# Copyright (C) 2008, 2009  Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -27,7 +27,7 @@ limit=2500
 subdir=long_subdir_name_with_many_characters
 nfiles=81
 
-list=`(seq 1 $nfiles) 2>/dev/null || {
+list=`(seq 1 $nfiles) 2>/dev/null || (jot $nfiles) 2>/dev/null || {
   i=1
   while test $i -le $nfiles; do
     echo $i
diff --git a/tests/instmany.test b/tests/instmany.test
index aabeb7b..e423710 100755
--- a/tests/instmany.test
+++ b/tests/instmany.test
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2008  Free Software Foundation, Inc.
+# Copyright (C) 2008, 2009  Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -39,8 +39,8 @@ limit=2500
 subdir=long_subdir_name_with_many_characters
 nfiles=81
 
-# Let's use `seq' if available, it's faster than the loop.
-list=`(seq 1 $nfiles) 2>/dev/null || {
+# Let's use `seq' or `jot' if available, they are faster than the loop.
+list=`(seq 1 $nfiles) 2>/dev/null || (jot $nfiles) 2>/dev/null || {
   i=1
   while test $i -le $nfiles; do
     echo $i




reply via email to

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