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 b45503fe25 - Show all commits

View File

@ -144,45 +144,73 @@ Ensure submodules are up to date.
make update make update
``` ```
Commit new or modified test files to a new branch of the test data repository. Commit test files to the main branch of the test data repository.
``` bash ``` bash
cd tests/data cd tests/data
git checkout main git checkout main
# Make your changes
git commit testfile1 testfile2
```
Commit changes in the Blender repository, including the updated `tests/data` submodule hash.
``` bash
cd ../..
git commit sourcefile1 sourcefile2 tests/data
```
Check everything is ok, and push to both repositories.
``` bash
cd tests/data
git push origin main
cd ../..
git push origin main
```
> NOTE: **Running your tests 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).
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.
``` bash
cd tests/data
git checkout -B add-x-tests git checkout -B add-x-tests
# make your changes # Make your changes
git commit testfile1 testfile2 git commit testfile1 testfile2
git push origin add-x-tests git push origin add-x-tests
``` ```
>
Commit changes to your fork of the Blender repository, including the updated > Commit the `tests/data` submodule change to a branch of the Blender repository,
`tests/data` submodule, and then push the branch to your fork,
[create a pull request](/docs/handbook/contributing/pull_requests/#create-a-pull-request). [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).
``` bash ``` bash
cd ../.. cd ../..
git checkout -B add-x-tests-blender git checkout -B add-x-tests-blender
git commit sourcefile1 sourcefile2 tests/data git commit tests/data
git push me add-x-tests-blender git push me add-x-tests-blender
# Create the pull request
# Comment `@blender-bot build` on your pull request
``` ```
>
Ensure your tests pass on the build bot commenting `@blender-bot build`, > If the tests pass, then you can push your changes in the test data
or `@blender-bot build +gpu` to also run GPU tests (these aren't tested
regularly, so some GPU tests you havn't modified may fail), in your
pull request.
If the tests pass, then you can push your changes in the test data
repository to the main branch. repository to the main branch.
``` bash ``` bash
cd tests/data cd tests/data
git checkout main git checkout main
git merge --ff-only add-x-tests git merge --ff-only add-x-tests
git push origin main git push origin main
``` ```
>
After pushing the updated tests, update your branch of the Blender repository > After pushing the updated tests, update your branch of the Blender repository
to point to the updated tests, and push your changes to the main branch of to use the updated main `tests/data` submodule, and push your changes to the main
the Blender repository, either through Gitea, or with `git`. branch of the Blender repository, either through Gitea, or with `git`.
``` bash ``` bash
cd ../.. cd ../..
git commit tests/data git commit tests/data