aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/docs/ctest-driver.md
diff options
context:
space:
mode:
authorEgor Tensin <Egor.Tensin@gmail.com>2021-04-07 01:27:21 +0300
committerEgor Tensin <Egor.Tensin@gmail.com>2021-04-07 01:27:21 +0300
commitc6e99acef81208ae679fe4234b6b35e111f91789 (patch)
tree561d96103ad4d1ab5e198ced939935bc62b18170 /docs/ctest-driver.md
parentctest-driver.py: add --fail-regex, fix --pass-regex (diff)
downloadcmake-common-c6e99acef81208ae679fe4234b6b35e111f91789.tar.gz
cmake-common-c6e99acef81208ae679fe4234b6b35e111f91789.zip
tools: update usage information, add docs/ entries
Diffstat (limited to '')
-rw-r--r--docs/ctest-driver.md13
1 files changed, 13 insertions, 0 deletions
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