[Top][All Lists]

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

Re: [RFA] Validate configure script syntax

From: Paolo Bonzini
Subject: Re: [RFA] Validate configure script syntax
Date: Thu, 4 Dec 2003 14:24:28 +0100

> I have avoided AS_REQUIRE on purpose in the case of Autotest: the
> point is that (when someone has some spare time) we can extract a
> small test script focusing on the exact failure.  This is what pleases
> people having test suites a` la Automake.  We should be able to
> provide this to them.  I don't think AS_REQUIRE fits in the picture.

Ok.  I'll document it when I come to documenting AS_REQUIRE. :-)

Ahem, does not this go against using shell functions in Autotest? >:->

> The coding style leave the closing ]) at col 0 for long macros.


> What is the impact on the duration of the test suite?

The slowdown is not much, but both the speed and the testsuite size would be
improved by adding a separate AT_CHECK_CONFIGURE_SYNTAX macro and using it
specially for tests that do not run configure (if any).  Configure scripts
are run without exiting earlier, so given how shell scripts are parsed, I
don't think it is so frequent that sh -n catches more errors than an actual
run.  And configure runs config.status so unless it exits early (does it?)
there's no point in checking config.status syntax after it has run.  So I
put this in the "to be thought more on" category.

I wanted to commit only the part to extract AT_CHECK_SHELL_SYNTAX (without
AS_REQUIRE) and AT_CHECK_PERL_SYNTAX out of, but is down, so I'll ask another question in the
meanwhile... is there anything wrong in this alternative detection method?

    if test x"`echo echo yes | sh -n 2>&1`" = x; then
      echo ok
      echo bad;


reply via email to

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