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

Re: Running tests at build time?



Raphael Geissert <geissert@debian.org> writes:
> Russ Allbery wrote:

>> I don't really mind writing shell script, but since the rest of Lintian
>> is written in Perl, I was wondering if we should build a Perl
>> infrastructure to do this, use LWP::Simple to do the file downloads
>> instead of wget, and start building some methods to share common code.
>> Currently, we have a few written in Perl and a few written in shell.

> I prefer to write scripts like refresh-debhelper-data that involve a lot
> of file manipulation in shell. The other scripts in shell could easily
> be rewritten in perl (most already do most of their job by calling
> perl).

I don't really care that much one way or the other, so don't want to
really push anything, but I do think that we won't want to maintain two
separate libraries of helper functions.  So we'll have to figure out how
to handle that.  It may be that the data fetching and caching is most of
the common code and that the remaining parsing isn't that exciting.

Looking at refresh-debhelper-data, I'm guessing that the specific bits
that you're thinking of are the parts to generate the maint_commands and
miscDepends_commands?

BTW, now that miscDepends_commands includes dh_installdocs, I wonder if we
should bother.  How many packages really use debhelper without calling
dh_installdocs?  (Originally, it wasn't included, so the exclusion had
more effect.)

> My only concern with LWP::Simple is the data fetching and caching part.

Downloading and writing a file to disk is fairly straightforward, although
the error messages are bad if something goes wrong.

>> I wrote refresh-ftp-master-tags in Perl since I didn't feel like doing
>> the parsing in shell.

> (and you could have used a yaml parser while at it ;)

I thought about it, but they seem to be relatively rare things to have
around, and I wasn't sure I wanted to add the dependency on another Perl
module for what's a really incredibly simple bit of YAML parsing.  But I
did think about it for a while.  :)

-- 
Russ Allbery (rra@debian.org)               <http://www.eyrie.org/~eagle/>


Reply to: