Run tests

From ayutaz/piper-plus · View interactive version

Run tests is an AI agent skill from the GitHub repository ayutaz/piper-plus. piper-plus の各言語ランタイムのテストを実行します。引数 python/rust/cs/go/js/cpp/all で対象を選択。未指定なら git diff から自動判定。

How to use this skill

Skill file

piper-plus テスト実行

各言語ランタイムのテストを CI と同じ条件でローカル実行します。

変更ファイル

!git diff --name-only HEAD 2>/dev/null | head -20

ターゲット選択

$ARGUMENTS:

各ターゲットの実行コマンド

Python

cd src/python_run
uv run pytest tests/ -o addopts="" -v --tb=short
cd ../..

# G2P 単体テスト (もし対象なら)
cd src/python/g2p
uv run pytest -o addopts="" -v --tb=short
cd ../../..

注意:

Rust

cd src/rust
cargo test -p piper-plus --no-fail-fast
cargo test -p piper-plus --features naist-jdic --no-fail-fast
cd ../..

C# (.NET)

dotnet test src/csharp/PiperPlus.sln -c Release --nologo --verbosity minimal

Go

cd src/go
go vet ./... ./phonemize/...
go test -race -count=1 ./... ./phonemize/...
cd ../..

JavaScript / WASM

cd src/wasm/openjtalk-web
npm run test:npm-package:all
cd ../../..

C++

# Build がまだなら先にビルド
if [ ! -f build/CMakeCache.txt ]; then
  cmake -S . -B build -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTS=ON
fi
cmake --build build --config Release
ctest --test-dir build -C Release --output-on-failure

結果報告

各ターゲット完了後、以下の形式で報告:

## テスト実行結果

| ランタイム | Pass | Fail | Skip | 時間 |
|----------|------|------|------|------|
| Python (pytest) | 212 | 0 | 20 | 22s |
| Rust (cargo test) | 145 | 0 | 0 | 1m |
| ... | ... | ... | ... | ... |

### 失敗詳細
(失敗があった場合のみ、最初の 3 件まで)

- `test_xxx` (ファイル:行): エラー要約

失敗時のヒント

注意

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.