X-Original-To: alpine-devel@lists.alpinelinux.org Delivered-To: alpine-devel@lists.alpinelinux.org Received: from mail-bw0-f54.google.com (mail-bw0-f54.google.com [209.85.214.54]) by lists.alpinelinux.org (Postfix) with ESMTP id AAF391EBFEE for ; Thu, 25 Nov 2010 03:30:24 +0000 (UTC) Received: by bwz2 with SMTP id 2so507738bwz.13 for ; Wed, 24 Nov 2010 19:30:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=FTqwA0KFFYz1Zc4uz62TI3rDa/lAMyXtGe+a+qeOd74=; b=BeSYhw60sUBOcGqrwQTcaz1DRZ/vsgz2KyeeYXDnBPtveFhtIadgJwNHLEbGV2IIRu m/NPNs+O8fQiQZ8DXczBKbXGeT/uR/XZBkw0bMbpfTpaeAxd8Qf7dgBwzGnvDyOG4L7V IajBdzSUaA5Elg4VDJrLWGe8bUarrcCOpPAGk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=p6H1qbeiSu7SITW7zjzEC2HuWoco3B4tCr7ZZo2bbo1pVcE9Q7QN75m0iR3FQCvSA4 PXtssc8l3k7QaKuR8AJM67CSHxsj752FjEKgq3qRCR7MDxy2ERU4m//Yif5dncI9T/K7 d16MaSZ4P5gH2++u55u1bwl5Dp8dicHxw52WA= X-Mailinglist: alpine-devel Precedence: list List-Id: Alpine Development List-Unsubscribe: List-Post: List-Help: List-Subscribe: MIME-Version: 1.0 Received: by 10.204.116.201 with SMTP id n9mr163004bkq.138.1290655823238; Wed, 24 Nov 2010 19:30:23 -0800 (PST) Received: by 10.204.126.212 with HTTP; Wed, 24 Nov 2010 19:30:23 -0800 (PST) In-Reply-To: <1290633981-2048-1-git-send-email-jbilyk@gmail.com> References: <1290633981-2048-1-git-send-email-jbilyk@gmail.com> Date: Wed, 24 Nov 2010 22:30:23 -0500 Message-ID: Subject: [alpine-devel] Re: [PATCH] apts2: initial commit From: Jeff Bilyk To: Alpine Development Cc: ncopa@alpinelinux.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Here's what I've got for the initial version of the package testing part of things. I'll try to whip up a quick script that will take the original APTS .mk files and convert them to the format used by this script (take out line 1 and s/apk_delete/apk_del). Tried to keep it as simple as possible since it'll need to run quite a bit. Also, tried to keep the output fairly easy to search through. Thoughts/feedback? Jeff On Wed, Nov 24, 2010 at 4:26 PM, Jeff Bilyk wrote: > initial commit with package testing script and 2 package scripts > --- > =A0apts2 =A0 =A0 =A0 =A0 | =A0 31 +++++++++++++++++++++++++++++++ > =A0packages/lsof | =A0 =A03 +++ > =A0packages/sed =A0| =A0 =A04 ++++ > =A03 files changed, 38 insertions(+), 0 deletions(-) > =A0create mode 100755 apts2 > =A0create mode 100644 packages/lsof > =A0create mode 100644 packages/sed > > diff --git a/apts2 b/apts2 > new file mode 100755 > index 0000000..f4fd910 > --- /dev/null > +++ b/apts2 > @@ -0,0 +1,31 @@ > +#!/bin/sh > + > +# Get file to output to > +ARGUMENTS=3D"$@" > +OUTFILE=3D"`echo $ARGUMENTS | awk -F ' ' '{print $1}'`" > +if [ -z "$OUTFILE" ]; > + =A0 =A0 =A0 =A0then echo "Usage: $0 outputfile " && exit 1; > +fi > + > +if [ "$OUTFILE" =3D=3D "-h" ]; > + =A0 =A0 =A0 =A0then echo "Usage: $0 outputfile " && exit 0; > +fi > + > +if [ "$OUTFILE" =3D=3D "--help" ]; > + =A0 =A0 =A0 =A0then echo "Usage: $0 outputfile " && exit 0; > +fi > + > +PACKAGE=3D"`echo $ARGUMENTS | awk -F ' ' '{print $2}'`" > + > +if [ -z "$PACKAGE" ]; > + =A0 =A0 =A0 =A0then echo "All packages to be tested" && for package in = `ls ./packages`; > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0do echo "Testing $package apk" && /bin/s= h -e ./packages/$package >> "$OUTFILE" 2>&1 && echo "$package passed tests"= >> "$OUTFILE" && echo "$package passed tests"; > + > + =A0 =A0 =A0 =A0done && exit 0; > +else test -e ./packages/$PACKAGE && echo "Testing $PACKAGE apk" && /bin/= sh -e ./packages/$PACKAGE >> "$OUTFILE" 2>&1 && echo "$PACKAGE passed tests= " && exit 0; > + > +fi > + > +if [ "$?" =3D=3D "1" ]; > + =A0 =A0 =A0 =A0then echo "Testing file for $PACKAGE does not exist" && = exit 1; > +fi > \ No newline at end of file > diff --git a/packages/lsof b/packages/lsof > new file mode 100644 > index 0000000..3c49a22 > --- /dev/null > +++ b/packages/lsof > @@ -0,0 +1,3 @@ > + =A0 =A0 =A0 apk_add $@ > + =A0 =A0 =A0 lsof > + =A0 =A0 =A0 apk_del $@ > diff --git a/packages/sed b/packages/sed > new file mode 100644 > index 0000000..0d1b744 > --- /dev/null > +++ b/packages/sed > @@ -0,0 +1,4 @@ > + =A0 =A0 =A0 apk_add $@ > + =A0 =A0 =A0 echo "hello" | sed 's/hello/world/g' | grep 'world' > + =A0 =A0 =A0 apk_del $@ > + =A0 =A0 =A0 [ `readlink /bin/sed` =3D /bin/busybox ] > -- > 1.7.3.2 > > --=20 Jeff --- Unsubscribe: alpine-devel+unsubscribe@lists.alpinelinux.org Help: alpine-devel+help@lists.alpinelinux.org ---