bug-gnulib
[Top][All Lists]
Advanced

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

Re: init.sh features


From: Jim Meyering
Subject: Re: init.sh features
Date: Mon, 05 Apr 2010 21:17:18 +0200

Bruno Haible wrote:
>> I had already converted tests/test-xstrtol.sh.
>> This continues the process with the other test-xstrto*.sh scripts
>
> What are, in summary, the benefits of init.sh? I'm wondering whether
> we might be putting in features here that are not available tests
> written entirely in C.

Hi Bruno,

That is definitely the case.
This could be an argument for wrapping some of the C-only tests in a
simple init.sh-using driver (maybe even automatically).  Any test that
creates a temporary file would benefit.

> As far as I can see, init.sh
>   - allows to use $(...) and similar unportable shell features,
>   - allows to drop $EXEEXT from executable names,
>   - interoperates better with automake's parallel tests mode
>     when tests are skipped,
>   - allows the user to enable verbose output, by setting an environment
>     variable,
>   - provides a library of shell functions.
>
> What else, did I miss?

Related to your item #3, the test is run in a carefully-named subdirectory
(random/safe, via mktemp or portable replacement), which has two benefits:
  - tests run in parallel do not interfere with each other (assuming they
      stay in the auto-cleaned subdir)
  - test writers no longer need to obfuscate temporary file names
      by making them include the PID or the name of the current test.
      That improves readability.




reply via email to

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