From c6e99acef81208ae679fe4234b6b35e111f91789 Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Wed, 7 Apr 2021 01:27:21 +0300 Subject: tools: update usage information, add docs/ entries --- docs/clang-format.md | 5 +++++ docs/ctest-driver.md | 13 +++++++++++++ 2 files changed, 18 insertions(+) create mode 100644 docs/clang-format.md create mode 100644 docs/ctest-driver.md (limited to 'docs') diff --git a/docs/clang-format.md b/docs/clang-format.md new file mode 100644 index 0000000..217b2da --- /dev/null +++ b/docs/clang-format.md @@ -0,0 +1,5 @@ +`clang-format` all C/C++ files in the project. + + $ cd project/ + $ python3 path/to/tools/clang-format.py # Prints a diff + $ python3 path/to/tools/clang-format.py -i # Edits files in-place diff --git a/docs/ctest-driver.md b/docs/ctest-driver.md new file mode 100644 index 0000000..af7c3b2 --- /dev/null +++ b/docs/ctest-driver.md @@ -0,0 +1,13 @@ +CTest suffers from at least two issues, in particular with regard to its +PASS_REGULAR_EXPRESSION feature: + +1. The regular expression syntax used by CMake is deficient. +2. The exit code of a test is ignored if one of the regexes matches. + +`ctest-driver.py` tries to fix them. + + $ python3 path/to/tools/ctest-driver.py run --pass-regex OK --fail-regex Fail -- path/to/executable arg1 arg2 + +In addition, it's a cross-platform `grep`: + + $ python3 path/to/tools/ctest-driver.py grep --pass-regex OK --fail-regex Fail -- path/to/logfile.log -- cgit v1.2.3