Skip to content

Commit

Permalink
chore: unpack testdata from submodule excluding gui test
Browse files Browse the repository at this point in the history
  • Loading branch information
saturday06 committed Sep 8, 2024
1 parent 840ed25 commit 8b19c6e
Show file tree
Hide file tree
Showing 230 changed files with 120 additions and 454 deletions.
1 change: 0 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ jobs:
- uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: recursive
- name: Cache archive
id: cache-archive
uses: actions/cache@v4
Expand Down
7 changes: 0 additions & 7 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@ jobs:
BLENDER_VRM_EXCLUDE_GUI_TEST: true
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Cache archive
id: cache-archive
uses: actions/cache@v4
Expand Down Expand Up @@ -76,8 +74,6 @@ jobs:
BLENDER_VRM_EXCLUDE_GUI_TEST: true
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Cache archive
id: cache-archive
uses: actions/cache@v4
Expand Down Expand Up @@ -111,8 +107,6 @@ jobs:
BLENDER_VRM_EXCLUDE_GUI_TEST: true
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Cache archive
id: cache-archive
uses: actions/cache@v4
Expand Down Expand Up @@ -146,7 +140,6 @@ jobs:
DEBIAN_FRONTEND: noninteractive
- uses: actions/checkout@v4
with:
submodules: recursive
fetch-depth: 0 # for super-linter
- name: Disable git config core.quotepath
run: git config core.quotepath off
Expand Down
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ For more advanced development, such as running tests, please use [astral.sh/uv](

```text
git checkout main
git submodule update --init
# Blender 4.2 or later
Expand Down Expand Up @@ -98,7 +97,6 @@ BlenderにVRMのインポートやエクスポート、VRM Humanoidの追加やM

```text
git checkout main
git submodule update --init
# Blender 4.2以上の場合
Expand Down
21 changes: 9 additions & 12 deletions docs/website/content/development/_index.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ The source code for development is in the [main](https://github.com/saturday06/V
```text
# Repository setup
git checkout main
git submodule update --init
# Blender 4.2 or later
Expand Down Expand Up @@ -67,19 +66,17 @@ The same result can be achieved by using the `Ruff` extension of Visual Studio C
## To run the software test of the code, follow these steps

1. install [astral-sh/uv](https://docs.astral.sh/uv/).
2. in your terminal, run the command `git submodule update --init --recursive`.
3. double-click `tools\test.bat` in the repository and run it.
4. if you get the error `Blender not found`, set the environment variable `BLENDER_VRM_TEST_BLENDER_PATH` to the path of the Blender 4.2 or 3.6 or 3.3 or 2.93 exe file.
2. double-click `tools\test.bat` in the repository and run it.
3. if you get the error `Blender not found`, set the environment variable `BLENDER_VRM_TEST_BLENDER_PATH` to the path of the Blender 4.2 or 3.6 or 3.3 or 2.93 exe file.

## To run the software test of the code in Visual Studio Code, follow these steps

1. install [astral-sh/uv](https://docs.astral.sh/uv/).
2. in the Visual Studio Code terminal, run the `uv sync` command.
3. in the Visual Studio Code terminal, run the command `git submodule update --init --recursive`.
4. select `Testing` from the left icon in Visual Studio Code
5. select `Configure Python Tests.
6. select `unittests` as the test library.
7. select `Root Directory` as test folder.
8. select `test_*` as test file pattern.
9. press `Run Tests`
10. if you get the error `Blender not found`, set the environment variable `BLENDER_VRM_TEST_BLENDER_PATH` to the path of the Blender 4.2 or 3.6 or 3.3 or 2.93 exe file.
3. select `Testing` from the left icon in Visual Studio Code
4. select `Configure Python Tests.
5. select `unittests` as the test library.
6. select `Root Directory` as test folder.
7. select `test_*` as test file pattern.
8. press `Run Tests`
9. if you get the error `Blender not found`, set the environment variable `BLENDER_VRM_TEST_BLENDER_PATH` to the path of the Blender 4.2 or 3.6 or 3.3 or 2.93 exe file.
21 changes: 9 additions & 12 deletions docs/website/content/development/_index.ja.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ title: "開発環境のセットアップ"
```text
# レポジトリのセットアップ
git checkout main
git submodule update --init
# Blender 4.2以上の場合
Expand Down Expand Up @@ -67,19 +66,17 @@ Visual Studio Code の `Ruff` 拡張機能を使っても同じ結果が得ら
## ソフトウェアテストの実行方法

1. [astral-sh/uv](https://docs.astral.sh/uv/) をインストールする。
2. ターミナルで `git submodule update --init --recursive` コマンドを実行する。
3. リポジトリの `tools\test.bat` をダブルクリックして実行する。
4. Blenderが見つからないという趣旨のエラーが表示されたら、環境変数 `BLENDER_VRM_TEST_BLENDER_PATH` に Blender 4.2 または 3.6 または 3.3 または 2.93 の exe ファイルのパスを設定する。
2. リポジトリの `tools\test.bat` をダブルクリックして実行する。
3. Blenderが見つからないという趣旨のエラーが表示されたら、環境変数 `BLENDER_VRM_TEST_BLENDER_PATH` に Blender 4.2 または 3.6 または 3.3 または 2.93 の exe ファイルのパスを設定する。

## Visual Studio Codeでのソフトウェアテストを実行方法

1. [astral-sh/uv](https://docs.astral.sh/uv/) をインストールする。
2. Visual Studio Code のターミナルで `uv sync` コマンドを実行する。
3. Visual Studio Code のターミナルで、`git submodule update --init --recursive` コマンドを実行する。
4. Visual Studio Code の左のアイコンから `Testing` を選択する。
5. `Configure Python Tests` を選択する。
6. テストライブラリとして `unittests` を選択する。
7. テストフォルダとして `Root Directory` を選択する。
8. テストファイルパターンとして `test_*` を選択する。
9. `Run Tests` を押す。
10. `Blender not found` というエラーが表示されたら、環境変数 `BLENDER_VRM_TEST_BLENDER_PATH` に Blender 4.2 または 3.6 または 3.3 または 2.93 の exe ファイルのパスを設定する。
3. Visual Studio Code の左のアイコンから `Testing` を選択する。
4. `Configure Python Tests` を選択する。
5. テストライブラリとして `unittests` を選択する。
6. テストフォルダとして `Root Directory` を選択する。
7. テストファイルパターンとして `test_*` を選択する。
8. `Run Tests` を押す。
9. `Blender not found` というエラーが表示されたら、環境変数 `BLENDER_VRM_TEST_BLENDER_PATH` に Blender 4.2 または 3.6 または 3.3 または 2.93 の exe ファイルのパスを設定する。
150 changes: 0 additions & 150 deletions tests/base_blender_gui_test_case.py

This file was deleted.

65 changes: 65 additions & 0 deletions tests/resources/.editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
root = true

[*]
charset = utf-8
end_of_line = lf
insert_final_newline = true
indent_size = 4
indent_style = space
tab_width = 4
trim_trailing_whitespace = true

[*.{blend,tga,vrm}]
charset = unset
end_of_line = unset
insert_final_newline = unset
indent_size = unset
indent_style = unset
tab_width = unset
trim_trailing_whitespace = unset

[*.asmdef]
end_of_line = crlf
insert_final_newline = unset

[*.cs]
end_of_line = crlf

[*.csproj]
indent_size = 2
end_of_line = crlf

[*.sln]
indent_size = 2
end_of_line = crlf

[*.json]
indent_size = 2
insert_final_newline = unset

[*.{asset,mat,meta,unity}]
charset = unset
end_of_line = unset
insert_final_newline = unset
indent_size = unset
indent_style = unset
tab_width = unset
trim_trailing_whitespace = unset

[unity/*/{Library,Logs,Temp,UserSettings}/**]
charset = unset
end_of_line = unset
insert_final_newline = unset
indent_size = unset
indent_style = unset
tab_width = unset
trim_trailing_whitespace = unset

[unity/*/*.{csproj,sln}]
charset = unset
end_of_line = unset
insert_final_newline = unset
indent_size = unset
indent_style = unset
tab_width = unset
trim_trailing_whitespace = unset
14 changes: 14 additions & 0 deletions tests/resources/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
*

!*/
!/blend/**/*.blend
!/blend/**/*.blend.txt
!/blend/**/*.tga
!/vrm/**/*.vrm
!/vrm/**/*.vrm.TO_BE_SUPPORTED.txt
!/vrm/converter/*
!/.editorconfig
!/.gitignore

/vrm/*/temp/
.DS_Store
Binary file added tests/resources/blend/2.93/minimal.blend
Binary file not shown.
Binary file added tests/resources/blend/2.93/sphere.blend
Binary file not shown.
Binary file added tests/resources/blend/3.3/minimal.blend
Binary file not shown.
Binary file added tests/resources/blend/3.3/sphere.blend
Binary file not shown.
Binary file added tests/resources/blend/3.6/minimal.blend
Binary file not shown.
Binary file added tests/resources/blend/3.6/sphere.blend
Binary file not shown.
Binary file added tests/resources/blend/4.2/minimal.blend
Binary file not shown.
Binary file added tests/resources/blend/4.2/sphere.blend
Binary file not shown.
Binary file added tests/resources/blend/armature_transform.blend
Binary file not shown.
Binary file added tests/resources/blend/basic_armature.blend
Binary file not shown.
Binary file added tests/resources/blend/bone_child_mesh.blend
Binary file not shown.
22 changes: 22 additions & 0 deletions tests/resources/blend/bone_child_mesh.blend.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
Bones

| parent bone | location | rotation | scale | bone rotation |
| =========== | ======== | ======== | ===== | ============= |
| head | | | | |
| neck | apply | apply | apply | 45 |
| chest | apply | apply | apply | |
| spine | apply | apply | | 45 |
| hips | apply | apply | | |
| upper arm R | apply | | apply | 45 |
| lower arm R | apply | | apply | |
| hand R | apply | | | 45 |
| upper leg R | apply | | | |
| lower leg R | | apply | apply | 45 |
| foot R | | apply | apply | |
| upper arm L | | apply | | 45 |
| lower arm L | | apply | | |
| hand L | | | apply | 45 |
| upper leg L | | | apply | |
| lower leg L | | | | 45 |
| foot L | | | | |

Binary file added tests/resources/blend/custom_normal.blend
Binary file not shown.
Binary file added tests/resources/blend/empty_material.blend
Binary file not shown.
Binary file added tests/resources/blend/empty_mesh.blend
Binary file not shown.
Binary file not shown.
Binary file added tests/resources/blend/expression_migration.blend
Binary file not shown.
Binary file added tests/resources/blend/image_node_traverse.blend
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added tests/resources/blend/material.blend
Binary file not shown.
Binary file added tests/resources/blend/mesh_convertibles.blend
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added tests/resources/blend/mtoon1_2_10_0.blend
Binary file not shown.
Binary file added tests/resources/blend/mtoon1_2_16_4.blend
Binary file not shown.
Binary file added tests/resources/blend/mtoon1_2_20_54.blend
Binary file not shown.
Binary file added tests/resources/blend/mtoon1_2_20_61_vrm0.blend
Binary file not shown.
Binary file added tests/resources/blend/mtoon1_2_20_61_vrm1.blend
Binary file not shown.
Binary file added tests/resources/blend/ngon.blend
Binary file not shown.
Binary file added tests/resources/blend/non_humanoid.blend
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added tests/resources/blend/simple_morph.blend
Binary file not shown.
Binary file added tests/resources/blend/tga_test.tga
Binary file not shown.
Binary file added tests/resources/blend/tga_texture.blend
Binary file not shown.
Binary file added tests/resources/blend/triangle.blend
Binary file not shown.
Binary file added tests/resources/blend/uninitialized_texture.blend
Binary file not shown.
Binary file added tests/resources/vrm/2.93/out/basic_armature.vrm
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added tests/resources/vrm/2.93/out/blend/empty_mesh.vrm
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added tests/resources/vrm/2.93/out/blend/material.vrm
Binary file not shown.
Binary file not shown.
Binary file added tests/resources/vrm/2.93/out/blend/minimal.vrm
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added tests/resources/vrm/2.93/out/blend/ngon.vrm
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added tests/resources/vrm/2.93/out/blend/sphere.vrm
Binary file not shown.
Binary file not shown.
Binary file added tests/resources/vrm/2.93/out/blend/triangle.vrm
Binary file not shown.
Binary file not shown.
Binary file added tests/resources/vrm/2.93/out/minimal.vrm
Binary file not shown.
Binary file added tests/resources/vrm/2.93/out/sphere.vrm
Binary file not shown.
Binary file added tests/resources/vrm/2.93/out/template_mesh.vrm
Binary file not shown.
Binary file added tests/resources/vrm/2.93/out/triangle.vrm
Binary file not shown.
Binary file added tests/resources/vrm/3.3/out/basic_armature.vrm
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added tests/resources/vrm/3.3/out/blend/empty_mesh.vrm
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added tests/resources/vrm/3.3/out/blend/material.vrm
Binary file not shown.
Binary file not shown.
Binary file added tests/resources/vrm/3.3/out/blend/minimal.vrm
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added tests/resources/vrm/3.3/out/blend/ngon.vrm
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added tests/resources/vrm/3.3/out/blend/sphere.vrm
Binary file not shown.
Binary file added tests/resources/vrm/3.3/out/blend/tga_texture.vrm
Binary file not shown.
Binary file added tests/resources/vrm/3.3/out/blend/triangle.vrm
Binary file not shown.
Binary file not shown.
Binary file added tests/resources/vrm/3.3/out/minimal.vrm
Binary file not shown.
Binary file added tests/resources/vrm/3.3/out/sphere.vrm
Binary file not shown.
Binary file added tests/resources/vrm/3.3/out/template_mesh.vrm
Binary file not shown.
Binary file added tests/resources/vrm/3.3/out/triangle.vrm
Binary file not shown.
Binary file added tests/resources/vrm/3.6/out/basic_armature.vrm
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added tests/resources/vrm/3.6/out/blend/empty_mesh.vrm
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added tests/resources/vrm/3.6/out/blend/material.vrm
Binary file not shown.
Binary file not shown.
Binary file added tests/resources/vrm/3.6/out/blend/minimal.vrm
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added tests/resources/vrm/3.6/out/blend/ngon.vrm
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added tests/resources/vrm/3.6/out/blend/sphere.vrm
Binary file not shown.
Binary file added tests/resources/vrm/3.6/out/blend/tga_texture.vrm
Binary file not shown.
Binary file added tests/resources/vrm/3.6/out/blend/triangle.vrm
Binary file not shown.
Binary file not shown.
Binary file added tests/resources/vrm/3.6/out/minimal.vrm
Binary file not shown.
Binary file added tests/resources/vrm/3.6/out/sphere.vrm
Binary file not shown.
Binary file added tests/resources/vrm/3.6/out/template_mesh.vrm
Binary file not shown.
Binary file added tests/resources/vrm/3.6/out/triangle.vrm
Binary file not shown.
Binary file added tests/resources/vrm/4.2/out/basic_armature.vrm
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added tests/resources/vrm/4.2/out/blend/empty_mesh.vrm
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added tests/resources/vrm/4.2/out/blend/material.vrm
Binary file not shown.
Binary file not shown.
Binary file added tests/resources/vrm/4.2/out/blend/minimal.vrm
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added tests/resources/vrm/4.2/out/blend/ngon.vrm
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added tests/resources/vrm/4.2/out/blend/sphere.vrm
Binary file not shown.
Binary file added tests/resources/vrm/4.2/out/blend/tga_texture.vrm
Binary file not shown.
Binary file added tests/resources/vrm/4.2/out/blend/triangle.vrm
Binary file not shown.
Binary file not shown.
Binary file added tests/resources/vrm/4.2/out/minimal.vrm
Binary file not shown.
Binary file added tests/resources/vrm/4.2/out/sphere.vrm
Binary file not shown.
Binary file added tests/resources/vrm/4.2/out/template_mesh.vrm
Binary file not shown.
Binary file added tests/resources/vrm/4.2/out/triangle.vrm
Binary file not shown.
Binary file added tests/resources/vrm/broken/draco.vrm
Binary file not shown.
Binary file added tests/resources/vrm/broken/empty.vrm
Binary file not shown.
Binary file not shown.
Binary file added tests/resources/vrm/broken/human_bone.vrm
Binary file not shown.
Binary file added tests/resources/vrm/in/basic_armature.vrm
Binary file not shown.
Binary file added tests/resources/vrm/in/minimal.vrm
Binary file not shown.
Binary file added tests/resources/vrm/in/sphere.vrm
Binary file not shown.
Binary file added tests/resources/vrm/in/triangle.vrm
Binary file not shown.
3 changes: 0 additions & 3 deletions tools/devcontainer_on_create_command.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@ set -eu -o pipefail
git config --global --add safe.directory "$PWD"
git config --global --add safe.directory "$PWD/tests/resources"

# いちおうサブモジュールを取得するが、作業フォルダの状態次第で失敗するので `|| true` を付与
git submodule update --init --recursive || true

# システムのBlenderから開発中のアドオンをすぐに動作確認できるようにする
for blender_version in \
4.3 \
Expand Down
Loading

0 comments on commit 8b19c6e

Please sign in to comment.