[sword-devel] cmake python

Greg Hellings greg.hellings at gmail.com
Tue Dec 18 08:47:27 MST 2012


If you configure with SWORD_BUILD_TESTS="Yes" CMake will configure the tests.

You can then issue 'make tests' from the top build directory and it
will build _and_ attempt to run all the tests. Now it fails for me on
the first one because of a missing directory "../../osistest". I have
a feeling this is because I force the build to be out-of-stream? I
don't really know, as I have never run our test suite. But if you want
to compile and run the tests manually, all you need to do is specify
'make tests' and they'll be built in the tests/ subdirectory of your
build dir.

--Greg

On Mon, Dec 17, 2012 at 8:56 PM,  <cricketc at gmail.com> wrote:
> On Mon, Dec 17, 2012 at 9:40 PM,  <cricketc at gmail.com> wrote:
>> On Mon, Dec 17, 2012 at 9:17 AM, Greg Hellings <greg.hellings at gmail.com> wrote:
>>> What does it seem to be doing improperly? That's a very broad
>>> statement. I pretty much don't build the tests because they aren't
>>> really kept up with and are intended to be a thing for people actively
>>> developing on the engine, not for packagers, users, or client app
>>> writers - which is the main hat I wear.
>>
>> I just don't see the tests being compiled by cmake. With the old
>> system, in the tests directory, the tests like casttest, ciphertest,
>> keytest, ... are automatically compiled, so the executables are right
>> there ready to run when  code is changed. I don't see the test
>> executables being created by cmake.
>
> Here's a small diff:
>  FOREACH(TEST ${test_PROGRAMS})
> -       ADD_EXECUTABLE(${TEST} EXCLUDE_FROM_ALL ${TEST}.cpp)
> +       ADD_EXECUTABLE(${TEST} ${TEST}.cpp)
>         IF(BUILDING_SHARED)
>
> Not sure what the "EXCLUDE_FROM_ALL" was for, but if I take it out, at
> least some of the test executables get built. (By the way, I'm not too
> worried about the tests being run automatically, although it'd be nice
> to be able to do that.) If the test binaries get created, and the .sh
> and .good files from tests/testsuite get copied into  the build
> directory, then the tests can be run as needed (just as shell
> scripts).
>
> -Ben
>
> _______________________________________________
> sword-devel mailing list: sword-devel at crosswire.org
> http://www.crosswire.org/mailman/listinfo/sword-devel
> Instructions to unsubscribe/change your settings at above page



More information about the sword-devel mailing list