test: (gnu) tar(1) portability

Tomi Ollila tomi.ollila at iki.fi
Sun Jan 19 05:58:29 PST 2014


On Sat, Jan 11 2014, David Bremner <david at tethera.net> wrote:

> Tomi Ollila <tomi.ollila at iki.fi> writes:
>>
>> 2) Change calls to 'tar' to format ${GNU_TAR:-tar} so testers can set 
>>    environment variable GNU_TAR to the name/path of gnu tar when running
>>    tests (like GNU_TAR=/usr/local/bin/gtar make test or GNU_TAR=gtar ...)
>
> I don't really see any downside to this option; there's only a few calls
> to tar to replace.  Of course we could bikeshed about whether to write 
>
> TAR=${GNU_TAR:-tar}
> ...
>
> ${TAR} --frub --blah 
>
> instead of testing GNU_TAR everywhere.

I also thought of this option, exactly in the same format, too.. 

>
> But, shrug...

Yes... 

and this leads to probably more problematic issue: Mac OS X has
bash version 3 -- which cannot be used to run test scripts. For
that we'd also need a variabe (and some test script trickiness).

This bash issue is easier to solve by tuning the PATH instead of
introducing another variable (or check for 'bash4' existence (ehhe;))
There for we could (that's probably me, then ;/) just document that
in test/README Prerequisites section..

>
> d

Tomi



More information about the notmuch mailing list