Actions
Task #2795
closedIntroduce unit testing
Start date:
Due date:
% Done:
100%
Estimated time:
3.00 h
Description
Introduce unit testing infrastructure using Boost.Test.
Updated by Junxiao Shi over 10 years ago
- Blocks Feature #2796: Tests for Ping and PingServer added
Updated by Junxiao Shi over 10 years ago
- % Done changed from 0 to 10
http://gerrit.named-data.net/2052
I gave this a shot but there are major difficulties with wscript:
tools/foocompiles into one or more executables, not objects. This means it containsmainfunction(s).tools/foodirectory structure is only understood bytools/foo/wscript.tools/foocan declare extra dependencies.
tests/wscript needs to:
- Avoid linking the
mainfunction(s) intools/foo, or skip the file(s) that contains amainfunction. - Understand the directory structure inside
tools/foo. - Make the unit testing binary depend on the extra dependencies declared in
tools/foo.
I'm unsure how to achieve those.
Updated by Alex Afanasyev over 10 years ago
I'm a little bit confused.
Is the following logic correct:
- a single
unit-testsbinary file - test cases are
.cppfiles placed undertests/foo,tests/bar, etc. - there could be other
.cppfiles placed intests/foo - a single
unit-testsprogram is linked to all.ofiles from all tools (with exception of files containingmainfunction) and all relevant dependencies
Updated by Junxiao Shi over 10 years ago
Answer to note-4:
I haven't decided whether the unit tests are in a single binary, or one binary per tool; whichever way is easier shall be the way to go.
The other three points are accurate.
Updated by Alex Afanasyev over 10 years ago
- Assignee changed from Junxiao Shi to Alex Afanasyev
Updated by Alex Afanasyev over 10 years ago
- Assignee changed from Alex Afanasyev to Junxiao Shi
- % Done changed from 10 to 40
Updated by Alex Afanasyev over 10 years ago
Updated by Junxiao Shi over 10 years ago
- Status changed from In Progress to Code review
- % Done changed from 40 to 100
Updated by Junxiao Shi over 10 years ago
- Blocks Feature #2670: wscript: build a subset of tools added
Updated by Junxiao Shi over 10 years ago
- Status changed from Code review to In Progress
- % Done changed from 100 to 70
I also need to enable unit testing in Jenkins.
Updated by Junxiao Shi over 10 years ago
- Status changed from In Progress to Code review
- % Done changed from 70 to 100
Updated by Junxiao Shi over 10 years ago
- Status changed from Code review to Closed
Actions