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 += multimedia multimedia-private testlib
CONFIG += no_private_qt_headers_warning
# This is more of a system test
# CONFIG += testcase
CONFIG += testcase insignificant_test
TESTDATA += testdata/*
INCLUDEPATH += \

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
SOURCES += tst_qaudiodeviceinfo.cpp

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;
}
}

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_qaudiooutput.cpp

View File

@@ -113,6 +113,8 @@ private:
QScopedPointer<QByteArray> m_byteArray;
QScopedPointer<QBuffer> m_buffer;
bool m_inCISystem;
};
QString tst_QAudioOutput::formatToFileName(const QAudioFormat &format)
@@ -258,6 +260,7 @@ void tst_QAudioOutput::initTestCase()
file->close();
audioFiles.append(file);
}
qgetenv("QT_TEST_CI").toInt(&m_inCISystem,10);
}
void tst_QAudioOutput::format()
@@ -532,6 +535,10 @@ void tst_QAudioOutput::pull()
QString("too many notify() signals emitted (%1)").arg(notifySignal.count()).toLocal8Bit().constData());
audioFile->close();
// Only run first format in CI system to reduce test times
if (m_inCISystem)
break;
}
}
@@ -622,6 +629,10 @@ void tst_QAudioOutput::pullSuspendResume()
QVERIFY2((audioOutput.elapsedUSecs() == (qint64)0), "elapsedUSecs() not equal to zero in StoppedState");
audioFile->close();
// Only run first format in CI system to reduce test times
if (m_inCISystem)
break;
}
}
@@ -710,6 +721,10 @@ void tst_QAudioOutput::push()
QString("too many notify() signals emitted (%1)").arg(notifySignal.count()).toLocal8Bit().constData());
audioFile->close();
// Only run first format in CI system to reduce test times
if (m_inCISystem)
break;
}
}
@@ -838,6 +853,10 @@ void tst_QAudioOutput::pushSuspendResume()
QVERIFY2((audioOutput.elapsedUSecs() == (qint64)0), "elapsedUSecs() not equal to zero in StoppedState");
audioFile->close();
// Only run first format in CI system to reduce test times
if (m_inCISystem)
break;
}
}
@@ -955,6 +974,10 @@ void tst_QAudioOutput::pushUnderrun()
QVERIFY2((audioOutput.elapsedUSecs() == (qint64)0), "elapsedUSecs() not equal to zero in StoppedState");
audioFile->close();
// Only run first format in CI system to reduce test times
if (m_inCISystem)
break;
}
}

View File

@@ -4,7 +4,7 @@ QT += multimedia-private testlib
CONFIG += no_private_qt_headers_warning
# This is more of a system test
# CONFIG += testcase
CONFIG += testcase insignificant_test
SOURCES += \

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
SOURCES += tst_qsound.cpp

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
SOURCES += tst_qsoundeffect.cpp