Take points when a project runs its tests with custom scripts instead of its ecosystem's standard runner (ctest, meson test, cargo test, …)
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 35/100
調査の方向性
Start by reading the existing tests-run check, its CI command readers (including the via chain from PR #567), and the policy tables under policy/. Measure the proposed rule against the corpus and manually review a sample for false positives before settling the check design, weighting, and Plain Make behavior. Done means the rule handles standard runners, wrappers, extra scripts, and unknown CI commands as described, with hints for registering tests.
索引モデルが issue の本文から書いたものです。
説明
What's wanted
Take points from a project that has an ecosystem's standard way to run tests but runs its tests some other way. Examples:
- a CMake project whose CI runs
./build/tests/unit_testsorscripts/run_tests.shinstead ofctest; - a Meson project that never declares
test()and never runsmeson test.
This applies to every ecosystem that has a standard test entry point, not only C and C++.
Why it matters: the standard runner is what other people, packagers, IDEs and CI templates know how to call. Tests behind a custom script are easy to miss. They also skip the runner's features: filtering, parallel runs, timeouts, JUnit output, sanitizer and Valgrind wrappers (ctest -T memcheck), and meson test --wrap. A downstream user who runs ctest or meson test gets no tests, or only some of them.
The idea, per ecosystem
The standard entry points, as a starting list. The real table goes in TOML under policy/, not in code.
| Build system or ecosystem | Standard way | Typical custom way that would lose points |
|---|---|---|
| CMake | add_test / enable_testing, run by ctest (or cmake --build --target test) |
running test binaries directly; a shell or Python driver script |
| Meson | test() / benchmark(), run by meson test |
running binaries from the build directory directly |
| Autotools | TESTS / check_PROGRAMS, run by make check |
a script run directly beside make check |
| Plain Make | a test or check goal (convention, not enforced by Make) |
scripts CI runs directly, such as Stockfish's tests/*.sh |
| Bazel | *_test rules, run by bazel test |
bazel run of a test binary, or scripts |
| Cargo | cargo test / cargo nextest |
a script that runs built binaries |
| Go | go test |
a custom main that runs checks |
| Python | pytest or unittest discovery, optionally via tox, nox or hatch | python tests/run_all.py with its own runner |
| npm, pnpm, yarn | the test script in package.json, which may run anything |
(package scripts are the norm, so these count as standard) |
| Maven / Gradle | mvn test / verify, gradle test / check |
running test classes with java -cp |
| .NET | dotnet test |
running a test console app |
| SwiftPM | swift test |
|
| Zig | zig build test |
|
| Dart / Flutter | dart test / flutter test |
|
| Elixir, Erlang | mix test, rebar3 eunit / ct |
|
| Ruby | rake test / rspec |
|
| Haskell | cabal test / stack test |
|
| R | R CMD check / testthat |
|
| Julia | Pkg.test() |
|
| OCaml | dune test |
|
| PHP | phpunit / composer test |
Rules to settle in the design
- Wrappers are fine. A script or make goal that itself runs the standard runner counts as standard, for example
scripts/test.shthat runsctest --output-on-failure. The CI command readers already follow these chains: make recipes, shell scripts, and theviachain from #567. - Extra scripts are fine. A project that runs its registered tests through the standard runner and also runs extra scripts loses nothing.
- Which tests count: the unit's tests are judged per unit, as tests-run already does. A CMake unit with test sources but no
add_testis the clearest case. A unit whoseadd_testregistrations exist but whose CI never runsctestis the second case. - No standard runner, no deduction. Shell-only projects and other ecosystems without a standard entry point lose nothing. Plain Make's
test/checkgoal is only a convention, so whether Make counts is a decision (below). - Unknown is an error. If the validator can't tell what a CI script runs, the answer is unknown, never "custom".
- Hints: say how to register the tests with the standard runner (
enable_testing()+add_test(NAME … COMMAND …), Meson'stest('unit', exe)), and what the project gains from it. - Corpus first: measure how many corpus projects this hits before setting a weight, and review a sample by hand to look for false positives.
Decisions for the maintainer
- Its own check, or part of tests-run? One option is a new check, such as
tests-standard-runner, with its own weight. The other is a deduction inside tests-run, for example PASS becoming WARN when tests run only through custom scripts. A separate check keeps "tests run at all" apart from "tests run the standard way", so the losses explain themselves. - How much it costs: WARN-level, or a fixed number of points?
- Plain Make: does a
test/checkgoal count as Make's standard way? If it does, Stockfish would lose points here while still passing tests-run (decision 2 in #567). - Direct binaries in a build that has the runner: in a CMake project that registers some tests with
add_test, do binaries run directly in CI also lose points?
Related:
- #482: tests-run misses common ways projects run their tests. This issue is the other side: those ways are found, but cost points when a standard one exists.
- #470: plain Make.
🤖 Generated with Claude Code
- 主要言語
- Python
- スター
- 4
- フォーク
- 1
- 平均マージ
- 6時間 31分
- マージ済み PR(30日)
- 238
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
cpp-best-practices/project_validator のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
cpp-best-practices/project_validator#609 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 64/100
cpp-best-practices/project_validator#449 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 56/100
cpp-best-practices/project_validator#622 ·
メンテナーはふだん 1 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 48/100
cpp-best-practices/project_validator#621 ·
メンテナーはふだん 1 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 52/100
cpp-best-practices/project_validator#619 ·
メンテナーはふだん 1 日以内に返信
cpp-best-practices/project_validator の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
fossasia/eventyay-exhibition#465 · コメント 3 件 · リアクション 1 件 ·
メンテナーはふだん 3 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
メンテナーはふだん 1 日以内に返信
-
area/webapp comp/desktop P2 type/bug
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
NousResearch/hermes-agent#163341 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
smart-village-solutions/smart-speech-flow#765 ·
メンテナーはふだん 1 日以内に返信
-
bot-triaged module: bfloat16 module: cuda module: half module: numerical-stability triage review
難易度 2/5 1〜3時間 初心者へのやさしさ 77/100
メンテナーはふだん 1 日以内に返信