unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
* test: (gnu) tar(1) portability
@ 2014-01-11 10:46 Tomi Ollila
  2014-01-11 16:04 ` David Bremner
  0 siblings, 1 reply; 3+ messages in thread
From: Tomi Ollila @ 2014-01-11 10:46 UTC (permalink / raw)
  To: notmuch

Hi

Currently performance-test requires GNU tar and the uprgrade test
in progress will (in it's current form) require it too.

From portability point of view these tests will work only on Linux
by default -- BSD/Mac OS X have libarchive based tar(1) and other
systems something less capable (no -z option, for example).

From the test point of view we can expect people to install GNU tar
(somewhere) in for their systems but should we provide less "intrusive"
way for having the GNU tar available.

Options:

1) Do nothing, and expect testers to have GNU tar in PATH available
   before any other tar. For example /usr/local/bin/tar could be GNU tar
   and that is put before /bin:/usr/bin in path.

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 ...)

3) Check whether 'gtar' is in system and use that. if not use tar:

   # opportunistically check whether 'gtar' is in system and use that if it is
   if hash gtar >/dev/null
   then TAR=gtar
   else TAR=tar
   fi

   and then replate tar with ${TAR} ($ & {} to emphasize the variable usage)
   in the test code.

   Interestingly Fedora 20 installs both /usr/bin/gtar & /usr/bin/tar.
   In one wheezy system I saw only tar. I tried to JFGI 'gnu tar installation'
   but I could not find references to 'gtar' there.

If installing gtar is widespread I'd use option 3. If not, option 2.
It may be that we end up using option 1 ;/

Tomi

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-01-19 13:58 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-01-11 10:46 test: (gnu) tar(1) portability Tomi Ollila
2014-01-11 16:04 ` David Bremner
2014-01-19 13:58   ` Tomi Ollila

Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).