Opened 8 years ago

Closed 7 years ago

#1057 closed defect (fixed)

CHICKEN's tests should not require installing CHICKEN before running

Reported by: sjamaan Owned by:
Priority: major Milestone: 4.9.0
Component: build system Version: 4.8.x
Keywords: tests Cc:
Estimated difficulty:

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.

Attachments (4)

standalone-tests.diff (4.7 KB) - added by sjamaan 8 years ago.
make-check-without-installation.diff (5.7 KB) - added by Christian Kellermann 7 years ago.
Newer patch that also has deployment tests covered
0001-Add-a-few-hooks-and-hacks-to-make-tests-work-without.patch (6.9 KB) - added by sjamaan 7 years ago.
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!)
0001-Add-a-few-hooks-and-hacks-to-make-tests-work-without.2.patch (8.3 KB) - added by sjamaan 7 years ago.
Fixed for mingw-msys (ugh)

Download all attachments as: .zip

Change History (7)

Changed 8 years ago by sjamaan

Attachment: standalone-tests.diff added

comment:1 Changed 7 years ago by sjamaan

Milestone: someday4.9.0
Priority: minormajor

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 :)

Changed 7 years ago by Christian Kellermann

Newer patch that also has deployment tests covered

comment:2 Changed 7 years ago by Christian Kellermann

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.

Changed 7 years ago by sjamaan

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!)

Changed 7 years ago by sjamaan

Fixed for mingw-msys (ugh)

comment:3 Changed 7 years ago by sjamaan

Resolution: fixed
Status: newclosed

Fixed by 814913e4c33e52e55329a0ba932dcdee21ea2805

Note: See TracTickets for help on using tickets.