-
Notifications
You must be signed in to change notification settings - Fork 741
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[repeat harness] rework repeat harness and introduce test case contin…
…uous reboot (#416) * [Repeat harness] rework repeat harness to make it an individual test case Adding with_sequence to test by name infrastructure breaks link_flap test due to nested loop at different level of includes. Move repeat harness to alphabetic location * [continuous reboot] introduce test case continuous reboot
- Loading branch information
Showing
5 changed files
with
44 additions
and
22 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
########################################################################## | ||
# Repeat reboot test case <repeat_count> times # | ||
########################################################################## | ||
|
||
- name: set default value for repeat_count | ||
set_fact: | ||
repeat_count: 3 | ||
when: repeat_count is not defined | ||
|
||
- debug: | ||
msg: "Execute reboot.yml {{ repeat_count }} time(s)" | ||
|
||
- include: reboot.yml | ||
with_sequence: end={{repeat_count}} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,13 @@ | ||
########################################################################## | ||
# Repeat harness is used to repeat a list of tasks, for single test case # | ||
# repeatation, we can use repeat_count in test by testcase name # | ||
# infrastructure. This test case is the template for repeat a list # | ||
# of test cases, or run a test with delay between iterations. etc. # | ||
# Repeat harness is used to repeat a list of tasks, the list of the # | ||
# tasks should be defined in repeat_tasks.yml # | ||
########################################################################## | ||
|
||
- debug: | ||
msg: "===================== Repeating starts ======================" | ||
- name: Default test repeat count | ||
set_fact: repeat_count=3 | ||
when: repeat_count is not defined | ||
|
||
# Add tasks here to be repeated: | ||
# e.g. - include: reboot.yml | ||
- debug: msg="Execute repeat_tasks.yml {{ repeat_count }} time(s)" | ||
|
||
|
||
- debug: | ||
msg: "===================== Repeating ends ======================" | ||
- include: repeat_tasks.yml | ||
with_sequence: end={{repeat_count}} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
########################################################################## | ||
# Repeat task is used to specify a list of tasks to repeat. # | ||
########################################################################## | ||
|
||
- debug: | ||
msg: "===================== Repeating starts ======================" | ||
|
||
# Add tasks here to be repeated: | ||
# e.g. - include: reboot.yml | ||
|
||
|
||
- debug: | ||
msg: "===================== Repeating ends ======================" |
This file contains 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
This file contains 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