Implement test command monitor#57
Open
okt-osadakov wants to merge 7 commits into
Open
Conversation
767e106 to
76466ce
Compare
ol-andrewr
requested changes
Dec 1, 2024
ol-dmitryiz
suggested changes
Dec 2, 2024
ol-dmitryiz
reviewed
Dec 2, 2024
ol-dmitryiz
reviewed
Dec 2, 2024
Contributor
|
I am not sure commit log is right for the third commit. "Currently we have only log messages and syntax to have script node inside Perhaps you wanted to say that you add support for this new syntax? |
ol-dmitryiz
suggested changes
Dec 2, 2024
ol-dmitryiz
suggested changes
Dec 2, 2024
Handle correctly command node at the end of command_monitor node. Before this change we will have: > monitor_process(): unexpected node name 'command' encountered with the following command_monitor node in package.xml: > <command_monitor> > <command>.../monitor</command> > </command_monitor> Signed-off-by: Oleg Sadakov <Oleg.Sadakov@arknetworks.am>
Add type to command monitor description to support more monitors. For example we can use the same structure to start command monitor as a test in parallel with another tests. Signed-off-by: Oleg Sadakov <Oleg.Sadakov@arknetworks.am>
This patch adds only log messages and syntax to have script node inside command_monitor node from any package.xml, e.g: > <session> > <command_monitor> > <script name="test_monitor"/> > </command_monitor> > ... Signed-off-by: Oleg Sadakov <Oleg.Sadakov@arknetworks.am>
Use tester_cfg to generate full command for test command monitor. Signed-off-by: Oleg Sadakov <Oleg.Sadakov@arknetworks.am>
Implement ability to start test based command monitor. Tester starts this monitor with TE_LOG_ID_UNDEFINED as te_test_id. This is useful to merge log from this monitor inside tests running in parallel. But the default behaviour of TEST_START is to stop the test for this ID. So you have to update your test to take it into account. At the end of related session tester will send SIGUSR1 signal to this monitor. Signed-off-by: Oleg Sadakov <Oleg.Sadakov@arknetworks.am>
Use te_test_name to check that test without te_test_id is a monitor.
Test based command monitor uses TE_LOG_ID_UNDEFINED to add logs from this
monitor inside tests running in parallel. But the default behaviour of
TEST_START is to stop the test for this ID.
But any command monitor has a special name ("tester_monitorX" where X is the
ordinal number of monitor). We can use this name to avoid EXIT_FAILURE for
monitors.
Signed-off-by: Oleg Sadakov <Oleg.Sadakov@arknetworks.am>
Create monitors package to validate command monitors. In fact currently we have two independent types: - TA: to run on test agent; - TEST: to run in parallel with the common tests. This patch contains only couple runs to validate the command monitor behavior with TEST type. Signed-off-by: Oleg Sadakov <Oleg.Sadakov@arknetworks.am>
76466ce to
29addf4
Compare
Contributor
|
Any feedback? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This branch is used to add new feature "test" command monitor. The main idea of this feature is to run a common test in parallel with another tests.
For example we can:
To enable this feature we should add <command_monitor> with <script> to package.xml, e.g:
Testing done:
The second test contains the following log:
This log contains two independent Entity Names (one from test another from monitor) with independent test iteration counters.