summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/auto.pro1
-rw-r--r--tests/auto/cmake/CMakeLists.txt (renamed from tests/manual/cmake/CMakeLists.txt)0
-rw-r--r--tests/auto/cmake/cmake.pro50
-rw-r--r--tests/auto/cmake/fail4/CMakeLists.txt (renamed from tests/manual/cmake/fail4/CMakeLists.txt)0
-rw-r--r--tests/auto/cmake/fail4/myobject.cpp (renamed from tests/manual/cmake/fail4/myobject.cpp)0
-rw-r--r--tests/auto/cmake/fail4/myobject.h (renamed from tests/manual/cmake/fail4/myobject.h)0
-rw-r--r--tests/auto/cmake/fail4/pass4.qrc (renamed from tests/manual/cmake/fail4/pass4.qrc)0
-rw-r--r--tests/auto/cmake/fail4/resource_file.txt (renamed from tests/manual/cmake/fail4/resource_file.txt)0
-rw-r--r--tests/auto/cmake/fail5/CMakeLists.txt (renamed from tests/manual/cmake/fail5/CMakeLists.txt)0
-rw-r--r--tests/auto/cmake/fail5/myobject.cpp (renamed from tests/manual/cmake/fail5/myobject.cpp)0
-rw-r--r--tests/auto/cmake/fail5/myobject.h (renamed from tests/manual/cmake/fail5/myobject.h)0
-rw-r--r--tests/auto/cmake/pass(needsquoting)6/CMakeLists.txt (renamed from tests/manual/cmake/pass(needsquoting)6/CMakeLists.txt)0
-rw-r--r--tests/auto/cmake/pass(needsquoting)6/mywidget.cpp (renamed from tests/manual/cmake/pass(needsquoting)6/mywidget.cpp)0
-rw-r--r--tests/auto/cmake/pass(needsquoting)6/mywidget.h (renamed from tests/manual/cmake/pass(needsquoting)6/mywidget.h)0
-rw-r--r--tests/auto/cmake/pass(needsquoting)6/mywidget.ui (renamed from tests/manual/cmake/pass(needsquoting)6/mywidget.ui)0
-rw-r--r--tests/auto/cmake/pass1/CMakeLists.txt (renamed from tests/manual/cmake/pass1/CMakeLists.txt)0
-rw-r--r--tests/auto/cmake/pass1/three.cpp (renamed from tests/manual/cmake/pass1/three.cpp)0
-rw-r--r--tests/auto/cmake/pass1/two.cpp (renamed from tests/manual/cmake/pass1/two.cpp)0
-rw-r--r--tests/auto/cmake/pass2/CMakeLists.txt (renamed from tests/manual/cmake/pass2/CMakeLists.txt)0
-rw-r--r--tests/auto/cmake/pass2/myobject.cpp (renamed from tests/manual/cmake/pass2/myobject.cpp)0
-rw-r--r--tests/auto/cmake/pass2/myobject.h (renamed from tests/manual/cmake/pass2/myobject.h)0
-rw-r--r--tests/auto/cmake/pass2/pass2.qrc (renamed from tests/manual/cmake/pass2/pass2.qrc)0
-rw-r--r--tests/auto/cmake/pass2/resource_file.txt (renamed from tests/manual/cmake/pass2/resource_file.txt)0
-rw-r--r--tests/auto/cmake/pass3/CMakeLists.txt (renamed from tests/manual/cmake/pass3/CMakeLists.txt)0
-rw-r--r--tests/auto/cmake/pass3/mywidget.cpp (renamed from tests/manual/cmake/pass3/mywidget.cpp)0
-rw-r--r--tests/auto/cmake/pass3/mywidget.h (renamed from tests/manual/cmake/pass3/mywidget.h)0
-rw-r--r--tests/auto/cmake/pass3/mywidget.ui (renamed from tests/manual/cmake/pass3/mywidget.ui)0
-rw-r--r--tests/auto/cmake/pass7/CMakeLists.txt (renamed from tests/manual/cmake/pass7/CMakeLists.txt)0
-rw-r--r--tests/auto/cmake/pass7/main.cpp (renamed from tests/manual/cmake/pass7/main.cpp)0
-rw-r--r--tests/auto/cmake/pass8/CMakeLists.txt (renamed from tests/manual/cmake/pass8/CMakeLists.txt)0
-rw-r--r--tests/auto/cmake/pass8/myobject.cpp (renamed from tests/manual/cmake/pass8/myobject.cpp)0
-rw-r--r--tests/auto/cmake/pass8/myobject.h (renamed from tests/manual/cmake/pass8/myobject.h)0
-rw-r--r--tests/auto/cmake/pass9/CMakeLists.txt (renamed from tests/manual/cmake/pass9/CMakeLists.txt)0
-rw-r--r--tests/auto/cmake/pass9/mydbusobject.cpp (renamed from tests/manual/cmake/pass9/mydbusobject.cpp)0
-rw-r--r--tests/auto/cmake/pass9/mydbusobject.h (renamed from tests/manual/cmake/pass9/mydbusobject.h)0
35 files changed, 51 insertions, 0 deletions
diff --git a/tests/auto/auto.pro b/tests/auto/auto.pro
index 23221122d9..bd69fa17fa 100644
--- a/tests/auto/auto.pro
+++ b/tests/auto/auto.pro
@@ -14,6 +14,7 @@ SUBDIRS += \
other \
widgets \
printsupport \
+ cmake
cross_compile: SUBDIRS -= tools
!contains(QT_CONFIG, opengl): SUBDIRS -= opengl
diff --git a/tests/manual/cmake/CMakeLists.txt b/tests/auto/cmake/CMakeLists.txt
index fdcf2b76f8..fdcf2b76f8 100644
--- a/tests/manual/cmake/CMakeLists.txt
+++ b/tests/auto/cmake/CMakeLists.txt
diff --git a/tests/auto/cmake/cmake.pro b/tests/auto/cmake/cmake.pro
new file mode 100644
index 0000000000..9767914140
--- /dev/null
+++ b/tests/auto/cmake/cmake.pro
@@ -0,0 +1,50 @@
+
+CMAKE_VERSION = $$system(cmake --version)
+
+# Cause make to do nothing.
+TEMPLATE = subdirs
+
+check.commands =
+isEmpty(CMAKE_VERSION) {
+ message("cmake executable not found. Not running CMake unit tests")
+} else {
+ CTEST_VERSION = $$system(ctest --version)
+ isEmpty(CTEST_VERSION) {
+ message("ctest executable not found. Not running CMake unit tests")
+ } else {
+ CMAKE_VERSION = $$last(CMAKE_VERSION)
+ CMAKE_VERSION_MAJOR = $$section(CMAKE_VERSION, ., 0, 0)
+ CMAKE_VERSION_MINOR = $$section(CMAKE_VERSION, ., 1, 1)
+ CMAKE_VERSION_PATCH = $$section(CMAKE_VERSION, ., 2, 2)
+
+ VERSION_OK =
+ greaterThan(CMAKE_VERSION_MAJOR, 2) {
+ VERSION_OK = 1
+ } else:greaterThan(CMAKE_VERSION_MAJOR, 1):greaterThan(CMAKE_VERSION_MINOR, 8) {
+ VERSION_OK = 1
+ } else:greaterThan(CMAKE_VERSION_MAJOR, 1):greaterThan(CMAKE_VERSION_MINOR, 7):greaterThan(CMAKE_VERSION_PATCH, 2) {
+ VERSION_OK = 1
+ }
+
+ isEmpty(VERSION_OK) {
+ message("cmake $$CMAKE_VERSION is too old for this test.")
+ } else {
+ SET = set
+ equals(QMAKE_DIR_SEP, "/"):SET = export
+
+ CMAKE_BUILD_TYPE = Debug
+ CONFIG(release, debug|release):CMAKE_BUILD_TYPE = Release
+
+ BUILD_DIR = $$replace($$list($$OUT_PWD/build), /, $$QMAKE_DIR_SEP)
+
+ check.commands = \
+ cd . && $$SET CMAKE_PREFIX_PATH=$$[QT_INSTALL_PREFIX] && \
+ $(MKDIR) $$BUILD_DIR && cd $$BUILD_DIR && \
+ cmake $$_PRO_FILE_PWD_ -DCMAKE_BUILD_TYPE=$${CMAKE_BUILD_TYPE} && \
+ $(TESTRUNNER) ctest --output-on-failure
+
+ }
+ }
+}
+
+QMAKE_EXTRA_TARGETS *= check
diff --git a/tests/manual/cmake/fail4/CMakeLists.txt b/tests/auto/cmake/fail4/CMakeLists.txt
index fdf90e17a7..fdf90e17a7 100644
--- a/tests/manual/cmake/fail4/CMakeLists.txt
+++ b/tests/auto/cmake/fail4/CMakeLists.txt
diff --git a/tests/manual/cmake/fail4/myobject.cpp b/tests/auto/cmake/fail4/myobject.cpp
index 292a76e569..292a76e569 100644
--- a/tests/manual/cmake/fail4/myobject.cpp
+++ b/tests/auto/cmake/fail4/myobject.cpp
diff --git a/tests/manual/cmake/fail4/myobject.h b/tests/auto/cmake/fail4/myobject.h
index cd8765d03f..cd8765d03f 100644
--- a/tests/manual/cmake/fail4/myobject.h
+++ b/tests/auto/cmake/fail4/myobject.h
diff --git a/tests/manual/cmake/fail4/pass4.qrc b/tests/auto/cmake/fail4/pass4.qrc
index 00a17f541f..00a17f541f 100644
--- a/tests/manual/cmake/fail4/pass4.qrc
+++ b/tests/auto/cmake/fail4/pass4.qrc
diff --git a/tests/manual/cmake/fail4/resource_file.txt b/tests/auto/cmake/fail4/resource_file.txt
index 2c604a4f18..2c604a4f18 100644
--- a/tests/manual/cmake/fail4/resource_file.txt
+++ b/tests/auto/cmake/fail4/resource_file.txt
diff --git a/tests/manual/cmake/fail5/CMakeLists.txt b/tests/auto/cmake/fail5/CMakeLists.txt
index 962314c818..962314c818 100644
--- a/tests/manual/cmake/fail5/CMakeLists.txt
+++ b/tests/auto/cmake/fail5/CMakeLists.txt
diff --git a/tests/manual/cmake/fail5/myobject.cpp b/tests/auto/cmake/fail5/myobject.cpp
index 292a76e569..292a76e569 100644
--- a/tests/manual/cmake/fail5/myobject.cpp
+++ b/tests/auto/cmake/fail5/myobject.cpp
diff --git a/tests/manual/cmake/fail5/myobject.h b/tests/auto/cmake/fail5/myobject.h
index cd8765d03f..cd8765d03f 100644
--- a/tests/manual/cmake/fail5/myobject.h
+++ b/tests/auto/cmake/fail5/myobject.h
diff --git a/tests/manual/cmake/pass(needsquoting)6/CMakeLists.txt b/tests/auto/cmake/pass(needsquoting)6/CMakeLists.txt
index 7b9561c588..7b9561c588 100644
--- a/tests/manual/cmake/pass(needsquoting)6/CMakeLists.txt
+++ b/tests/auto/cmake/pass(needsquoting)6/CMakeLists.txt
diff --git a/tests/manual/cmake/pass(needsquoting)6/mywidget.cpp b/tests/auto/cmake/pass(needsquoting)6/mywidget.cpp
index 7f8923810d..7f8923810d 100644
--- a/tests/manual/cmake/pass(needsquoting)6/mywidget.cpp
+++ b/tests/auto/cmake/pass(needsquoting)6/mywidget.cpp
diff --git a/tests/manual/cmake/pass(needsquoting)6/mywidget.h b/tests/auto/cmake/pass(needsquoting)6/mywidget.h
index 11968e6454..11968e6454 100644
--- a/tests/manual/cmake/pass(needsquoting)6/mywidget.h
+++ b/tests/auto/cmake/pass(needsquoting)6/mywidget.h
diff --git a/tests/manual/cmake/pass(needsquoting)6/mywidget.ui b/tests/auto/cmake/pass(needsquoting)6/mywidget.ui
index ac42ac4dc2..ac42ac4dc2 100644
--- a/tests/manual/cmake/pass(needsquoting)6/mywidget.ui
+++ b/tests/auto/cmake/pass(needsquoting)6/mywidget.ui
diff --git a/tests/manual/cmake/pass1/CMakeLists.txt b/tests/auto/cmake/pass1/CMakeLists.txt
index 970ca33078..970ca33078 100644
--- a/tests/manual/cmake/pass1/CMakeLists.txt
+++ b/tests/auto/cmake/pass1/CMakeLists.txt
diff --git a/tests/manual/cmake/pass1/three.cpp b/tests/auto/cmake/pass1/three.cpp
index 63bcbff480..63bcbff480 100644
--- a/tests/manual/cmake/pass1/three.cpp
+++ b/tests/auto/cmake/pass1/three.cpp
diff --git a/tests/manual/cmake/pass1/two.cpp b/tests/auto/cmake/pass1/two.cpp
index 24fcd5dba4..24fcd5dba4 100644
--- a/tests/manual/cmake/pass1/two.cpp
+++ b/tests/auto/cmake/pass1/two.cpp
diff --git a/tests/manual/cmake/pass2/CMakeLists.txt b/tests/auto/cmake/pass2/CMakeLists.txt
index c859f13fff..c859f13fff 100644
--- a/tests/manual/cmake/pass2/CMakeLists.txt
+++ b/tests/auto/cmake/pass2/CMakeLists.txt
diff --git a/tests/manual/cmake/pass2/myobject.cpp b/tests/auto/cmake/pass2/myobject.cpp
index a237b00c50..a237b00c50 100644
--- a/tests/manual/cmake/pass2/myobject.cpp
+++ b/tests/auto/cmake/pass2/myobject.cpp
diff --git a/tests/manual/cmake/pass2/myobject.h b/tests/auto/cmake/pass2/myobject.h
index cd8765d03f..cd8765d03f 100644
--- a/tests/manual/cmake/pass2/myobject.h
+++ b/tests/auto/cmake/pass2/myobject.h
diff --git a/tests/manual/cmake/pass2/pass2.qrc b/tests/auto/cmake/pass2/pass2.qrc
index 00a17f541f..00a17f541f 100644
--- a/tests/manual/cmake/pass2/pass2.qrc
+++ b/tests/auto/cmake/pass2/pass2.qrc
diff --git a/tests/manual/cmake/pass2/resource_file.txt b/tests/auto/cmake/pass2/resource_file.txt
index 2c604a4f18..2c604a4f18 100644
--- a/tests/manual/cmake/pass2/resource_file.txt
+++ b/tests/auto/cmake/pass2/resource_file.txt
diff --git a/tests/manual/cmake/pass3/CMakeLists.txt b/tests/auto/cmake/pass3/CMakeLists.txt
index 7fa6731f9b..7fa6731f9b 100644
--- a/tests/manual/cmake/pass3/CMakeLists.txt
+++ b/tests/auto/cmake/pass3/CMakeLists.txt
diff --git a/tests/manual/cmake/pass3/mywidget.cpp b/tests/auto/cmake/pass3/mywidget.cpp
index 7f8923810d..7f8923810d 100644
--- a/tests/manual/cmake/pass3/mywidget.cpp
+++ b/tests/auto/cmake/pass3/mywidget.cpp
diff --git a/tests/manual/cmake/pass3/mywidget.h b/tests/auto/cmake/pass3/mywidget.h
index 11968e6454..11968e6454 100644
--- a/tests/manual/cmake/pass3/mywidget.h
+++ b/tests/auto/cmake/pass3/mywidget.h
diff --git a/tests/manual/cmake/pass3/mywidget.ui b/tests/auto/cmake/pass3/mywidget.ui
index ac42ac4dc2..ac42ac4dc2 100644
--- a/tests/manual/cmake/pass3/mywidget.ui
+++ b/tests/auto/cmake/pass3/mywidget.ui
diff --git a/tests/manual/cmake/pass7/CMakeLists.txt b/tests/auto/cmake/pass7/CMakeLists.txt
index ecf6b3649e..ecf6b3649e 100644
--- a/tests/manual/cmake/pass7/CMakeLists.txt
+++ b/tests/auto/cmake/pass7/CMakeLists.txt
diff --git a/tests/manual/cmake/pass7/main.cpp b/tests/auto/cmake/pass7/main.cpp
index 0a6b09d877..0a6b09d877 100644
--- a/tests/manual/cmake/pass7/main.cpp
+++ b/tests/auto/cmake/pass7/main.cpp
diff --git a/tests/manual/cmake/pass8/CMakeLists.txt b/tests/auto/cmake/pass8/CMakeLists.txt
index 735b1bd26e..735b1bd26e 100644
--- a/tests/manual/cmake/pass8/CMakeLists.txt
+++ b/tests/auto/cmake/pass8/CMakeLists.txt
diff --git a/tests/manual/cmake/pass8/myobject.cpp b/tests/auto/cmake/pass8/myobject.cpp
index b6287b2540..b6287b2540 100644
--- a/tests/manual/cmake/pass8/myobject.cpp
+++ b/tests/auto/cmake/pass8/myobject.cpp
diff --git a/tests/manual/cmake/pass8/myobject.h b/tests/auto/cmake/pass8/myobject.h
index 71a65ee801..71a65ee801 100644
--- a/tests/manual/cmake/pass8/myobject.h
+++ b/tests/auto/cmake/pass8/myobject.h
diff --git a/tests/manual/cmake/pass9/CMakeLists.txt b/tests/auto/cmake/pass9/CMakeLists.txt
index bf8ff6b3da..bf8ff6b3da 100644
--- a/tests/manual/cmake/pass9/CMakeLists.txt
+++ b/tests/auto/cmake/pass9/CMakeLists.txt
diff --git a/tests/manual/cmake/pass9/mydbusobject.cpp b/tests/auto/cmake/pass9/mydbusobject.cpp
index ee211bbe9b..ee211bbe9b 100644
--- a/tests/manual/cmake/pass9/mydbusobject.cpp
+++ b/tests/auto/cmake/pass9/mydbusobject.cpp
diff --git a/tests/manual/cmake/pass9/mydbusobject.h b/tests/auto/cmake/pass9/mydbusobject.h
index dd9a023ffe..dd9a023ffe 100644
--- a/tests/manual/cmake/pass9/mydbusobject.h
+++ b/tests/auto/cmake/pass9/mydbusobject.h