autoconf
[Top][All Lists]
Advanced

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

using something like _AS_DETECT_REQUIRED in coreutils tests


From: Jim Meyering
Subject: using something like _AS_DETECT_REQUIRED in coreutils tests
Date: Fri, 02 Nov 2007 12:06:20 +0100

Hi,

I wrote this regarding a coreutils test release:

    I really want to make a test release soon, but there are some minor 
problems:

      1 bootstrap failure (minor)
      2 "make check" fails on solaris due to use of /bin/sh vs. test-lib.sh
        and my new policy that using $(cmd) is now fair game in test scripts.
        Working around Solaris' ancient /bin/sh will require something like
        the re-exec-self-with-decent-shell trick used in configure.
        Just need to write it.  This isn't a big deal: the work-around is
        to run this:

          find tests -type f|xargs perl -pi -e 's,^\#! ?/bin/sh$,#!/bin/ksh,'

    A patch to fix #2 properly would be most welcome,
    since I am not inclined to do it.  FYI, I feel about this the same
    way I feel about uglifying C code to make it compile absolutely
    everywhere.  We have to draw the line, and I want shell functions and
    $(cmd) (not `cmd`) notation in scripts.  At worst, don't run the tests.
    If you're interested, autoconf's _AS_DETECT_REQUIRED macro looks
    promising.  It might be able to generate code to be used in coreutils'
    tests/test-lib.sh that would re-exec a usable shell, when necessary.

Now that I said I'm not inclined, I'll at least ask for ideas :-)

Do any of you know off hand how best to do this?
Autoconf already has a lot of code to detect and work around the
idiosyncrasies of many shells, and I don't want to maintain such
code separately from autoconf.  So can you see a way to get the
required bourne shell code from autoconf into coreutils' test-lib.sh

Yes, it looks like it'd involve undocumented macros, but for tests,
that doesn't seem prohibitive.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]