aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Lohnau <alexander.lohnau@gmx.de>2024-01-25 22:28:53 +0100
committerAlexander Lohnau <alexander.lohnau@gmx.de>2024-01-25 22:28:53 +0100
commitfac82e8e8b875e3994014c89c24ec8a7bc928efa (patch)
tree41c6f045a5bd395ec2cc71a34f31ce144bbed566
parentb98f36d7a98d90da8f973a550e623c451db43b04 (diff)
Make clazy tests run with Qt5 and Qt6, run as part of ctest
-rw-r--r--ClazyTests.generated.cmake1
-rwxr-xr-xdev-scripts/generate.py1
-rw-r--r--tests/clazy/config.json9
-rw-r--r--tests/clazy/suppressions.cpp2
4 files changed, 3 insertions, 10 deletions
diff --git a/ClazyTests.generated.cmake b/ClazyTests.generated.cmake
index 3a3c326a..b13ca458 100644
--- a/ClazyTests.generated.cmake
+++ b/ClazyTests.generated.cmake
@@ -106,3 +106,4 @@ add_clazy_test(rule-of-three)
add_clazy_test(static-pmf)
add_clazy_test(virtual-call-ctor)
add_clazy_test(clazy-standalone)
+add_clazy_test(clazy)
diff --git a/dev-scripts/generate.py b/dev-scripts/generate.py
index e576c08d..c0ceb4d7 100755
--- a/dev-scripts/generate.py
+++ b/dev-scripts/generate.py
@@ -485,6 +485,7 @@ endmacro()\n
contents += 'add_clazy_test(clazy-standalone)\n'
+ contents += 'add_clazy_test(clazy)\n'
f = io.open(filename, 'w', newline='\n', encoding='utf8')
f.write(contents)
diff --git a/tests/clazy/config.json b/tests/clazy/config.json
index 77e2314c..055336cb 100644
--- a/tests/clazy/config.json
+++ b/tests/clazy/config.json
@@ -4,56 +4,47 @@
"tests" : [
{
"filename" : "test_requested_checks.sh",
- "qt_major_versions" : [5],
"compare_everything" : true,
"minimum_qt_version" : 50500
},
{
"filename" : "suppressions.cpp",
- "qt_major_versions" : [5],
"checks" : ["qstring-allocations", "foreach", "qdatetime-utc"]
},
{
"filename" : "suppressionsWholeFile.cpp",
- "qt_major_versions" : [5],
"checks" : ["qstring-allocations", "foreach"]
},
{
"filename" : "werror.cpp",
- "qt_major_versions" : [5],
"flags" : "-Werror",
"must_fail": true,
"checks" : ["qgetenv"]
},
{
"filename" : "werror2.cpp",
- "qt_major_versions" : [5],
"flags" : "-Werror",
"checks" : ["qgetenv"],
"env" : { "CLAZY_NO_WERROR" : "1" }
},
{
"filename" : "qt4compat1.cpp",
- "qt_major_versions" : [5],
"checks" : ["old-style-connect"],
"has_fixits" : true
},
{
"filename" : "qt4compat2.cpp",
- "qt_major_versions" : [5],
"checks" : ["old-style-connect"],
"qt4compat": true
},
{
"filename" : "onlyQt1.cpp",
- "qt_major_versions" : [5],
"checks" : ["old-style-connect"],
"only_qt" : false,
"has_fixits" : true
},
{
"filename" : "onlyQt2.cpp",
- "qt_major_versions" : [5],
"checks" : ["old-style-connect"],
"only_qt" : true
}
diff --git a/tests/clazy/suppressions.cpp b/tests/clazy/suppressions.cpp
index 79e83bca..7b42d31c 100644
--- a/tests/clazy/suppressions.cpp
+++ b/tests/clazy/suppressions.cpp
@@ -27,5 +27,5 @@ void suppress_foreach()
void qdatetimeutc()
{
- QDateTime::currentDateTime().toTime_t();
+ QDateTime::currentDateTime().toSecsSinceEpoch();
}