lua-users home
lua-l archive

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

There are only very few issues with OS X (now macOS from 10.12+) and the
test suite, some of which I detailed in a previous post a few years ago.
I thought I would do an update on the issues for those using OS X/macOS.

In the 'attrib.lua' file on line 240 there is a comment that says the
variable 'p' should be redefined to "_" under OS X. If this is done then the
dynamic library loader will not find the requested functions, at least under
10.11.6+, older versions may still require the leading underscore.

Also, on line 246, if the "" library is not present the error check
for non-existant libraries must be changed from "absent" to "open".

Related to the library issue in 'attrib.lua' is the makefile in the 'libs'
directory. It needs to have "-undefined dynamic_lookup" appended to the end
of the CFLAGS line, otherwise the linker will generate a bunch of unknown
symbol errors and won't create the test libraries. This is required for
those versions of OS X that are using the 'clang' compiler.

In 'main.lua' at line 233 there is a check that requires the readline
library to echo the prompt when stdout is redirected. Under OS X this echo
does not occur so the test will always fail. I simply commented out this
test as it is not critical that it passes.

In 'files.lua' there is a test that tries an invalid seek on STDIN, however,
under OS X this seek does not fail so I have simply commented out the test.

Also in 'files.lua' at line 643 there is a test for killing a process under
a subshell, in OS X the kill test is changed to "signal, 1" from "exit".

The entire full test suite works for me under OS X 10.11.6 with the six
small tweaks I have detailed above. I have attached a patch file to this
post to make the detailed changes for anyone running OS X (now macOS).

Note the specific issue with the dynamic libraries may require the leading
underscore for older versions of OS X, and the change to the Makefile for
the testing libraries expects the 'clang' compiler to be used.

Hopefully this info can be of assistance to anyone else using OS X/macOS
who would like to run the full and complete test suite.


Attachment: tests.patch
Description: Binary data