[pgrouting-dev] pgRouting 2.0 Update
Stephen Woodbridge
woodbri at swoodbridge.com
Sun Mar 17 10:02:12 PDT 2013
Hi all,
The last couple of days has been spent on building a simple test
infrastructure and a few trivial test cases. At the top level is a
script test-runner.pl that at the moment does not take any arguments. It
runs all the test configured tests and at the moment just dumps the
results structure of the test. This can be prettied up later. It also
assumes that you have installed the libraries as it tests using the
installed postgresql. This probably needs to be made smarter so we can
test out of the build tree. I'll need to think about that.
I already found a bug that crashes the server when building the tests. I
think this might already be in the tracking system, but if you pass a
negative cost to dijkstra or astar it will crash the server.
Basically each .../test/ directory should include one test.conf file
that is a perl script fragment that defines what data files to load and
what tests to run. I have built in some mechanisms to allow test and
data to be pg version and postgis version specific, but I'm not using
that yet.
core/trsp/test/test-any-00.data is a sql plain text dump that will load
and needed data for a set of tests. You can specify multiple files to
load, but as a group they need to have unique names.
core/trsp/test/test-any-00.test is a sql command to be run. It will get
run as:
psql ... -A -t -q -f file.test dbname > tmpfile
diff file.rest tmpfile
Then if there is a difference then an test failure is reported.
At some point I would be happy if someone wants to replace this with
some better infrastructure for testing, but I needed some to get things
started.
I also created a top level doc directory with a README.rst Which is the
start of a developers guide to the system. I will add to this as I make
changes and think of things.
Testing and doc still need to be worked into the build system along with
other stuff.
-Steve
More information about the pgrouting-dev
mailing list