[sword-devel] linking / testsuite

Troy A. Griffitts scribe at crosswire.org
Tue Apr 21 18:52:25 MST 2009

Dima, see below...

Brian and DM,

I've made some recent updates around link code.

Can someone please check current SVN and if things still fail, update 
our testsuite to add a simple failure case so I can have a look, and so 
we don't break things unnoticed in the future?

I would really like to get people in the habit of updating our 
regression suite.  I've made it as easy as possible.  Just to explain 

We don't use the cppunit tests.  They were added with good intentions by 
another developer, but you know me: I hate dependencies, and couldn't 
really justify adding a cppunit dependency.  Plus I don't really like 
junit or cppunit where I have to hardcode all my expected output into 
the test program-- when actually we already have a bunch of useful tools 
and examples which can be run already and their output checked for validity.

So, to briefly describe, tests are located in:


This folder contains simple .sh files which perform any operations they 
desire to exercise the library functionality.  Most of the scripts run 
some executable in the parent sword/tests directory, passing diverse 

each .sh file is accompanied with a .good file.
These are very simple redirected > output files from the .sh files when 
they are successful.  To produce, simply:

mytest.sh > mytest.good

(of course, run this when mytest.sh is running successfully; otherwise 
edit mytest.good and change to what the desired output should be, and 
then fix the library problem! :) )

This makes creating a test really easy.  Just:

1) create a simple .cpp file and do all the crazy stuff you want, 
sending output to std::cout.
2) Then create a corresponding .sh file in the testsuite folder to run 
your executable (as many times as you want with various parameters, if 
you'd like).
3) run your .sh file and redirect output to a .good file.

You can include any supporting files you need in here too (.imp, .xml, 
etc.) and write any data you need during execution of your test to 

The runall.sh script is the master testsuite runner and will execute all 
tests that it finds in this directory.  I usually run this before 
committing, so if you want to be sure I don't break behaviour you 
expect, ADD A TEST :)

:)  The current tests are good examples and also testimony to how much 
more we need in there.


Yeah, yeah, they only run on machines with sh.  I can live with that.

:)  Thanks for your feedback and help!  I hope we can get this link 
problem solved if it still exists.


DM Smith wrote:
> On Apr 20, 2009, at 3:25 PM, Brian J. Dumont wrote:
>> Troy A. Griffitts wrote:
>>> This weekend, as I was ready to release our RC candidate with a few
>>> very minor patches ...
>> Just wanted to check ... last week I gave a bug report for osis2mod and
>> linked verses.  I haven't heard of any patches, and the bug is a
>> roadblock for a few modules that I'm working on.  Do we think that the
>> fix will make it into 1.6.0?
> Brian,
> I'm working on it. But haven't fixed it yet.
> DM
> _______________________________________________
> 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