summaryrefslogtreecommitdiffstats
path: root/Tests/Server/server-test.py
diff options
context:
space:
mode:
authorTobias Hunger <tobias.hunger@qt.io>2016-09-09 08:01:45 (GMT)
committerBrad King <brad.king@kitware.com>2016-09-26 18:23:53 (GMT)
commit82104cc7a8e831ad20cb87d126c2ff00a851bedc (patch)
tree79f319287f1f7370676cc69f0280e68fd46e42c1 /Tests/Server/server-test.py
parent1a5fddfe6d56733528ace3d15899b0739ea28054 (diff)
downloadCMake-82104cc7a8e831ad20cb87d126c2ff00a851bedc.zip
CMake-82104cc7a8e831ad20cb87d126c2ff00a851bedc.tar.gz
CMake-82104cc7a8e831ad20cb87d126c2ff00a851bedc.tar.bz2
server-mode: Query global configuration of cmake via a command
Add "globalSettings" command that returns: * Return capability information * Return currently used generator/extra generator * Return a range of flags for debug/trace/etc.
Diffstat (limited to 'Tests/Server/server-test.py')
-rw-r--r--Tests/Server/server-test.py18
1 files changed, 17 insertions, 1 deletions
diff --git a/Tests/Server/server-test.py b/Tests/Server/server-test.py
index e0a3b3b..d2bf92e 100644
--- a/Tests/Server/server-test.py
+++ b/Tests/Server/server-test.py
@@ -68,9 +68,25 @@ for obj in testData:
if debug: print("Doing handshake:", json.dumps(data))
major = -1
minor = -1
+ generator = 'Ninja'
+ extraGenerator = 'CodeBlocks'
+ sourceDirectory = sourceDir
+ buildDirectory = buildDir
if 'major' in data: major = data['major']
if 'minor' in data: minor = data['minor']
- cmakelib.handshake(proc, major, minor)
+ if 'buildDirectory' in data: buildDirectory = data['buildDirectory']
+ if 'sourceDirectory' in data: sourceDirectory = data['sourceDirectory']
+ if 'generator' in data: generator = data['generator']
+ if 'extraGenerator' in data: extraGenerator = data['extraGenerator']
+ cmakelib.handshake(proc, major, minor, sourceDirectory, buildDirectory,
+ generator, extraGenerator)
+ elif 'validateGlobalSettings' in obj:
+ data = obj['validateGlobalSettings']
+ if not 'buildDirectory' in data: data['buildDirectory'] = buildDir
+ if not 'sourceDirectory' in data: data['sourceDirectory'] = sourceDir
+ if not 'generator' in data: data['generator'] = 'Ninja'
+ if not 'extraGenerator' in data: data['extraGenerator'] = 'CodeBlocks'
+ cmakelib.validateGlobalSettings(proc, cmakeCommand, data)
elif 'message' in obj:
print("MESSAGE:", obj["message"])
else: