Update "Commiting Test Data" section to include build bot testing #77

Merged
Alaska merged 8 commits from Alaska/blender-developer-docs:test-updates-guide into main 2024-10-07 14:56:31 +02:00
Showing only changes of commit c4347489a0 - Show all commits

View File

@ -148,7 +148,7 @@ Commit test files to the main branch of the test data repository.
``` bash
cd tests/data
git checkout main
# Make your changes
.. make your changes ..
git commit testfile1 testfile2
```
@ -167,57 +167,44 @@ git push origin main
```
Alaska marked this conversation as resolved Outdated

Should be in the same paragraph as "create a pull request". We can also add a link to the bot https://projects.blender.org/infrastructure/blender-bot/src/branch/main/README.md

Should be in the same paragraph as "create a pull request". We can also add a link to the bot https://projects.blender.org/infrastructure/blender-bot/src/branch/main/README.md
> NOTE: **Running your tests before committing to main**
> NOTE: **Make sure the tests pass before committing to main**
>
> You should run your tests to make sure they pass before commiting them to main.
This can be done [locally](#running-tests), or if you want to test for platform differences,
can be done on the build bot using the
[Blender bot](https://projects.blender.org/infrastructure/blender-bot/src/branch/main/README.md).
This can be done [locally](#running-tests), or using [Blender Bot](https://projects.blender.org/infrastructure/blender-bot/src/branch/main/README.md) from Gitea
to ensure they pass on all platforms.
The steps for testing on the build bot are as follows:
>
> Commit changes to the test data repository to a new branch rather than main.
> Commit changes in the `tests/data` repository to a new branch rather than main.

There should be something like

git checkout main
git merge --ff-only add-x-tests
git push origin main

And then land the PR from the Gita interface.
Maybe would be good to have @weizhen, @Sirgienko, or @LukasStockner have a look. They were working with tests more recently than me.

There should be something like ``` git checkout main git merge --ff-only add-x-tests git push origin main ``` And then land the PR from the Gita interface. Maybe would be good to have @weizhen, @Sirgienko, or @LukasStockner have a look. They were working with tests more recently than me.
``` bash
cd tests/data
git checkout -B add-x-tests
# Make your changes
.. make your changes ..
git commit testfile1 testfile2
Alaska marked this conversation as resolved Outdated

It's more straightforward to merge your PR from gitea, that would also close the PR.

It's more straightforward to merge your PR from gitea, that would also close the PR.
git push origin add-x-tests
```
>
> Commit the `tests/data` submodule change to a branch of the Blender repository,
push the branch to your fork,
[create a pull request](/docs/handbook/contributing/pull_requests/#create-a-pull-request),
and comment on your pull request `@blender-bot build` to get the build bot to test the changes.
`@blender-bot build +gpu` can be used to trigger additional GPU tests (these aren't tested regularly,
so some GPU tests you haven't modified may fail).
> Commit the new `tests/data` submodule hash to your fork of the Blender repository.
``` bash
cd ../..
git checkout -B add-x-tests-blender
git commit tests/data
git push me add-x-tests-blender
# Create the pull request
# Comment `@blender-bot build` on your pull request
```
> [Create a pull request](/docs/handbook/contributing/pull_requests/#create-a-pull-request) from the
link printed in the console,
and comment `@blender-bot build` to get the build bot to test the changes. Alternatively,
`@blender-bot build +gpu` can be used to trigger additional GPU tests (these aren't tested regularly,
so some GPU tests you haven't modified may fail).
>
> If the tests pass, then you can push your changes in the test data
> If the tests pass, then you can push your changes in the `tests/data`
repository to the main branch.
``` bash
cd tests/data
git checkout main
# Use --ff-only to keep the submodule hash unchanged.
git merge --ff-only add-x-tests
git push origin main
```
>
> After pushing the updated tests, update your branch of the Blender repository
to use the updated main `tests/data` submodule, and push your changes to the main
branch of the Blender repository, either through Gitea, or with `git`.
``` bash
cd ../..
git commit tests/data
git push me add-x-tests-blender
# Pushing changes with git
git checkout main
git merge --ff-only add-x-tests-blender
git push origin main
```
> From the Gitea interface, merge the pull request you just created in the Blender repository.