Re: Running tests at build time?
Raphael Geissert <geissert@debian.org> writes:
> Yes, I've been thinking about that too. So far, the easiest solution I've
> been thinking about is by using makefiles. Something along these lines:
[snip makefile example]
> Then the refresh-* scripts would only need to read their data from
> $DATA_DIR. `make update` would update the files once, `make update
> FORCE=foo` would force it check if there are newer mirror files.
> If a refresh-* script needs more info all they need to do is call `make
> fetch/path/to/file/in/mirror` and then read it from $DATA_DIR
Yeah, that would work, but don't you think we'll end up with some
duplicate parsing code as well? For example, I suspect that we'll have
several refresh scripts that need to generate a sorted list of all
packages containing files matching some regex.
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 wrote
refresh-ftp-master-tags in Perl since I didn't feel like doing the parsing
in shell.
Converting the existing scripts to Perl might be kind of annoying, though.
--
Russ Allbery (rra@debian.org) <http://www.eyrie.org/~eagle/>
Reply to: