Commit graph

6 commits

Author SHA1 Message Date
Dan Nicholson
9cd35c624f Enforce that only the first --atleast/exact/max-version option honored
This provides the user with output matching the behavior of the code.
When multiple --atleast/exact/max-version options are supplied, only the
first will be honored.
2012-12-11 11:59:40 -08:00
Dan Nicholson
548ba5b223 Imply --exists when --atleast/exact/max-version passed
The --atleast/exact/max-version help description implied that it would
return as --exists does. However, this would only occur if no other
output options were set.

Freedesktop #54389 (https://bugs.freedesktop.org/show_bug.cgi?id=54389)
2012-12-11 11:59:40 -08:00
Dan Nicholson
42f30aee2e check: Test pkg-config version
Test that --version prints the current version and
--atleast-pkgconfig-version validates it.
2012-10-02 05:51:22 -07:00
Dan Nicholson
397d414a6a check: Pass args to test function instead of setting in variable
The run_test shell function was running pkg-config with arguments stored
in an environment variable. This has problems when trying to pass shell
special characters with the proper escaping. Instead, pass the arguments
to the test where they can maintain correct formatting through use of
the special variable "$@".
2012-09-29 08:50:57 -07:00
Dan Nicholson
305913a6b1 Handle POSIX shell for tests in configure and Makefile
Although the trick of finding a POSIX shell in the system PATH works
fine most of the time, it has some drawbacks.

* The commands must be copied into every test script.
* The scripts are always forced to re-execute themselves.
* There's no guarantee the sh found in `getconf PATH` is a POSIX shell
  and there's no way to override it.

Move the handling of this shell to configure where we can detect it
once. This gives preference to bash and ksh since they're typically
POSIX compatible. It also uses the current PATH with the getconf PATH at
the end which should allow things to work on platforms where getconf
might not be available like mingw/msys.

By specifying the shell in TESTS_ENVIRONMENT, automake will run each
script with this shell and we can drop the re-exec dance.
2012-08-19 08:03:00 -07:00
Dan Nicholson
a83a14c291 Unify handling of operator and command line option version checking
The code for --exact/atleast/max-version was taking a different path
than the handling of operators like =/>=/<=. Make the long option
versions override the operators and take place during the standard
package checking stage. This also means that --print-errors is
respected.

Fixes Freedesktop #8653
2012-05-10 05:51:35 -07:00