Summary

CHICKEN's tests should not require installing CHICKEN before running

Metadata

Attachments

Description

"make check" doesn't work when CHICKEN isn't installed yet (worse, you may get unpredictable results if there is an older CHICKEN installed in PREFIX). This is annoying and means people can't verify whether their build is sane *before* installing.

Also, in pkgsrc "make check" breaks entirely because its tool wrappers prevent the compiler and linker from reaching into the installation destination directory directly; therefore it won't be able to see chicken.h and libchicken.so in the final location.

Attached is a first attempt at a patch to make the tests work by themselves. It's a hack; the SETUP_PREFIX stuff is all undocumented and nasty, and the deployment tests (rev-test stuff) don't work. If this is ever imported, the Windows batch file should be updated accordingly.

Changes and comments

[2013-10-07 22:50:29 UTC] sjamaan attached standalone-tests.diff (description=#f)

[2014-02-17 08:40:50 UTC] sjamaan changed priority from minor to major

[2014-02-17 08:40:50 UTC] sjamaan changed milestone from someday to 4.9.0

[2014-02-17 08:40:50 UTC] sjamaan wrote:

ok, so let's see if we can make this work for 4.9.0, as apparently it's a prerequisite for getting CHICKEN into OpenBSD's ports tree, and ASau has been complaining about this one for years :)

[2014-03-11 13:24:39 UTC] ckeen attached make-check-without-installation.diff (description=Newer patch that also has deployment tests covered)

[2014-03-11 13:27:12 UTC] ckeen wrote:

I have attached a newer patch that also makes the deployment tests work without having to install chicken.

I somewhat dislike the patch since it punches another hole into the path handling code by overriding all settings for the TARGET_LIB_PATH when an environment variable of the same name is provided.

I do think though that in the future we should make all these path settings overridable by environment variables and properly document them.

With this patch current master runs make check fine after building with a bogus prefix,i.e. pointing to a nonexistant location.

[2014-03-12 19:40:19 UTC] sjamaan attached 0001-Add-a-few-hooks-and-hacks-to-make-tests-work-without.patch (description=Update to work under cygwin; remove the nasty special-casing we do to force the DLL into the current dir, in favor of relying on the OS-native way of loading DLLs from another dir: put the thing in $PATH (yuck!))

[2014-03-13 21:20:31 UTC] sjamaan attached 0001-Add-a-few-hooks-and-hacks-to-make-tests-work-without.2.patch (description=Fixed for mingw-msys (ugh))

[2014-03-15 13:04:04 UTC] sjamaan wrote:

Fixed by 814913e4c33e52e55329a0ba932dcdee21ea2805

[2014-03-15 13:04:04 UTC] sjamaan changed status from new to closed

[2014-03-15 13:04:04 UTC] sjamaan set resolution to fixed