Embrace testenv-post-start target
Today a test consists of:
- testenv-start
- testenv-test
- testenv-stop
Since testenv-start is a standardised target, with the only ability to modify it being the testenv-start-extra target where add in more containers to be started, we can't otherwise do things without completely overwriting the target. This means we place all test environment specific configuration in the testenv-test target. For example, in the standard NED skeleton we add the device to NSO in the testenv-test target. However, when doing development it is common to run the tests multiple times and we don't have to readd the device itself multiple times.
In TeraStream we have 4 relevant targets:
- start
- configure
- test
- stop
I think we should have the same here, just that we call it testenv-post-start
and it is actually called at the end of testenv-start
, but it is a target that the user is supposed to fill in. We should explain with a comment that testenv-post-start
are for things that need to be done once in a test environment whereas testenv-test
should be written in such a way that it can be run multiple times. It is also encouraged to split up testenv-test
into multiple smaller make targets and call these from testenv-test
.