tests/auto/qsharedmemory/qsystemlock/tst_qsystemlock.cpp
changeset 3 41300fa6a67c
parent 0 1918ee327afb
child 4 3b1da2848fc7
equal deleted inserted replaced
2:56cd8111b7f7 3:41300fa6a67c
   200     QFETCH(int, readOnly);
   200     QFETCH(int, readOnly);
   201     QFETCH(int, readWrite);
   201     QFETCH(int, readWrite);
   202 
   202 
   203     QStringList scripts;
   203     QStringList scripts;
   204     for (int i = 0; i < readOnly; ++i)
   204     for (int i = 0; i < readOnly; ++i)
   205         scripts.append(QFileInfo(SRCDIR "lackey/scripts/ systemlock_read.js").absoluteFilePath() );
   205         scripts.append(QFileInfo(SRCDIR "/../lackey/scripts/systemlock_read.js").absoluteFilePath() );
   206     for (int i = 0; i < readWrite; ++i)
   206     for (int i = 0; i < readWrite; ++i)
   207         scripts.append(QFileInfo(SRCDIR "lackey/scripts/systemlock_readwrite.js").absoluteFilePath());
   207         scripts.append(QFileInfo(SRCDIR "/../lackey/scripts/systemlock_readwrite.js").absoluteFilePath());
   208 
   208 
   209     QList<QProcess*> consumers;
   209     QList<QProcess*> consumers;
   210     unsigned int failedProcesses = 0;
   210     unsigned int failedProcesses = 0;
   211     for (int i = 0; i < scripts.count(); ++i) {
   211     for (int i = 0; i < scripts.count(); ++i) {
   212 
   212 
   213         QStringList arguments = QStringList() << scripts.at(i);
   213         QStringList arguments = QStringList() << scripts.at(i);
   214         QProcess *p = new QProcess;
   214         QProcess *p = new QProcess;
   215         p->setProcessChannelMode(QProcess::ForwardedChannels);
   215         p->setProcessChannelMode(QProcess::ForwardedChannels);
   216         
   216 
   217         p->start(QFileInfo(SRCDIR "lackey/lackey").absoluteFilePath(), arguments);
   217         p->start("../lackey/lackey", arguments);
   218         // test, if the process could be started.
   218         // test, if the process could be started.
   219 
   219 
   220         if (p->waitForStarted(2000))
   220         if (p->waitForStarted(2000))
   221             consumers.append(p);
   221             consumers.append(p);
   222         else
   222         else