using something like _AS_DETECT_REQUIRED in coreutils tests

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

 



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.


_______________________________________________
Autoconf mailing list
Autoconf@xxxxxxx
http://lists.gnu.org/mailman/listinfo/autoconf

[Index of Archives]     [GCC Help]     [Kernel Discussion]     [RPM Discussion]     [Red Hat Development]     [Yosemite News]     [Linux USB]     [Samba]

  Powered by Linux