test: add unit tests for ctrace::RunDirectory
メンテナーはふだん 1 日以内に返信
@tecnolgd がすでに取り組んでいます。
2026年10月13日 から。
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 88/100
調査の方向性
TestReportのパターンを確認するためにtests/tool_output_tests.cppを読み、動作を理解するためにinclude/Process/Tools/RunDirectory.hppを調べてください。列挙された構築、パス、一意性、クリーンアップのケースを対象にtests/run_directory_tests.cppを追加し、実行ファイルとテストをCMakeLists.txtに登録してください。ファイル末尾にある両方のリストにも登録します。ctest -L unitを実行してください。ディレクトリにファイルやサブディレクトリが含まれる場合のクリーンアップも含め、新しいテストがすべて成功すれば完了です。
索引モデルが issue の本文から書いたものです。
説明
ctrace::RunDirectory (include/Process/Tools/RunDirectory.hpp) gives each tool run its own temporary directory (created with mkdtemp, removed in the destructor). It has no direct unit tests.
To do: add tests/run_directory_tests.cpp covering:
- the directory exists right after construction;
- it is located under
std::filesystem::temp_directory_path(), and its name starts with the given prefix followed by-; - two instances created with the same prefix get two different paths;
- the directory is removed when the object is destroyed, including when it still contains files and subdirectories.
How: follow the pattern of tests/tool_output_tests.cpp (a small TestReport with expect, main returns non-zero on failure). The header is header-only, so the test needs no source file. Register it in CMakeLists.txt like the other tests:
add_executable(ctrace_run_directory_tests tests/run_directory_tests.cpp)
add_test(NAME ctrace_run_directory_tests COMMAND ctrace_run_directory_tests)
and add ctrace_run_directory_tests to the two lists at the end of CMakeLists.txt: coretrace_unit_tests (so ctest -L unit runs it) and the foreach(coretrace_target ...) list of executables.
- 主要言語
- C++
- スター
- 5
- フォーク
- 4
- 平均マージ
- 1時間 4分
- マージ済み PR(30日)
- 71
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
CoreTrace/coretrace のほかの issue
-
documentation severity/minor
難易度 1/5 1〜3時間 初心者へのやさしさ 88/100
メンテナーはふだん 1 日以内に返信
-
chore good first issue severity/minor
難易度 1/5 1時間未満 初心者へのやさしさ 90/100
メンテナーはふだん 1 日以内に返信
-
build severity/minor
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
メンテナーはふだん 1 日以内に返信
-
build good first issue severity/minor
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
メンテナーはふだん 1 日以内に返信
-
build severity/minor
難易度 3/5 1〜2日 初心者へのやさしさ 69/100
メンテナーはふだん 1 日以内に返信
CoreTrace/coretrace の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
-
1 type: problem 2 scope: firmware 3 good first issue
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
SpaceTeam/STS1_COBC_SW#511 ·
-
documentation good first issue
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
imaaiagent/fumi#3 ·
-
General perf
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
NVIDIA/TensorRT-LLM#20236 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
E3SM-Project/mam4xx#603 ·
メンテナーはふだん 1 日以内に返信