Skip to content

Commit be06e14

Browse files
authored
Merge pull request #2319 from RossBrunton/ross/cts_exe
[NFC] Improve documentation of cts_exe.py
2 parents 18bc9e6 + 8d1aebd commit be06e14

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

scripts/core/CONTRIB.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -401,6 +401,13 @@ failure) for the given adapter. However this can be disabled by prepending
401401
``{{OPT}}`` to the match line. This can be used if the test is flaky or
402402
depends on a particular environment.
403403

404+
This matching is done via ``test/conformance/cts_exe.py``, which is designed to be
405+
called from ctest. However, it can be run manually as follows:
406+
407+
.. code-block:: console
408+
409+
test/conformance/cts_exe.py --test_command build/bin/test-adapter --failslist test/conformance/adapter/adapter_adapter_mytarget.match -- --backend=BACKEND
410+
404411
Experimental Features
405412
=====================
406413

test/conformance/cts_exe.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,10 @@ def _run_cmd(cmd, comment, filter):
122122
parser.add_argument("rest", nargs=argparse.REMAINDER)
123123
args = parser.parse_args()
124124

125+
if args.test_command is None or args.failslist is None:
126+
print("Usage: cts_exe.py --test_command (test binary) --failslist (match file) -- (test arguments)")
127+
sys.exit(1)
128+
125129
base_invocation = [args.test_command] + args.rest
126130

127131
if os.environ.get("GTEST_OUTPUT") is not None:

0 commit comments

Comments
 (0)