summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoerg Bornemann <joerg.bornemann@qt.io>2020-03-02 10:55:51 +0100
committerJoerg Bornemann <joerg.bornemann@qt.io>2020-03-05 07:48:16 +0100
commit343865201aa3543790c40017ce02340171a8c2ba (patch)
tree68669d401f47463201d252c53f6a0b5283573bfc
parentb99321b78bd011ff9b184e9c28d4b01e14e23969 (diff)
configurejson2cmake: Fix compile tests without a "test" entry
Set the default value of the "test" entry to the test's name like the qmake-based configure does. Change-Id: Ic1027c54c6312c47dca241dd7e3dc65b3e35d36f Reviewed-by: Leander Beernaert <leander.beernaert@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
-rwxr-xr-xutil/cmake/configurejson2cmake.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/util/cmake/configurejson2cmake.py b/util/cmake/configurejson2cmake.py
index f5062d4953..b85d551a70 100755
--- a/util/cmake/configurejson2cmake.py
+++ b/util/cmake/configurejson2cmake.py
@@ -527,7 +527,10 @@ def parseTest(ctx, test, data, cm_fh):
if data["type"] == "compile":
knownTests.add(test)
- details = data["test"]
+ if "test" in data:
+ details = data["test"]
+ else:
+ details = test
if isinstance(details, str):
if not ctx["test_dir"]: