On 5 January 2013 00:31, Paweł Tomulik <firstname.lastname@example.org> wrote:
I've faced some bugs in swig that make me unable to progress with
one of my projects and I'm currently working on patches (two of
them are already proposed as pull requests on github).
For one bug (https://sourceforge.net/p/swig/bugs/1297/),
the test cases consist of few %module's, and the resultant
python code is structured such that it contains python modules
within packages and subpackages.
For example, one of my current mini-projects used to replicate the bug
Is there a way to map such mini-project to a test case that could fit to the
swig's testing framework (under Examples/test-suite/.. or in other right
This is a little unusual.
Note that the header files they import are prefixed by the testcase name by convention.There are some %import testcases you could look at, but they use one directory for the inputs which is what we have managed to do up till now. These are the 'MULTI_CPP_TEST_CASES" in common.mk and correlate to:
$ grep -l "%import" *clientdata_prop_b.iimport_nomodule.iimports_a.iimports_b.iimport_stl_b.imod_b.imulti_import_a.ipackageoption_c.itemplate_typedef_import.i
There is also inctest.i which is the only testcase that uses a directory hierarchy like you need:
$ find testdirtestdirtestdir/test.itestdir/subdir1testdir/subdir1/subinc1.itestdir/subdir1/hello.itestdir/subdir1/imports.itestdir/subdir2testdir/subdir2/hello.itestdir/subdir2/imports.itestdir/subdir2/subinc2.i
I suggest we change testdir to have testcase names as the first subdirectory so change testinc to have:
then you can create a new directory named after your testcase under testdir.
BTW, if you additional or non-standard command line arguments for the testcase, these can be added per testcase, see the "Custom tests" in csharp/Makefile and java/Makefile. Probably the same approach can be used in common.mk if targeting all languages.
-- Pawel Tomulik