Return-Path: Delivered-To: apmail-ant-user-archive@www.apache.org Received: (qmail 49243 invoked from network); 16 Aug 2006 03:45:08 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 16 Aug 2006 03:45:08 -0000 Received: (qmail 88309 invoked by uid 500); 16 Aug 2006 03:45:05 -0000 Delivered-To: apmail-ant-user-archive@ant.apache.org Received: (qmail 88049 invoked by uid 500); 16 Aug 2006 03:45:04 -0000 Mailing-List: contact user-help@ant.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Ant Users List" Reply-To: "Ant Users List" Delivered-To: mailing list user@ant.apache.org Received: (qmail 68120 invoked by uid 99); 15 Aug 2006 18:27:12 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy) X-Virus-Scanned: by amavis-2.4.0 at mail.cs.rice.edu Mime-Version: 1.0 (Apple Message framework v752.2) Content-Transfer-Encoding: quoted-printable Message-Id: <796FC6D7-0C03-454B-B262-C2BAC51871F4@rice.edu> Content-Type: text/plain; charset=WINDOWS-1252; delsp=yes; format=flowed To: Ant Users List From: Daniel Smith Subject: Repeating a task x times Date: Tue, 15 Aug 2006 13:26:49 -0500 X-Mailer: Apple Mail (2.752.2) X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N I'm interested in writing a script that repeats some task a user-=20 specified number of times. This is useful where the behavior of =20 JUnit tests is randomized (explicitly or, in this case, due to =20 concurrency irregularities), and a test sample of size larger than 1 =20 is needed. The best solution we've been able to come up with is the "for" task =20 from ant-contrib. Unfortunately, "for" iterates over lists (or =20 tokenized strings), not numbers. So we can do something like this: > ant -Drepeat=3D"1,2,3" sometarget (do something) Clearly, this isn't ideal. I might explore doing something with the =20 "math" task in ant-contrib. What other recommendations do you have? =97Dan --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@ant.apache.org For additional commands, e-mail: user-help@ant.apache.org