qt5base-lts/tests/auto/testlib/selftests/selftests.pri
David Faure 23d0c77ce8 QTestLib: flush DeferredDelete events between every test
This makes qtestlib behave more like real Qt applications with an
event loop, where exiting the application does indeed flush deleteLaters.
And since every test method is supposed to be independent from other
test methods, we should even cleanup between tests.

For "app less" tests, no flushing happens.

Real life use cases:

* A unittest for some code (e.g. KIO job) which uses a socket, runs an
event loop until the socket communication is done, and ends. However
slotDisconnected() does, as recommended, socket->deleteLater(). So the
test finishes before the socket has a chance to actually get deleted,
and memory leak tools flag a memory leak, which doesn't actually happen
outside the unittest.

* Deleting a QWebEngineView with deleteLater is even worse than a memleak,
it leads to an assert (from a global object destructor) in QtWebEngine
if the view deletion hasn't actually been processed.

Change-Id: I18fc822fd26988a0fa4e75313c1947fcaa7d9e56
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2017-10-06 10:43:03 +00:00

54 lines
1.0 KiB
Plaintext

SUBPROGRAMS = \
#alive \
assert \
badxml \
benchlibcallgrind \
benchlibcounting \
benchlibeventcounter \
benchliboptions \
benchlibtickcounter \
benchlibwalltime \
blacklisted \
cmptest \
commandlinedata \
counting \
crashes \
datatable \
datetime \
deleteLater \
deleteLater_noApp \
differentexec \
exceptionthrow \
expectfail \
failcleanup \
failinit \
failinitdata \
fetchbogus \
findtestdata \
float \
globaldata \
longstring \
maxwarnings \
multiexec \
pairdiagnostics \
printdatatags \
printdatatagswithglobaltags \
qexecstringlist \
silent \
singleskip \
skip \
skipcleanup \
skipinit \
skipinitdata \
sleep \
strcmp \
subtest \
verbose1 \
verbose2 \
verifyexceptionthrown \
warnings \
xunit
INCLUDEPATH += ../../../../shared/
HEADERS += ../../../../shared/emulationdetector.h