Skip to content

Commit

Permalink
docs(usage): document parameter shorthands
Browse files Browse the repository at this point in the history
  • Loading branch information
aisuneko committed Oct 15, 2024
1 parent 3a7e0ba commit 589c7f5
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 17 deletions.
20 changes: 12 additions & 8 deletions USAGE.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# 使用说明
## 配置测试

对于每个发行版,在工作目录(默认为程序所在目录, 可使用 `--directory` 参数指定)下分别为其创建一个 `./<distro>` 目录,`./<distro>/config.toml` 是它的发行版配置文件,示例如下:
对于每个发行版,在工作目录(默认为程序所在目录, 可使用 `-D`/`--directory` 参数指定)下分别为其创建一个 `./<distro>` 目录,`./<distro>/config.toml` 是它的发行版配置文件,示例如下:

```toml
enabled = true # 启用该发行版的测试;为 false 则该目录将不会被检测到
Expand Down Expand Up @@ -57,6 +57,11 @@ PACKAGE_DESCRIPTION="Cross-platform make" # 软件包的简要说明(此项暂
./lintestor --test --aggr --summ
```

或者

```bash
./lintestor -tas
```
将在发行版目录下的每个软件包子目录中各生成一个 report.json 作为该软件包的测试结果,并在当前**工作目录下**生成聚合后的总报告 reports.json 和 summary.md。

## 全部命令行参数
Expand All @@ -69,14 +74,13 @@ PACKAGE_DESCRIPTION="Cross-platform make" # 软件包的简要说明(此项暂
Usage: lintestor [OPTIONS]

Options:
--test Run tests for all distributions
--aggr Aggregate multiple report.json files into a single reports.json
--summ Generate a summary report
--directory <working_directory> Specify working directory with preconfigured test files
--distro <distro> Specify distros to test
--package <package> Specify packages to test
-t, --test Run tests (for all distributions by default)
-a, --aggr Aggregate multiple report.json files into a single reports.json
-s, --summ Generate a summary report
-D, --directory <working_directory> Specify working directory with preconfigured test files
-d, --distro <distro> Specify distributions to test
-p, --package <package> Specify packages to test
--skip-successful Skip previous successful tests (instead of overwriting their results)
-h, --help Print help
-V, --version Print version

```
21 changes: 12 additions & 9 deletions USAGE_en.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Usage Guide
## Setup Tests
Each distribution should have all their test files stored in separate subdirectories (`./<distro>`) under the working directory (defaults to the program's CWD; set with the `--directory` flag). Specify distro-specifc options in their respective config files (`./<distro>/config.toml`) as follows:
Each distribution should have all their test files stored in separate subdirectories (`./<distro>`) under the working directory (defaults to the program's CWD; set with the `-D`/`--directory` flag). Specify distro-specifc options in their respective config files (`./<distro>/config.toml`) as follows:

```toml
enabled = true # Enable tests for this distribution. Its folder will not be discovered if set to false
Expand Down Expand Up @@ -37,8 +37,12 @@ Configure the tests following the steps above and run
```bash
./lintestor --test --aggr --summ
```
or simply
```bash
./lintestor -tas
```

A `report.json` report would be generated for each package under their respective subfolders. Now that the tests are done, check out the aggregated `reports.json` and the Markdown result matrix `summary.md` in the current directory.
A `report.json` report would be generated for each package under their respective subfolders under the program's working directory. Now that the tests are done, check out the aggregated `reports.json` and the Markdown result matrix `summary.md` in the current directory.

To toggle logging levels, set the `RUST_LOG` environment variable to one of the following: debug, warn, info, error. `info` is the default logging level.

Expand All @@ -61,14 +65,13 @@ This is optional and will override the settings defined in the main config file.
Usage: lintestor [OPTIONS]

Options:
--test Run tests for all distributions
--aggr Aggregate multiple report.json files into a single reports.json
--summ Generate a summary report
--directory <working_directory> Specify working directory with preconfigured test files
--distro <distro> Specify distros to test
--package <package> Specify packages to test
-t, --test Run tests (for all distributions by default)
-a, --aggr Aggregate multiple report.json files into a single reports.json
-s, --summ Generate a summary report
-D, --directory <working_directory> Specify working directory with preconfigured test files
-d, --distro <distro> Specify distributions to test
-p, --package <package> Specify packages to test
--skip-successful Skip previous successful tests (instead of overwriting their results)
-h, --help Print help
-V, --version Print version

```

0 comments on commit 589c7f5

Please sign in to comment.