Init uv project for pytest (#193)

Co-authored-by: star9029 <hengxings783@gmail.com>
This commit is contained in:
Myriad-Dreamin
2025-08-26 00:05:50 +08:00
committed by GitHub
parent 260c268af7
commit 90d424b72a
8 changed files with 146 additions and 55 deletions

View File

@@ -116,6 +116,8 @@ $ ./build/bin/unit_tests --test-dir="./tests/data" --resource-dir="<LLVM_INSTALL
- Run integration tests:
We recommend using [uv](https://github.com/astral-sh/uv) to manage Python dependencies and versions. If you don't want to download uv, please refer to `pyproject.toml` to download the required Python version and dependencies.
```bash
$ pytest -s --log-cli-level=INFO tests/integration --executable=./build/bin/clice --resource-dir="<LLVM_INSTALL_PATH>/lib/clang/20"
```
@@ -126,6 +128,6 @@ Or, if you use xmake as the build system, you can directly run tests through xma
```shell
$ xmake test --verbose
$ xmake run unit_tests --verbose
$ xmake test integration_tests/default --verbose
$ xmake run --verbose unit_tests
$ xmake test --verbose integration_tests/default
```

View File

@@ -116,17 +116,18 @@ $ ./build/bin/unit_tests --test-dir="./tests/data" --resource-dir="<LLVM_INSTALL
- 运行集成测试
我们推荐使用 [uv](https://github.com/astral-sh/uv) 管理 python 依赖和版本。如果不想下载 uv请参考 `pyproject.toml` 下载所需的 python 版本和依赖。
```bash
$ pytest -s --log-cli-level=INFO tests/integration --executable=./build/bin/clice --resource-dir="<LLVM_INSTALL_PATH>/lib/clang/20"
```
> resource-dir 是 clang 的内置头文件文件夹
或者,如果你使用 xmake 作为构建系统,可以直接通过 xmake 运行测试
或者,如果你使用 xmake 作为构建系统,可以直接通过 xmake 运行测试
```shell
$ xmake test --verbose
$ xmake run unit_tests --verbose
$ xmake test integration_tests/default --verbose
$ xmake run --verbose unit_tests
$ xmake test --verbose integration_tests/default
```