Update "Commiting Test Data" section to include build bot testing #77
@ -144,45 +144,73 @@ Ensure submodules are up to date.
|
||||
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
|
||||
cd tests/data
|
||||
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
|
||||
# make your changes
|
||||
# Make your changes
|
||||
git commit testfile1 testfile2
|
||||
git push origin add-x-tests
|
||||
```
|
||||
|
||||
Commit changes to your fork of the Blender repository, including the updated
|
||||
`tests/data` submodule, and then
|
||||
[create a pull request](/docs/handbook/contributing/pull_requests/#create-a-pull-request).
|
||||
>
|
||||
> 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).
|
||||
``` bash
|
||||
cd ../..
|
||||
git checkout -B add-x-tests-blender
|
||||
git commit sourcefile1 sourcefile2 tests/data
|
||||
git commit tests/data
|
||||
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`,
|
||||
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
|
||||
>
|
||||
> If the tests pass, then you can push your changes in the test data
|
||||
repository to the main branch.
|
||||
|
||||
``` bash
|
||||
cd tests/data
|
||||
git checkout main
|
||||
git merge --ff-only add-x-tests
|
||||
git push origin main
|
||||
```
|
||||
|
||||
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
|
||||
the Blender repository, either through Gitea, or with `git`.
|
||||
|
||||
>
|
||||
> 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
|
||||
|
Loading…
Reference in New Issue
Block a user