From 9ffd7a339f0da644c95e71583134263c06745ed5 Mon Sep 17 00:00:00 2001 From: Rohan McGovern Date: Thu, 17 Nov 2011 15:39:19 +1000 Subject: Added build system support for installing tests. Tests will install under $$[QT_INSTALL_TESTS]. TESTDATA may be used to install additional testdata required by the test. The default install rule may be disabled by CONFIG+=no_testcase_installs. Change-Id: I204de60c8e844775906ffd016ca50bffbb414142 Reviewed-by: Oswald Buddenhagen --- tools/configure/configureapp.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'tools/configure') diff --git a/tools/configure/configureapp.cpp b/tools/configure/configureapp.cpp index 1048512691..842aeab95b 100644 --- a/tools/configure/configureapp.cpp +++ b/tools/configure/configureapp.cpp @@ -1119,6 +1119,13 @@ void Configure::parseCmdLine() dictionary[ "QT_INSTALL_EXAMPLES" ] = configCmdLine.at(i); } + else if (configCmdLine.at(i) == "-testsdir") { + ++i; + if (i == argCount) + break; + dictionary[ "QT_INSTALL_TESTS" ] = configCmdLine.at(i); + } + else if (configCmdLine.at(i) == "-hostprefix") { ++i; if (i == argCount) @@ -2602,6 +2609,8 @@ void Configure::generateOutputVars() dictionary[ "QT_INSTALL_TRANSLATIONS" ] = qipempty ? "" : fixSeparators(dictionary[ "QT_INSTALL_PREFIX" ] + "/translations"); if (!dictionary[ "QT_INSTALL_EXAMPLES" ].size()) dictionary[ "QT_INSTALL_EXAMPLES" ] = qipempty ? "" : fixSeparators(dictionary[ "QT_INSTALL_PREFIX" ] + "/examples"); + if (!dictionary[ "QT_INSTALL_TESTS" ].size()) + dictionary[ "QT_INSTALL_TESTS" ] = qipempty ? "" : fixSeparators(dictionary[ "QT_INSTALL_PREFIX" ] + "/tests"); if (dictionary.contains("XQMAKESPEC") && dictionary[ "XQMAKESPEC" ].startsWith("linux")) dictionary[ "QMAKE_RPATHDIR" ] = dictionary[ "QT_INSTALL_LIBS" ]; @@ -3103,6 +3112,7 @@ void Configure::generateConfigfiles() << "static const char qt_configure_data_path_str [512 + 12] = \"qt_datapath=" << escapeSeparators(dictionary["QT_INSTALL_DATA"]) << "\";" << endl << "static const char qt_configure_translations_path_str [512 + 12] = \"qt_trnspath=" << escapeSeparators(dictionary["QT_INSTALL_TRANSLATIONS"]) << "\";" << endl << "static const char qt_configure_examples_path_str [512 + 12] = \"qt_xmplpath=" << escapeSeparators(dictionary["QT_INSTALL_EXAMPLES"]) << "\";" << endl + << "static const char qt_configure_tests_path_str [512 + 12] = \"qt_tstspath=" << escapeSeparators(dictionary["QT_INSTALL_TESTS"]) << "\";" << endl //<< "static const char qt_configure_settings_path_str [256] = \"qt_stngpath=" << escapeSeparators(dictionary["QT_INSTALL_SETTINGS"]) << "\";" << endl ; if (!dictionary[ "QT_HOST_PREFIX" ].isNull()) { @@ -3117,6 +3127,7 @@ void Configure::generateConfigfiles() << "static const char qt_configure_data_path_str [512 + 12] = \"qt_datapath=" << fixSeparators(dictionary[ "QT_HOST_PREFIX" ], true) <<"\";" << endl << "static const char qt_configure_translations_path_str [512 + 12] = \"qt_trnspath=" << fixSeparators(dictionary[ "QT_HOST_PREFIX" ] + "/translations", true) <<"\";" << endl << "static const char qt_configure_examples_path_str [512 + 12] = \"qt_xmplpath=" << fixSeparators(dictionary[ "QT_HOST_PREFIX" ] + "/example", true) <<"\";" << endl + << "static const char qt_configure_tests_path_str [512 + 12] = \"qt_tstspath=" << fixSeparators(dictionary[ "QT_HOST_PREFIX" ] + "/tests", true) <<"\";" << endl << "#endif //QT_BOOTSTRAPPED" << endl; } tmpStream << "/* strlen( \"qt_lcnsxxxx\") == 12 */" << endl @@ -3132,6 +3143,7 @@ void Configure::generateConfigfiles() << "#define QT_CONFIGURE_DATA_PATH qt_configure_data_path_str + 12;" << endl << "#define QT_CONFIGURE_TRANSLATIONS_PATH qt_configure_translations_path_str + 12;" << endl << "#define QT_CONFIGURE_EXAMPLES_PATH qt_configure_examples_path_str + 12;" << endl + << "#define QT_CONFIGURE_TESTS_PATH qt_configure_tests_path_str + 12;" << endl //<< "#define QT_CONFIGURE_SETTINGS_PATH qt_configure_settings_path_str + 12;" << endl << endl; @@ -3291,6 +3303,7 @@ void Configure::displayConfig() cout << "Data installed to..........." << dictionary[ "QT_INSTALL_DATA" ] << endl; cout << "Translations installed to..." << dictionary[ "QT_INSTALL_TRANSLATIONS" ] << endl; cout << "Examples installed to......." << dictionary[ "QT_INSTALL_EXAMPLES" ] << endl; + cout << "Tests installed to.........." << dictionary[ "QT_INSTALL_TESTS" ] << endl; if (dictionary.contains("XQMAKESPEC") && dictionary["XQMAKESPEC"].startsWith(QLatin1String("wince"))) { cout << "Using c runtime detection..." << dictionary[ "CE_CRT" ] << endl; -- cgit v1.2.3