Turned back on some disabled unit tests as insignificant tests

- qaudiodecoderbackend, qaudiodeviceinfo, qaudiooutput, qaudioinput,
  qmediaplayerbackend, qsound, qsoundeffect enabled as insignificant tests.
- skip iteration over all formats if QT_TEST_CI environement set (CI system)

Change-Id: I6692dcb817445870784193c0f78c0d5f7a201063
Reviewed-by: Daniel Kovacic <daniel.kovacic@nokia.com>
This commit is contained in:
Kurt Korbatits
2012-07-09 09:05:26 +10:00
committed by Qt by Nokia
parent ed7f02490d
commit 2fc6e12002
9 changed files with 52 additions and 7 deletions

View File

@@ -4,7 +4,7 @@ QT += core multimedia-private testlib
CONFIG += no_private_qt_headers_warning
# This is more of a system test
# CONFIG += testcase
CONFIG += testcase insignificant_test
HEADERS += wavheader.h
SOURCES += wavheader.cpp tst_qaudioinput.cpp

View File

@@ -115,6 +115,8 @@ private:
QScopedPointer<QByteArray> m_byteArray;
QScopedPointer<QBuffer> m_buffer;
bool m_inCISystem;
};
QString tst_QAudioInput::formatToFileName(const QAudioFormat &format)
@@ -205,6 +207,7 @@ void tst_QAudioInput::initTestCase()
const QString fileName = temporaryAudioPath + formatToFileName(format) + QStringLiteral(".wav");
audioFiles.append(FilePtr(new QFile(fileName)));
}
qgetenv("QT_TEST_CI").toInt(&m_inCISystem,10);
}
void tst_QAudioInput::format()
@@ -475,6 +478,10 @@ void tst_QAudioInput::pull()
WavHeader::writeDataLength(*audioFile, audioFile->pos() - WavHeader::headerLength());
audioFile->close();
// Only run first format in CI system to reduce test times
if (m_inCISystem)
break;
}
}
@@ -569,6 +576,10 @@ void tst_QAudioInput::pullSuspendResume()
WavHeader::writeDataLength(*audioFiles.at(i),audioFiles.at(i)->pos()-WavHeader::headerLength());
audioFile->close();
// Only run first format in CI system to reduce test times
if (m_inCISystem)
break;
}
}
@@ -648,6 +659,10 @@ void tst_QAudioInput::push()
WavHeader::writeDataLength(*audioFiles.at(i),audioFiles.at(i)->pos()-WavHeader::headerLength());
audioFiles.at(i)->close();
// Only run first format in CI system to reduce test times
if (m_inCISystem)
break;
}
}
@@ -768,6 +783,10 @@ void tst_QAudioInput::pushSuspendResume()
WavHeader::writeDataLength(*audioFiles.at(i),audioFiles.at(i)->pos()-WavHeader::headerLength());
audioFiles.at(i)->close();
// Only run first format in CI system to reduce test times
if (m_inCISystem)
break;
}
}
@@ -839,6 +858,9 @@ void tst_QAudioInput::reset()
QVERIFY2((audioInput.state() == QAudio::StoppedState), "didn't transitions to StoppedState after reset()");
QVERIFY2((audioInput.bytesReady() == 0), "buffer not cleared after reset()");
}
// Only run first format in CI system to reduce test times
if (m_inCISystem)
break;
}
}