Hi Swig enthusiasts,
I've moved onto other projects, but in case anyone at a later date would like to utilize the improved Common Lisp CFFI bindings for SWIG that I developed, I've put them up on git hub.
There are a bunch of tests that I used to develop these in the directory swig/Examples/cffi
I could never figure out how to hook my tests into the SWIG testing/Makefile framework, which is why they aren't included in the official distribution. But perhaps somebody in the future will get some good from these improved CFFI bindings for Swig. I wrote them for Clozure Common Lisp (CCL), but they'll likely work with other Common Lisps by just changing the makefiles.
Jason E. Aten, Ph.D.
On Fri, Apr 1, 2011 at 2:42 PM, William S Fulton <firstname.lastname@example.org> wrote:
jaten@virtub:~/pkg/swig/github/swig-cpp-to-cffi-for-common-lisp-enhancements/swig$ make check-cffi-test-suiteAs SWIG has no runtime example anywherer for cffi, yours would be the first. This module is badly in need of runtime tests and the minimum required is a copy of the 'simple' and 'class' examples, so I suggest you turn your example into the 'simple' example. I don't really like to have different examples for each language module, unless testing a specific language module feature. There isn't a single runtime test and I don't accept many patches without a runtime test these days, so you'd need to add one in. The test-suite is documented quite well here: http://www.swig.org/Doc2.0/Extending.html#Extending_test_suite , but if you have any questions please ask. The top level Makefile is currently missing cffi test-suite and example support too, so that needs adding in too unfortunately.
The good news is, I've got a much improved CFFI module going. But I'm a little stuck now that I'm trying to figure out how to hook in my CFFI module tests to the swig testing machinery.
I read through the docs William mentioned above, but I'm confused about a couple of things. I'm hoping someone can clarify.
First, how do I get my Example/cffi/* tests to run immediately. When I do make-cffi-test-suite, it starts a very long (on my slow box) chain of other tests. Secondly, I've looked through some of the stl.i and stl_vector.i code in the r module to get a feel for what they are doing, but I'm somewhat confused about what I should put in those required files.
Thanks for your help.
checking cffi test-suite
checking testcase abstract_access under cffi
checking testcase abstract_inherit under cffi
checking testcase abstract_inherit_ok under cffi
checking testcase abstract_signature under cffi
C-c C-cmake: *** wait: No child processes. Stop.
<< Ctrl-c pressed >> because these are not the desired CFFI tests from Examples/cffi/check.list