[Kmymoney-devel] CSV Importer Plugin
aga
aganderson at ukonline.co.uk
Tue Feb 23 23:25:24 CET 2010
On Tuesday 23 Feb 2010 11:19:28 Cristian Oneţ wrote:
<snip>
> >> > Just thinking ahead slightly, so far I've been working on a
> >> > free-standing version so as to get a simple executable and not mess
> >> > things up in the process. What I'm unclear on is integrating back
> >> > into KMM.
> >> >
> >> > Is it something like 'make test' and then run as normal, or what?
> >>
> >> To run the tests, you have to enable the tests in cmake or ccmake.
> >> Then, you make and make install, as usual, and finally you run make test
> >
> > I've got my own unit tests working and am moving back to KMM.
> >
> > Sorry about this, but
> > aga at eve2:~/bin/kmymoney-3.96.0/build> make test
> > Running tests...
> > Start processing tests
> > Test project /home/aga/bin/kmymoney-3.96.0/build
> > No tests were found!!!
> >
> > I've googled and nabbled but haven't found how to *enable* the tests in
> > KMM, although there was a mention of it in a CMakeLists.txt.
>
> Run ccmake path_to_source look for KDE4_BUILD_TESTS and set it to ON
> or just run cmake with -D option to define the same value.
>
> Regards,
> Cristian
Sorry, but I'm back again, and a bit stuck. I got the tests to run OK, except
mine. After running the ccmake to enable testing, when I run make with my
test included, it fails at
"
Linking CXX executable kmymoneytest
CMakeFiles/kmymoneytest.dir/plugins/csvimport/csvdatetest.o: In function
`CsvDateTest::testDateConv()':
/home/aga/bin/kmymoney-3.96.0/kmymoney/plugins/csvimport/csvdatetest.cpp:59:
undefined reference to `CnvDate::CnvDate()'
/home/aga/bin/kmymoney-3.96.0/kmymoney/plugins/csvimport/csvdatetest.cpp:61:
undefined reference to `CnvDate::convDate(QStri
ng, QString*)'
/home/aga/bin/kmymoney-3.96.0/kmymoney/plugins/csvimport/csvdatetest.cpp:62:
undefined reference to `CnvDate::convDate(QString, QString*)'
etc..."
The background is that the part of the logic I want to test is date validity.
Initially, this was just a part of the main GUI/processing logic. When I
started on unit test, I decided to split off the date testing into a separate
class and module - ConvDate - which was used by the main program and also by
the unit test. Before the make test is run, the make runs successfully and
KMM launches correctly. After make test, when I run make again, I get the
above linking problem, and the unit test - csvdatetest.cpp - doesn't seem to
find ConvDate.
I've done a lot of tinkering, but can't get past these undefined errors. I've
no doubt I'm doing something stupid, or not doing something that should be
obvious. I've built the unit test in the same folder in plugins, so suspect
that mymoneytest doesn't know where to look for the missing module.
Should my test be there under plugins, or with the other tests? But then.....
Help, please!
Allan again
More information about the KMyMoney-devel
mailing list