Commit graph

7 commits

Author SHA1 Message Date
Dan Nicholson
31a9f900e1 check: Test --define-variable corner cases 2012-09-29 09:09:30 -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
LRN
d415d91713 Fix test --define-variable invocation to avoid MSYS path mangling
Otherwise tests won't pass when running in MSYS.
2012-05-18 09:14:08 -07:00
Tollef Fog Heen
3954a7ee3e 2008-03-23 Tollef Fog Heen <tfheen@err.no>
* check/check-cflags, check/check-define-variable,
	check/check-includedir, check/check-libs,
	check/check-libs-private, check/check-requires-private: Replace
	the crazy -d ~root check with a more proper way to just make sure
	we are running under a POSIX shell.  Thanks to Kjetil Torgrim
	Homme for the tip about using getconf PATH.
2008-03-23 21:07:39 +01:00
Tollef Fog Heen
145dba778d Add solaris workaround for tests
/bin/sh on solaris isn't POSIX compliant, so we just exec a POSIX
shell on Solaris.
2005-08-22 10:41:08 +00:00
Arch Librarian
96d4dc19c7 2005-03-29 Tollef Fog Heen <tfheen@err.no>
Author: tfheen
Date: 2005-03-29 07:09:37 GMT
2005-03-29  Tollef Fog Heen  <tfheen@err.no>

        * check/check-cflags, check/check-define-variable,
        check/check-libs, check/common, check/Makefile.am,
        check/simple.pc:  Add simple test framework and begin writing
        tests.

        * Makefile.am, configure.in: Make in check/ as well.
2005-07-14 13:06:38 +00:00