Latest Posts

Topic: Boost unit tests

Tibor
Joined: 2009-03-23, 23:24
Posts: 1238
Ranking
One Elder of Players
Location: Slovakia
Posted at: 2019-05-23, 15: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, 15:56
Posts: 2910
Ranking
One Elder of Players
Location: RenderedRect
Posted at: 2019-05-25, 19: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, 18:07
Posts: 422
Ranking
Tribe Member
Location: 0x55555d3a34c0
Posted at: 2019-05-26, 12: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, 15:56
Posts: 2910
Ranking
One Elder of Players
Location: RenderedRect
Posted at: 2019-05-26, 12: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, 12:56

Busy indexing nil values

Top Quote
Tibor
Joined: 2009-03-23, 23:24
Posts: 1238
Ranking
One Elder of Players
Location: Slovakia
Posted at: 2019-05-26, 19:14

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


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

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


Busy indexing nil values

Top Quote
Tibor
Joined: 2009-03-23, 23:24
Posts: 1238
Ranking
One Elder of Players
Location: Slovakia
Posted at: 2019-05-28, 22: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, 15:56
Posts: 2910
Ranking
One Elder of Players
Location: RenderedRect
Posted at: 2019-05-29, 10: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