diff options
author | Brad King <brad.king@kitware.com> | 2018-09-13 12:48:29 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2018-12-12 11:40:10 (GMT) |
commit | 8fce59848b52f71ae310fcd64fcf943fb2c42bf6 (patch) | |
tree | 7e686c97356b70e6b26225b0db2e3528ee62c11e /Tests/RunCMake/FileAPI/ClientStateless-check.py | |
parent | eb2ec41a0422e9acd4961e32f6f28c20846a292a (diff) | |
download | CMake-8fce59848b52f71ae310fcd64fcf943fb2c42bf6.zip CMake-8fce59848b52f71ae310fcd64fcf943fb2c42bf6.tar.gz CMake-8fce59848b52f71ae310fcd64fcf943fb2c42bf6.tar.bz2 |
fileapi: Add protocol v1 support for client-specific query files
Add support for client-owned stateless query files. These allow clients
to *own* requests for major object versions and get all those recognized
by CMake.
Issue: #18398
Diffstat (limited to 'Tests/RunCMake/FileAPI/ClientStateless-check.py')
-rw-r--r-- | Tests/RunCMake/FileAPI/ClientStateless-check.py | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/Tests/RunCMake/FileAPI/ClientStateless-check.py b/Tests/RunCMake/FileAPI/ClientStateless-check.py new file mode 100644 index 0000000..b7da314 --- /dev/null +++ b/Tests/RunCMake/FileAPI/ClientStateless-check.py @@ -0,0 +1,26 @@ +from check_index import * + +def check_reply(r): + assert is_dict(r) + assert sorted(r.keys()) == ["client-foo"] + check_reply_client_foo(r["client-foo"]) + +def check_reply_client_foo(r): + assert is_dict(r) + assert sorted(r.keys()) == ["__test-v1", "__test-v2", "__test-v3", "unknown"] + check_index__test(r["__test-v1"], 1, 3) + check_index__test(r["__test-v2"], 2, 0) + check_error(r["__test-v3"], "unknown query file") + check_error(r["unknown"], "unknown query file") + +def check_objects(o): + assert is_list(o) + assert len(o) == 2 + check_index__test(o[0], 1, 3) + check_index__test(o[1], 2, 0) + +assert is_dict(index) +assert sorted(index.keys()) == ["cmake", "objects", "reply"] +check_cmake(index["cmake"]) +check_reply(index["reply"]) +check_objects(index["objects"]) |