2022-08-19 15:59:36 +02:00
|
|
|
// Copyright (C) 2020 The Qt Company Ltd.
|
|
|
|
|
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0+ OR GPL-3.0 WITH Qt-GPL-exception-1.0
|
2020-10-19 14:47:45 +02:00
|
|
|
|
|
|
|
|
#include "ctesttool.h"
|
|
|
|
|
#include "ctesttreeitem.h"
|
2022-07-13 18:31:56 +02:00
|
|
|
#include "../autotesttr.h"
|
2020-10-19 14:47:45 +02:00
|
|
|
|
|
|
|
|
#include <cmakeprojectmanager/cmakeprojectconstants.h>
|
|
|
|
|
|
|
|
|
|
#include <projectexplorer/buildsystem.h>
|
|
|
|
|
|
|
|
|
|
namespace Autotest {
|
|
|
|
|
namespace Internal {
|
|
|
|
|
|
|
|
|
|
Utils::Id CTestTool::buildSystemId() const
|
|
|
|
|
{
|
|
|
|
|
return Utils::Id(CMakeProjectManager::Constants::CMAKE_PROJECT_ID);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
ITestTreeItem *CTestTool::createItemFromTestCaseInfo(const ProjectExplorer::TestCaseInfo &tci)
|
|
|
|
|
{
|
2021-05-26 15:50:03 +02:00
|
|
|
CTestTreeItem *item = new CTestTreeItem(this, tci.name, tci.path, TestTreeItem::TestCase);
|
2020-10-19 14:47:45 +02:00
|
|
|
item->setLine(tci.line);
|
|
|
|
|
return item;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const char *CTestTool::name() const
|
|
|
|
|
{
|
|
|
|
|
return "CTest";
|
|
|
|
|
}
|
|
|
|
|
|
2022-06-09 15:02:30 +02:00
|
|
|
QString CTestTool::displayName() const
|
|
|
|
|
{
|
2022-07-13 18:31:56 +02:00
|
|
|
return Tr::tr("CTest");
|
2022-06-09 15:02:30 +02:00
|
|
|
}
|
|
|
|
|
|
2020-10-19 14:47:45 +02:00
|
|
|
ITestTreeItem *CTestTool::createRootNode()
|
|
|
|
|
{
|
|
|
|
|
return new CTestTreeItem(this,
|
2022-06-09 15:02:30 +02:00
|
|
|
displayName(),
|
2021-05-26 15:50:03 +02:00
|
|
|
Utils::FilePath(), ITestTreeItem::Root);
|
2020-10-19 14:47:45 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
} // namespace Internal
|
|
|
|
|
} // namespace Autotest
|