aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/autotest/ctest/ctesttool.cpp
blob: f75ec745aa359cd546ac215cf1b321dca7cc71ed (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
// 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

#include "ctesttool.h"
#include "ctesttreeitem.h"
#include "../autotesttr.h"

#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)
{
    CTestTreeItem *item = new CTestTreeItem(this, tci.name, tci.path, TestTreeItem::TestCase);
    item->setLine(tci.line);
    return item;
}

const char *CTestTool::name() const
{
    return "CTest";
}

QString CTestTool::displayName() const
{
    return Tr::tr("CTest");
}

ITestTreeItem *CTestTool::createRootNode()
{
    return new CTestTreeItem(this,
                             displayName(),
                             Utils::FilePath(), ITestTreeItem::Root);
}

} // namespace Internal
} // namespace Autotest