Skip to content

Commit 2f07634

Browse files
committed
Add instructions for testsuite-test-pr
1 parent 9352ff2 commit 2f07634

File tree

1 file changed

+41
-3
lines changed

1 file changed

+41
-3
lines changed

docs/Development/Policies-and-Procedures/Code-Contribution.md

Lines changed: 41 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -145,21 +145,59 @@ cherry-pick-to: 18
145145

146146
Each branch must be on a separate line and don't put anything else in the comment. When all the PR tests and checks have passed, an Asterisk Core developer will trigger the cherry-pick test process which will look for that comment. If the commit can't be cherry-picked cleanly to the branches you indicated or the tests fail, none of the commits will be merged. This is why it's important for you to make sure your commit cherry-picks cleanly before submitting the first pull request.
147147

148-
If you don't need your PR automatically cherry-picked, please add a comment stating `cherry-pick-to: none`. This saves us not having to ask if you want it cherry-picked.
148+
If you don't need your PR automatically cherry-picked, please add a comment stating `cherry-pick-to: none`. This saves us not having to ask if you want it cherry-picked and suppresses the automated reminder.
149+
150+
You have a minimum of two minutes from the time the PR is submitted before the automation will remind you to add either branch-specific entries or a `cherry-pick-to: none` entry. In reality, that check is done when the submit tests are completed so you probably have at least 30 minutes.
149151

150152
/// note
151153
You can also add comments to a PR from the command line with `gh pr comment`. See the man page for more info.
152154
///
153155

154-
155156
/// warning
156-
Don't add the cherry-pick-to lines to the commit message or the PR description. They're only searched for in PR comments.
157+
Don't add the `cherry-pick-to` lines to the commit message or the PR description. They're only searched for in PR comments.
157158
///
158159

159160
/// warning
160161
**If you change your mind and don't want your PR automatically cherry-picked, edit the comment and replace the "cherry-pick-to" lines with a single `cherry-pick-to: none` line** Don't use formatting or other means to say "nevermind". The automation might not understand.
161162
///
162163

164+
#### Test against a Testsuite PR
165+
166+
If you've created a corresponding pull request in the Asterisk Testsuite, you can tell the automation to test your Asterisk PR using your Testsuite PR by adding a comment to the Asterisk PR with `testsuite-test-pr: <testsuite pr number>` as the content. For example:
167+
168+
```text
169+
testsuite-test-pr: 400
170+
```
171+
172+
That entry would tell the automation to checkout the testsuite PR 400 before running the testsuite tests for the Asterisk PR. You can add the `testsuite-test-pr` entry to the same comment you created for the `cherry-pick-to` entries if you prefer.
173+
174+
/// warning
175+
As with the `cherry-pick-to` entries, don't add the `testsuite-test-pr` entry to the commit message or the PR description. They're only searched for in PR comments.
176+
///
177+
178+
You only have about two minutes from the time the PR is submitted before the automation actually starts the tests so you'll need to add the comment rather quickly. As noted above, you can easily add comments from the command line using `gh pr comment`. If you don't make it in time or you haven't written the test yet, you can always add the comment then ping someone on the Asterisk team to recheck the PR.
179+
180+
/// note
181+
Due to time constraints, only tests in the tests/channels, tests/fax, tests/extra_gates and tests/rest_api directories are run for pull request testing. If a test created by your Testsuite PR isn't in one of those directories, create a relative symlink to it in the tests/extra_gates directory and update the tests/extra_gates/tests.yml file to include it. For example...
182+
183+
```
184+
tests/apps/a_new_test
185+
tests/extra_gates/a_new_test -> ../apps/a_new_test
186+
```
187+
Then, assuming `a_new_test` is a single test, add the following to tests/extra_tests/tests.yml:
188+
189+
```
190+
- test: 'a_new_test'
191+
```
192+
193+
Of course, if `a_new_test` is a directory of tests, you'd add:
194+
195+
```
196+
- dir: 'a_new_test'
197+
```
198+
199+
///
200+
163201
## Pull Request Review Process
164202

165203
As with Gerrit reviews, a new PR triggers a set of tests and checks. If you browse to your PR and scroll to the bottom, you'll see the status of those checks listed. There are some differences to Gerrit however.

0 commit comments

Comments
 (0)