Changed qnetworkreply unittest to work from install directory

- made subdir test depend on echo
- remove SRCDIR and changed to use TESTDATA and QFINDTESTDATA
- added waitForFinish() to handle slow networks
- removed core module header from echo subprogram and replaced
  with needed header only
- Added ipv6 skip to connectToIPV6Address() if not available
- Added check QT_BUILD_INTERNAL and skip tests if backend
  not available
- Skip permission tests if run as root
- Removed win32 debug and release directory locations so that
  application is in known location relative to test data

Change-Id: I58c3c2fca3cd2fee72fdb81d016bb4fd7fe08ac2
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
This commit is contained in:
Kurt Korbatits 2012-02-14 11:46:03 +10:00 committed by Qt by Nokia
parent c08fb806bb
commit d0759e348d
4 changed files with 243 additions and 289 deletions

View File

@ -39,8 +39,7 @@
**
****************************************************************************/
#include <QtCore>
#include <QtCore/QFile>
int main(int argc, char **)
{

View File

@ -1,4 +1,5 @@
TEMPLATE = subdirs
SUBDIRS = test
!wince*:SUBDIRS += echo
test.depends += $$SUBDIRS
SUBDIRS += test

View File

@ -5,28 +5,13 @@ TARGET = ../tst_qnetworkreply
contains(QT_CONFIG,xcb): CONFIG+=insignificant_test # unstable, QTBUG-21102
win32 {
CONFIG(debug, debug|release) {
TARGET = ../../debug/tst_qnetworkreply
} else {
TARGET = ../../release/tst_qnetworkreply
}
}
DEFINES += SRCDIR=\\\"$$PWD/..\\\"
QT = core-private network-private testlib
RESOURCES += ../qnetworkreply.qrc
wince* {
# For cross compiled targets, reference data files need to be deployed
addFiles.files = ../empty ../rfc3252.txt ../resource ../bigfile ../*.jpg
addFiles.path = .
DEPLOYMENT += addFiles
certFiles.files = ../certs
certFiles.path = .
DEPLOYMENT += certFiles
}
contains(QT_CONFIG,ipv6ifname): DEFINES += HAVE_IPV6
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)

File diff suppressed because it is too large Load Diff