Latest Posts

Topic: Boost unit tests

Tibor

Topic Opener
Joined: 2009-03-23, 22:24
Posts: 1377
Ranking
One Elder of Players
Location: Slovakia
Posted at: 2019-05-23, 14:45

Hi,

I am investigating unittests stuff in widelands. I found src/economy/tests directory, looking into this but I would like to hear some more info. F.e. how are these test called. I know they are executed during compilation...

Or can they be compiled and run independently. I have experiences with python's unittests....


Top Quote
GunChleoc
Avatar
Joined: 2013-10-07, 14:56
Posts: 3317
Ranking
One Elder of Players
Location: RenderedRect
Posted at: 2019-05-25, 18:54

They are executed during compilation - it's the 4 tests that run at the end before it starts linking the main executables. I have never written one of those, so I can't give you more information without doing some research.


Busy indexing nil values

Top Quote
Nordfriese
Avatar
Joined: 2017-01-17, 17:07
Posts: 2006
OS: Debian Testing
Version: Latest master
Ranking
One Elder of Players
Location: 0x55555d3a34c0
Posted at: 2019-05-26, 11:52

Are those tests needed for anything? I have never seen one of them fail and they only take up precious compile time. It would be nice to be able to disable building/linking/running them with a compile switch…


Top Quote
GunChleoc
Avatar
Joined: 2013-10-07, 14:56
Posts: 3317
Ranking
One Elder of Players
Location: RenderedRect
Posted at: 2019-05-26, 11:55

I have seen them fail and save our butts, especially the economy one that is taking so annoyingly long to link.

I would not be against a compile switch though, because Travis will run them for us and fail.

Edited: 2019-05-26, 11:56

Busy indexing nil values

Top Quote
Tibor

Topic Opener
Joined: 2009-03-23, 22:24
Posts: 1377
Ranking
One Elder of Players
Location: Slovakia
Posted at: 2019-05-26, 18:14

I see nobody has specific knowledge about them....:(


Top Quote
GunChleoc
Avatar
Joined: 2013-10-07, 14:56
Posts: 3317
Ranking
One Elder of Players
Location: RenderedRect
Posted at: 2019-05-27, 15:32

No, sorry. You could try catching SirVer by PM, he might know more.


Busy indexing nil values

Top Quote
Tibor

Topic Opener
Joined: 2009-03-23, 22:24
Posts: 1377
Ranking
One Elder of Players
Location: Slovakia
Posted at: 2019-05-28, 21:08

OK, I moved forward and now there are some AI tests (in my new branch) - with very tiny coverage of course...


Top Quote
GunChleoc
Avatar
Joined: 2013-10-07, 14:56
Posts: 3317
Ranking
One Elder of Players
Location: RenderedRect
Posted at: 2019-05-29, 09:48

Excellent, you are now our resident expert on boost tests face-smile.png

Nordfriese wrote:

Are those tests needed for anything? I have never seen one of them fail and they only take up precious compile time. It would be nice to be able to disable building/linking/running them with a compile switch…

I have created a bug for this: https://bugs.launchpad.net/widelands/+bug/1830868


Busy indexing nil values

Top Quote