From bcf20e122a037b9679ca47d3b95986db9f49c915 Mon Sep 17 00:00:00 2001 From: Rohan McGovern Date: Fri, 22 Jun 2012 12:03:39 +1000 Subject: Avoid load(testcase) for installing test helper apps Make test projects declare TEST_HELPER_INSTALLS rather than calling a function exported by testcase.prf. load(testcase) may be unsafe, as testcase.prf should be processed after default_post.prf. Fixes silent disabling of various autotests. Change-Id: I56b35ffd653a637ad5ab18d64dd1a1edadfac59f Reviewed-by: Oswald Buddenhagen Reviewed-by: Kurt Korbatits --- tests/auto/corelib/global/qlogging/test/test.pro | 3 +-- tests/auto/corelib/io/qprocess/test/test.pro | 12 ++++++------ tests/auto/corelib/kernel/qobject/test/test.pro | 3 +-- tests/auto/corelib/thread/qthreadstorage/test/test.pro | 3 +-- tests/auto/corelib/tools/qlocale/test/test.pro | 3 +-- tests/auto/gui/kernel/qclipboard/test/test.pro | 6 +++--- tests/auto/network/access/qnetworkreply/test/test.pro | 4 ++-- tests/auto/network/bearer/qnetworksession/test/test.pro | 3 +-- tests/auto/testlib/selftests/test/test.pro | 3 +-- tests/auto/widgets/kernel/qapplication/test/test.pro | 3 +-- 10 files changed, 18 insertions(+), 25 deletions(-) (limited to 'tests/auto') diff --git a/tests/auto/corelib/global/qlogging/test/test.pro b/tests/auto/corelib/global/qlogging/test/test.pro index 57e9ba30ae..d791f9ca76 100644 --- a/tests/auto/corelib/global/qlogging/test/test.pro +++ b/tests/auto/corelib/global/qlogging/test/test.pro @@ -4,5 +4,4 @@ TARGET = ../tst_qlogging QT = core testlib SOURCES = ../tst_qlogging.cpp -load(testcase) # for target.path and installTestHelperApp() -installTestHelperApp("../app/app",app,app) +TEST_HELPER_INSTALLS = ../app/app diff --git a/tests/auto/corelib/io/qprocess/test/test.pro b/tests/auto/corelib/io/qprocess/test/test.pro index b3eeb5999a..1ddd0ba5a1 100644 --- a/tests/auto/corelib/io/qprocess/test/test.pro +++ b/tests/auto/corelib/io/qprocess/test/test.pro @@ -14,10 +14,10 @@ include(../qprocess.pri) win32:CONFIG += insignificant_test # QTBUG-25342 - sometimes hangs mac:CONFIG += insignificant_test # QTBUG-25895 - sometimes hangs -load(testcase) # for target.path and installTestHelperApp() -for(file, SUBPROGRAMS): installTestHelperApp("../$${file}/$${file}",$${file},$${file}) -installTestHelperApp("../testProcessSpacesArgs/nospace",testProcessSpacesArgs,nospace) -installTestHelperApp("../testProcessSpacesArgs/one space",testProcessSpacesArgs,"one space") -installTestHelperApp("../testProcessSpacesArgs/two space s",testProcessSpacesArgs,"two space s") -installTestHelperApp("../test Space In Name/testSpaceInName","test Space In Name",testSpaceInName) +for(file, SUBPROGRAMS): TEST_HELPER_INSTALLS += "../$${file}/$${file}" +TEST_HELPER_INSTALLS += \ + ../testProcessSpacesArgs/nospace \ + "../testProcessSpacesArgs/one space" \ + "../testProcessSpacesArgs/two space s" \ + "../test Space In Name/testSpaceInName" diff --git a/tests/auto/corelib/kernel/qobject/test/test.pro b/tests/auto/corelib/kernel/qobject/test/test.pro index ba98bf3aca..c2f801b464 100644 --- a/tests/auto/corelib/kernel/qobject/test/test.pro +++ b/tests/auto/corelib/kernel/qobject/test/test.pro @@ -4,5 +4,4 @@ TARGET = ../tst_qobject QT = core-private network testlib SOURCES = ../tst_qobject.cpp -load(testcase) # for target.path and installTestHelperApp() -installTestHelperApp("../signalbug/signalbug",signalbug,signalbug) +TEST_HELPER_INSTALLS = ../signalbug/signalbug diff --git a/tests/auto/corelib/thread/qthreadstorage/test/test.pro b/tests/auto/corelib/thread/qthreadstorage/test/test.pro index 0dc8656920..729241f891 100644 --- a/tests/auto/corelib/thread/qthreadstorage/test/test.pro +++ b/tests/auto/corelib/thread/qthreadstorage/test/test.pro @@ -5,6 +5,5 @@ CONFIG += console QT = core testlib SOURCES = ../tst_qthreadstorage.cpp -load(testcase) # for installTestHelperApp() -installTestHelperApp("../crashonexit/crashonexit",crashonexit,crashonexit) +TEST_HELPER_INSTALLS = ../crashonexit/crashonexit diff --git a/tests/auto/corelib/tools/qlocale/test/test.pro b/tests/auto/corelib/tools/qlocale/test/test.pro index 4bb409a204..05c74d7197 100644 --- a/tests/auto/corelib/tools/qlocale/test/test.pro +++ b/tests/auto/corelib/tools/qlocale/test/test.pro @@ -14,7 +14,6 @@ win32 { } } -load(testcase) # for target.path and installTestHelperApp() -installTestHelperApp("../syslocaleapp/syslocaleapp",syslocaleapp,syslocaleapp) +TEST_HELPER_INSTALLS = ../syslocaleapp/syslocaleapp win32:CONFIG+= insignificant_test # QTBUG-25284 diff --git a/tests/auto/gui/kernel/qclipboard/test/test.pro b/tests/auto/gui/kernel/qclipboard/test/test.pro index d7a67ae3b6..586404871f 100644 --- a/tests/auto/gui/kernel/qclipboard/test/test.pro +++ b/tests/auto/gui/kernel/qclipboard/test/test.pro @@ -15,6 +15,6 @@ wince* { DEPLOYMENT += rsc reg_resource } -load(testcase) # for target.path and installTestHelperApp() -installTestHelperApp("../copier/copier",copier,copier) -installTestHelperApp("../paster/paster",paster,paster) +TEST_HELPER_INSTALLS = \ + ../copier/copier \ + ../paster/paster diff --git a/tests/auto/network/access/qnetworkreply/test/test.pro b/tests/auto/network/access/qnetworkreply/test/test.pro index 2c43aa0aa2..0a95e43059 100644 --- a/tests/auto/network/access/qnetworkreply/test/test.pro +++ b/tests/auto/network/access/qnetworkreply/test/test.pro @@ -15,5 +15,5 @@ TESTDATA += ../empty ../rfc3252.txt ../resource ../bigfile ../*.jpg ../certs \ ../index.html ../smb-file.txt win32:CONFIG += insignificant_test # QTBUG-24226 -load(testcase) # for target.path and installTestHelperApp() -installTestHelperApp("../echo/echo",echo,echo) + +TEST_HELPER_INSTALLS = ../echo/echo diff --git a/tests/auto/network/bearer/qnetworksession/test/test.pro b/tests/auto/network/bearer/qnetworksession/test/test.pro index c87e8e9bda..dd7618b4ad 100644 --- a/tests/auto/network/bearer/qnetworksession/test/test.pro +++ b/tests/auto/network/bearer/qnetworksession/test/test.pro @@ -15,5 +15,4 @@ CONFIG(debug_and_release) { DESTDIR = .. } -load(testcase) # for target.path and installTestHelperApp() -installTestHelperApp("../lackey/lackey",lackey,lackey) +TEST_HELPER_INSTALLS = ../lackey/lackey diff --git a/tests/auto/testlib/selftests/test/test.pro b/tests/auto/testlib/selftests/test/test.pro index 30f18b1bbb..0a31810105 100644 --- a/tests/auto/testlib/selftests/test/test.pro +++ b/tests/auto/testlib/selftests/test/test.pro @@ -16,6 +16,5 @@ win32 { RESOURCES += ../selftests.qrc include(../selftests.pri) -load(testcase) # for target.path and installTestHelperApp() -for(file, SUBPROGRAMS): installTestHelperApp("../$${file}/$${file}",$${file},$${file}) +for(file, SUBPROGRAMS): TEST_HELPER_INSTALLS += "../$${file}/$${file}" diff --git a/tests/auto/widgets/kernel/qapplication/test/test.pro b/tests/auto/widgets/kernel/qapplication/test/test.pro index 37af570552..6732f4896d 100644 --- a/tests/auto/widgets/kernel/qapplication/test/test.pro +++ b/tests/auto/widgets/kernel/qapplication/test/test.pro @@ -12,7 +12,6 @@ TESTDATA = ../test/test.pro ../tmp/README SUBPROGRAMS = desktopsettingsaware modal win32: !wince*: SUBPROGRAMS += wincmdline -load(testcase) # for target.path and installTestHelperApp() -for(file, SUBPROGRAMS): installTestHelperApp("../$${file}/$${file}",$${file},$${file}) +for(file, SUBPROGRAMS): TEST_HELPER_INSTALLS += "../$${file}/$${file}" -- cgit v1.2.3