tst_qfile: Fix execution for WinRT
Not putting executables into debug/release subdirectories leads to the WinRT AppxManifest being overwritten by the wrong configuration. When Qt is configured with -release for example, it was possible that the debug manifest (Manifest files are always created next to the target) is written last and thus contains debug VCLibs as a dependency. Additionally the test was changed in that way, that the resulting file system structure (having helper and test application in a "top level" debug and release folder) is the same structure as in tst_qobject. Change-Id: I55078563304959c41e0dd9bb7bb91a6fc51e005a Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>bb10
parent
fb0271564d
commit
8f143c75f0
|
|
@ -1,6 +1,10 @@
|
|||
tst_qfile
|
||||
stdinprocess/stdinprocess
|
||||
stdinprocess/stdinprocess.exe
|
||||
stdinprocess_helper
|
||||
stdinprocess_helper.exe
|
||||
debug/stdinprocess_helper
|
||||
debug/stdinprocess_helper.exe
|
||||
release/stdinprocess_helper
|
||||
release/stdinprocess_helper.exe
|
||||
readonlyfile
|
||||
newfile.txt
|
||||
appendfile.txt
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@
|
|||
int main(int argc, char *argv[])
|
||||
{
|
||||
if (argc < 2) {
|
||||
printf("usage: stdinprocess <all|line <0|1>>\n");
|
||||
printf("usage: stdinprocess_helper <all|line <0|1>>\n");
|
||||
printf("echos all its input to its output.\n");
|
||||
return 1;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,8 +1,18 @@
|
|||
SOURCES += main.cpp
|
||||
QT = core
|
||||
CONFIG -= app_bundle debug_and_release_target
|
||||
CONFIG -= app_bundle
|
||||
CONFIG += console
|
||||
|
||||
debug_and_release {
|
||||
CONFIG(debug, debug|release) {
|
||||
TARGET = ../../debug/stdinprocess_helper
|
||||
} else {
|
||||
TARGET = ../../release/stdinprocess_helper
|
||||
}
|
||||
} else {
|
||||
TARGET = ../stdinprocess_helper
|
||||
}
|
||||
|
||||
# This app is testdata for tst_qfile
|
||||
target.path = $$[QT_INSTALL_TESTS]/tst_qfile/$$TARGET
|
||||
INSTALLS += target
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
CONFIG += testcase
|
||||
CONFIG -= debug_and_release_target
|
||||
QT = core-private core testlib
|
||||
qtHaveModule(network): QT += network
|
||||
else: DEFINES += QT_NO_NETWORK
|
||||
|
|
@ -10,7 +9,15 @@ contains(CONFIG, builtin_testdata) {
|
|||
|
||||
TESTDATA += ../BLACKLIST
|
||||
|
||||
TARGET = ../tst_qfile
|
||||
debug_and_release {
|
||||
CONFIG(debug, debug|release) {
|
||||
TARGET = ../../debug/tst_qfile
|
||||
} else {
|
||||
TARGET = ../../release/tst_qfile
|
||||
}
|
||||
} else {
|
||||
TARGET = ../tst_qfile
|
||||
}
|
||||
SOURCES = ../tst_qfile.cpp
|
||||
INCLUDEPATH += ../../../../../shared/
|
||||
HEADERS += ../../../../../shared/emulationdetector.h
|
||||
|
|
|
|||
|
|
@ -361,7 +361,7 @@ private:
|
|||
|
||||
QTemporaryDir m_temporaryDir;
|
||||
const QString m_oldDir;
|
||||
QString m_stdinProcessDir;
|
||||
QString m_stdinProcess;
|
||||
QString m_testSourceFile;
|
||||
QString m_testLogFile;
|
||||
QString m_dosFile;
|
||||
|
|
@ -442,8 +442,12 @@ void tst_QFile::initTestCase()
|
|||
{
|
||||
QVERIFY2(m_temporaryDir.isValid(), qPrintable(m_temporaryDir.errorString()));
|
||||
#if QT_CONFIG(process)
|
||||
m_stdinProcessDir = QFINDTESTDATA("stdinprocess");
|
||||
QVERIFY(!m_stdinProcessDir.isEmpty());
|
||||
#ifndef Q_OS_WIN
|
||||
m_stdinProcess = QFINDTESTDATA("stdinprocess_helper");
|
||||
#else
|
||||
m_stdinProcess = QFINDTESTDATA("stdinprocess_helper.exe");
|
||||
#endif
|
||||
QVERIFY(!m_stdinProcess.isEmpty());
|
||||
#endif
|
||||
m_testLogFile = QFINDTESTDATA("testlog.txt");
|
||||
QVERIFY(!m_testLogFile.isEmpty());
|
||||
|
|
@ -962,7 +966,7 @@ void tst_QFile::readAllStdin()
|
|||
|
||||
QProcess process;
|
||||
StdinReaderProcessGuard processGuard(&process);
|
||||
process.start(m_stdinProcessDir + QStringLiteral("/stdinprocess"), QStringList(QStringLiteral("all")));
|
||||
process.start(m_stdinProcess, QStringList(QStringLiteral("all")));
|
||||
QVERIFY2(process.waitForStarted(), qPrintable(process.errorString()));
|
||||
for (int i = 0; i < 5; ++i) {
|
||||
QTest::qWait(1000);
|
||||
|
|
@ -992,7 +996,7 @@ void tst_QFile::readLineStdin()
|
|||
for (int i = 0; i < 2; ++i) {
|
||||
QProcess process;
|
||||
StdinReaderProcessGuard processGuard(&process);
|
||||
process.start(m_stdinProcessDir + QStringLiteral("/stdinprocess"),
|
||||
process.start(m_stdinProcess,
|
||||
QStringList() << QStringLiteral("line") << QString::number(i),
|
||||
QIODevice::Text | QIODevice::ReadWrite);
|
||||
QVERIFY2(process.waitForStarted(), qPrintable(process.errorString()));
|
||||
|
|
@ -1025,7 +1029,7 @@ void tst_QFile::readLineStdin_lineByLine()
|
|||
for (int i = 0; i < 2; ++i) {
|
||||
QProcess process;
|
||||
StdinReaderProcessGuard processGuard(&process);
|
||||
process.start(m_stdinProcessDir + QStringLiteral("/stdinprocess"),
|
||||
process.start(m_stdinProcess,
|
||||
QStringList() << QStringLiteral("line") << QString::number(i),
|
||||
QIODevice::Text | QIODevice::ReadWrite);
|
||||
QVERIFY2(process.waitForStarted(), qPrintable(process.errorString()));
|
||||
|
|
|
|||
Loading…
Reference in New Issue