forked from qt-creator/qt-creator
AutoTest: Support multiple test cases for Qt
Multiple testcases inside a single executable are not supported officially, but widely used. Detect them and handle them as appropriate as possible. Single test functions or data tags are not selectable as they cannot get addressed correctly and rely strongly on the implementation of the test main. Fixes: QTCREATORBUG-18347 Change-Id: I0f0f42579709d8896e034a6df356cb560291d2ba Reviewed-by: Christian Stenger <christian.stenger@qt.io> Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
@@ -36,11 +36,19 @@ namespace Autotest {
|
||||
class ITestFramework;
|
||||
|
||||
namespace Internal {
|
||||
|
||||
struct TestCase
|
||||
{
|
||||
QString name;
|
||||
bool multipleTestCases;
|
||||
};
|
||||
using TestCases = QList<TestCase>;
|
||||
|
||||
namespace QTestUtils {
|
||||
|
||||
bool isQTestMacro(const QByteArray ¯o);
|
||||
QHash<Utils::FilePath, QString> testCaseNamesForFiles(ITestFramework *framework,
|
||||
const Utils::FilePaths &files);
|
||||
QHash<Utils::FilePath, TestCases> testCaseNamesForFiles(ITestFramework *framework,
|
||||
const Utils::FilePaths &files);
|
||||
QMultiHash<Utils::FilePath, Utils::FilePath> alternativeFiles(ITestFramework *framework,
|
||||
const Utils::FilePaths &files);
|
||||
QStringList filterInterfering(const QStringList &provided, QStringList *omitted, bool isQuickTest);
|
||||
|
||||
Reference in New Issue
Block a user