Skip to content

Restructure project folders to better accommodate (C++) unit tests #455

@uweseimet

Description

@uweseimet

In order to use googletest for C++ it may make sense to restructure the current folder hierarchy. Instead of having sub-projects like web and raspberrypi inside each of src/ and test/, the sub-projects should be top-level and each contain src/ and test/. So instead of:

src/raspberrypi
test/raspberrypi
...

we would have:

raspberrypi/src
raspberrypi/test
web/src
web/test
...

or maybe better:

c++/src
c++/test
web/src
web/test
...

or maybe that's even better:

c++/src
c++/test
python/src
python/test
...

Further, sub-folders should be created for each resulting binary, at least for rasctl and rascsi, e.g.

c++/src/rascsi
c++/src/rasctl
c++/src/common
...

Or

c++/rascsi/src
c++/rasctl/src
c++/common/src
...

With common containing shared code.

The Makefile rules that assign object files to binaries also have to be changed, because the tests require a main() method of their own, which collides with rascsi::main().

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions