Commit 0e434fcf authored by Sebastian Holtermann's avatar Sebastian Holtermann

Autogen: Move repeated tests to new QtAutogenRerun test

By moving QtAutogen tests that run repeatedly to a new QtAutogenRerun
test, the `ctest -R Qt[45]Autogen -j4` call runs approximately 25%
faster.
parent af970888
......@@ -1285,12 +1285,28 @@ ${CMake_BINARY_DIR}/bin/cmake -DDIR=dev -P ${CMake_SOURCE_DIR}/Utilities/Release
--build-exe-dir "${CMake_BINARY_DIR}/Tests/Qt5Autogen"
--force-new-ctest-process
--build-options ${build_options}
-DQT_QMAKE_EXECUTABLE:FILEPATH=${QT_QMAKE_EXECUTABLE} -DQT_TEST_VERSION=5
-DQT_QMAKE_EXECUTABLE:FILEPATH=${QT_QMAKE_EXECUTABLE}
-DQT_TEST_VERSION=5
${QtAutogen_BUILD_OPTIONS}
--test-command ${run_autogen_test}
)
list(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/Qt5Autogen")
add_test(NAME Qt5AutogenRerun COMMAND ${CMAKE_CTEST_COMMAND}
--build-and-test
"${CMake_SOURCE_DIR}/Tests/QtAutogenRerun"
"${CMake_BINARY_DIR}/Tests/Qt5AutogenRerun"
${build_generator_args}
--build-project QtAutogenRerun
--build-exe-dir "${CMake_BINARY_DIR}/Tests/Qt5AutogenRerun"
--force-new-ctest-process
--build-options ${build_options}
-DQT_QMAKE_EXECUTABLE:FILEPATH=${QT_QMAKE_EXECUTABLE}
-DQT_TEST_VERSION=5
${QtAutogen_BUILD_OPTIONS}
)
list(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/Qt5AutogenRerun")
add_test(Qt5AutoUicInterface ${CMAKE_CTEST_COMMAND}
--build-and-test
"${CMake_SOURCE_DIR}/Tests/QtAutoUicInterface"
......@@ -1315,12 +1331,28 @@ ${CMake_BINARY_DIR}/bin/cmake -DDIR=dev -P ${CMake_SOURCE_DIR}/Utilities/Release
--build-exe-dir "${CMake_BINARY_DIR}/Tests/Qt4Autogen"
--force-new-ctest-process
--build-options ${build_options}
-DQT_QMAKE_EXECUTABLE:FILEPATH=${QT_QMAKE_EXECUTABLE} -DQT_TEST_VERSION=4
-DQT_QMAKE_EXECUTABLE:FILEPATH=${QT_QMAKE_EXECUTABLE}
-DQT_TEST_VERSION=4
${QtAutogen_BUILD_OPTIONS}
--test-command ${run_autogen_test}
)
list(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/Qt4Autogen")
add_test(NAME Qt4AutogenRerun COMMAND ${CMAKE_CTEST_COMMAND}
--build-and-test
"${CMake_SOURCE_DIR}/Tests/QtAutogenRerun"
"${CMake_BINARY_DIR}/Tests/Qt4AutogenRerun"
${build_generator_args}
--build-project QtAutogenRerun
--build-exe-dir "${CMake_BINARY_DIR}/Tests/Qt4AutogenRerun"
--force-new-ctest-process
--build-options ${build_options}
-DQT_QMAKE_EXECUTABLE:FILEPATH=${QT_QMAKE_EXECUTABLE}
-DQT_TEST_VERSION=4
${QtAutogen_BUILD_OPTIONS}
)
list(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/Qt4AutogenRerun")
add_test(Qt4AutoUicInterface ${CMAKE_CTEST_COMMAND}
--build-and-test
"${CMake_SOURCE_DIR}/Tests/QtAutoUicInterface"
......@@ -1330,7 +1362,8 @@ ${CMake_BINARY_DIR}/bin/cmake -DDIR=dev -P ${CMake_SOURCE_DIR}/Utilities/Release
--build-exe-dir "${CMake_BINARY_DIR}/Tests/Qt4AutoUicInterface"
--force-new-ctest-process
--build-options ${build_options}
-DQT_QMAKE_EXECUTABLE:FILEPATH=${QT_QMAKE_EXECUTABLE} -DQT_TEST_VERSION=4
-DQT_QMAKE_EXECUTABLE:FILEPATH=${QT_QMAKE_EXECUTABLE}
-DQT_TEST_VERSION=4
--test-command ${run_autouic_test}
)
list(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/Qt4AutoUicInterface")
......
This diff is collapsed.
This diff is collapsed.
add_executable(defines_test defines_test.cpp)
set_target_properties(defines_test PROPERTIES AUTOMOC TRUE)
target_link_libraries(defines_test Qt4::QtGui)
#include <QObject>
#ifdef QT_GUI_LIB
#include <QTextDocument>
class SomeDocument : public QTextDocument
{
Q_OBJECT
Q_SIGNALS:
void someSig();
};
#endif
#ifdef QT_CORE_LIB
class SomeObject : public QObject
{
Q_OBJECT
Q_SIGNALS:
void someSig();
};
#endif
int main(int argc, char** argv)
{
#ifdef QT_CORE_LIB
QMetaObject sosmo = SomeObject::staticMetaObject;
#endif
#ifdef QT_GUI_LIB
QMetaObject sdsmo = SomeDocument::staticMetaObject;
#endif
return 0;
}
#include "defines_test.moc"
int main(int argv, char** args)
{
return 0;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment