On Mon, 19 Nov 2012 13:21:14 -0700 Bdale Garbee <[email protected]> wrote:
> Ian Jackson <[email protected]> writes:
> 
> > I haven't looked at gzip in particular, so I don't know what its
> > upstream test suite is like.
> 
> Fairly basic testing similar to what was added in the patch... very
> unlike tar, which has a quite comprehensive upstream test suite that
> actually takes a while to run.  However, even in the tar case I'd rather
> see an autopkgtest harness crafted to run a subset of the existing tests
> than different/replicated tests added.
> 
> Bdale

Hi,

AFAICT, the following snippet could be a good starting point:

"""
#!/bin/sh

set -e

cd tests

for F in * ; do
   if [ -x $F ] && [ "$F" != "help-version" ] && [ "$F" != "hufts" ] ;
   then
      echo "Running $F" &&
      ./$F &&
      echo "Successfully ran $F"
   fi ;
done

"""

Some of the tests emit information to stderr, so the autopkgtest
restrictions need to account for that (or update the snippet above to
handle it).

The "help-version" and the "hufts" test cases were excluded because they
failed out of the box (because I haven't faked some internal variables
such as abs_srcdir).  This can be solves by either running the test
cases via the Makefile (implying we do a full configure first) or
faking/setting them ourselves in the test runner

Thanks,
~Niels

Reply via email to