added handling of library element `entrypoint` to GUI / added GUI tests to CTest (#4744)
This commit is contained in:
parent
f16ffd88e9
commit
b097eca2ec
|
@ -250,8 +250,7 @@ jobs:
|
||||||
pushd gui/test/filelist
|
pushd gui/test/filelist
|
||||||
qmake CONFIG+=debug CONFIG+=ccache
|
qmake CONFIG+=debug CONFIG+=ccache
|
||||||
make -j$(nproc)
|
make -j$(nproc)
|
||||||
# TODO: requires X session
|
./test-filelist
|
||||||
#./test-filelist
|
|
||||||
popd
|
popd
|
||||||
pushd gui/test/projectfile
|
pushd gui/test/projectfile
|
||||||
qmake CONFIG+=debug CONFIG+=ccache
|
qmake CONFIG+=debug CONFIG+=ccache
|
||||||
|
@ -261,14 +260,13 @@ jobs:
|
||||||
pushd gui/test/translationhandler
|
pushd gui/test/translationhandler
|
||||||
qmake CONFIG+=debug CONFIG+=ccache
|
qmake CONFIG+=debug CONFIG+=ccache
|
||||||
make -j$(nproc)
|
make -j$(nproc)
|
||||||
# TODO: requires X session
|
# TODO: requires X session because of QApplication dependency in translationhandler.cpp
|
||||||
#./test-translationhandler
|
#./test-translationhandler
|
||||||
popd
|
popd
|
||||||
pushd gui/test/xmlreportv2
|
pushd gui/test/xmlreportv2
|
||||||
qmake CONFIG+=debug CONFIG+=ccache
|
qmake CONFIG+=debug CONFIG+=ccache
|
||||||
make -j$(nproc)
|
make -j$(nproc)
|
||||||
# TODO: requires X session
|
./test-xmlreportv2
|
||||||
#./test-xmlreportv2
|
|
||||||
|
|
||||||
- name: Generate Qt help file
|
- name: Generate Qt help file
|
||||||
run: |
|
run: |
|
||||||
|
|
|
@ -125,7 +125,7 @@ stage
|
||||||
compile_commands.json
|
compile_commands.json
|
||||||
|
|
||||||
# qmake
|
# qmake
|
||||||
/gui/.qmake.stash
|
.qmake.stash
|
||||||
|
|
||||||
#vs code
|
#vs code
|
||||||
/.vscode
|
/.vscode
|
||||||
|
|
|
@ -43,6 +43,7 @@ option(ENABLE_OSS_FUZZ "Enable the OSS-Fuzz related targets"
|
||||||
option(BUILD_GUI "Build the qt application" OFF)
|
option(BUILD_GUI "Build the qt application" OFF)
|
||||||
option(WITH_QCHART "Enable QtCharts usage in the GUI" OFF)
|
option(WITH_QCHART "Enable QtCharts usage in the GUI" OFF)
|
||||||
option(USE_QT6 "Prefer Qt6 when available" OFF)
|
option(USE_QT6 "Prefer Qt6 when available" OFF)
|
||||||
|
option(REGISTER_GUI_TESTS "Register GUI tests in CTest" ON)
|
||||||
|
|
||||||
option(HAVE_RULES "Usage of rules (needs PCRE library and headers)" OFF)
|
option(HAVE_RULES "Usage of rules (needs PCRE library and headers)" OFF)
|
||||||
option(USE_BUNDLED_TINYXML2 "Usage of bundled tinyxml2 library" ON)
|
option(USE_BUNDLED_TINYXML2 "Usage of bundled tinyxml2 library" ON)
|
||||||
|
|
|
@ -49,6 +49,7 @@ message( STATUS "ENABLE_OSS_FUZZ = ${ENABLE_OSS_FUZZ}" )
|
||||||
message( STATUS )
|
message( STATUS )
|
||||||
message( STATUS "BUILD_GUI = ${BUILD_GUI}" )
|
message( STATUS "BUILD_GUI = ${BUILD_GUI}" )
|
||||||
if (BUILD_GUI)
|
if (BUILD_GUI)
|
||||||
|
message( STATUS "REGISTER_GUI_TESTS = ${REGISTER_GUI_TESTS}" )
|
||||||
message( STATUS "WITH_QCHART = ${WITH_QCHART}" )
|
message( STATUS "WITH_QCHART = ${WITH_QCHART}" )
|
||||||
message( STATUS "USE_QT6 = ${USE_QT6}" )
|
message( STATUS "USE_QT6 = ${USE_QT6}" )
|
||||||
message( STATUS "QT_VERSION = ${QT_VERSION}")
|
message( STATUS "QT_VERSION = ${QT_VERSION}")
|
||||||
|
|
|
@ -446,6 +446,13 @@ static CppcheckLibraryData::Markup loadMarkup(QXmlStreamReader &xmlReader)
|
||||||
return markup;
|
return markup;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static CppcheckLibraryData::Entrypoint loadEntrypoint(QXmlStreamReader &xmlReader)
|
||||||
|
{
|
||||||
|
CppcheckLibraryData::Entrypoint entrypoint;
|
||||||
|
entrypoint.name = xmlReader.attributes().value("name").toString();
|
||||||
|
return entrypoint;
|
||||||
|
}
|
||||||
|
|
||||||
QString CppcheckLibraryData::open(QIODevice &file)
|
QString CppcheckLibraryData::open(QIODevice &file)
|
||||||
{
|
{
|
||||||
clear();
|
clear();
|
||||||
|
@ -486,6 +493,8 @@ QString CppcheckLibraryData::open(QIODevice &file)
|
||||||
reflections.append(loadReflection(xmlReader));
|
reflections.append(loadReflection(xmlReader));
|
||||||
else if (elementName == "markup")
|
else if (elementName == "markup")
|
||||||
markups.append(loadMarkup(xmlReader));
|
markups.append(loadMarkup(xmlReader));
|
||||||
|
else if (elementName == "entrypoint")
|
||||||
|
entrypoints.append(loadEntrypoint(xmlReader));
|
||||||
else
|
else
|
||||||
unhandledElement(xmlReader);
|
unhandledElement(xmlReader);
|
||||||
} catch (std::runtime_error &e) {
|
} catch (std::runtime_error &e) {
|
||||||
|
@ -918,6 +927,12 @@ QString CppcheckLibraryData::toString() const
|
||||||
writeMarkup(xmlWriter, mup);
|
writeMarkup(xmlWriter, mup);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
for (const Entrypoint &ent : entrypoints) {
|
||||||
|
xmlWriter.writeStartElement("entrypoint");
|
||||||
|
xmlWriter.writeAttribute("name", ent.name);
|
||||||
|
xmlWriter.writeEndElement();
|
||||||
|
}
|
||||||
|
|
||||||
xmlWriter.writeEndElement();
|
xmlWriter.writeEndElement();
|
||||||
|
|
||||||
return outputString;
|
return outputString;
|
||||||
|
|
|
@ -238,6 +238,10 @@ public:
|
||||||
bool unique;
|
bool unique;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
struct Entrypoint {
|
||||||
|
QString name;
|
||||||
|
};
|
||||||
|
|
||||||
void clear() {
|
void clear() {
|
||||||
containers.clear();
|
containers.clear();
|
||||||
defines.clear();
|
defines.clear();
|
||||||
|
@ -250,6 +254,7 @@ public:
|
||||||
platformTypes.clear();
|
platformTypes.clear();
|
||||||
reflections.clear();
|
reflections.clear();
|
||||||
markups.clear();
|
markups.clear();
|
||||||
|
entrypoints.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
void swap(CppcheckLibraryData &other) {
|
void swap(CppcheckLibraryData &other) {
|
||||||
|
@ -264,6 +269,7 @@ public:
|
||||||
platformTypes.swap(other.platformTypes);
|
platformTypes.swap(other.platformTypes);
|
||||||
reflections.swap(other.reflections);
|
reflections.swap(other.reflections);
|
||||||
markups.swap(other.markups);
|
markups.swap(other.markups);
|
||||||
|
entrypoints.swap(other.entrypoints);
|
||||||
}
|
}
|
||||||
|
|
||||||
QString open(QIODevice &file);
|
QString open(QIODevice &file);
|
||||||
|
@ -280,6 +286,7 @@ public:
|
||||||
QList<struct SmartPointer> smartPointers;
|
QList<struct SmartPointer> smartPointers;
|
||||||
QList<struct Reflection> reflections;
|
QList<struct Reflection> reflections;
|
||||||
QList<struct Markup> markups;
|
QList<struct Markup> markups;
|
||||||
|
QList<struct Entrypoint> entrypoints;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // CPPCHECKLIBRARYDATA_H
|
#endif // CPPCHECKLIBRARYDATA_H
|
||||||
|
|
|
@ -1,15 +1,22 @@
|
||||||
qt_wrap_cpp(test-cppchecklibrarydata_SRC testcppchecklibrarydata.h)
|
qt_wrap_cpp(test-cppchecklibrarydata_SRC testcppchecklibrarydata.h)
|
||||||
add_custom_target(build-cppchecklibrarydata-deps SOURCES ${test-cppchecklibrarydata_SRC})
|
QT_ADD_RESOURCES(test-cppchecklibrarydata_resources "resources.qrc")
|
||||||
|
add_custom_target(build-cppchecklibrarydata-deps SOURCES ${test-cppchecklibrarydata_SRC} ${test-cppchecklibrarydata_resources})
|
||||||
add_dependencies(gui-build-deps build-cppchecklibrarydata-deps)
|
add_dependencies(gui-build-deps build-cppchecklibrarydata-deps)
|
||||||
add_executable(test-cppchecklibrarydata
|
add_executable(test-cppchecklibrarydata
|
||||||
${test-cppchecklibrarydata_SRC}
|
${test-cppchecklibrarydata_SRC}
|
||||||
|
${test-cppchecklibrarydata_resources}
|
||||||
testcppchecklibrarydata.cpp
|
testcppchecklibrarydata.cpp
|
||||||
${CMAKE_SOURCE_DIR}/gui/cppchecklibrarydata.cpp
|
${CMAKE_SOURCE_DIR}/gui/cppchecklibrarydata.cpp
|
||||||
)
|
)
|
||||||
target_include_directories(test-cppchecklibrarydata PRIVATE ${CMAKE_SOURCE_DIR}/gui)
|
target_include_directories(test-cppchecklibrarydata PRIVATE ${CMAKE_SOURCE_DIR}/gui)
|
||||||
|
target_compile_definitions(test-cppchecklibrarydata PRIVATE SRCDIR="${CMAKE_CURRENT_SOURCE_DIR}")
|
||||||
target_link_libraries(test-cppchecklibrarydata ${QT_CORE_LIB} ${QT_TEST_LIB})
|
target_link_libraries(test-cppchecklibrarydata ${QT_CORE_LIB} ${QT_TEST_LIB})
|
||||||
|
|
||||||
if (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
|
if (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
|
||||||
# Q_UNUSED() in generated code
|
# Q_UNUSED() in generated code
|
||||||
target_compile_options_safe(test-cppchecklibrarydata -Wno-extra-semi-stmt)
|
target_compile_options_safe(test-cppchecklibrarydata -Wno-extra-semi-stmt)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if (REGISTER_GUI_TESTS)
|
||||||
|
add_test(NAME test-cppchecklibrarydata COMMAND $<TARGET_FILE:test-cppchecklibrarydata>)
|
||||||
endif()
|
endif()
|
|
@ -7,7 +7,7 @@ MOC_DIR = ../../temp
|
||||||
|
|
||||||
QT -= gui
|
QT -= gui
|
||||||
QT += core
|
QT += core
|
||||||
CONFIG += console
|
QT += testlib
|
||||||
|
|
||||||
include(../common.pri)
|
include(../common.pri)
|
||||||
|
|
||||||
|
|
|
@ -609,4 +609,20 @@ void TestCppcheckLibraryData::saveCfgFile(const QString &filename, CppcheckLibra
|
||||||
file.close();
|
file.close();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void TestCppcheckLibraryData::validateAllCfg()
|
||||||
|
{
|
||||||
|
const QDir dir(QString(SRCDIR) + "/../../../cfg/");
|
||||||
|
const QStringList files = dir.entryList(QStringList() << "*.cfg",QDir::Files);
|
||||||
|
QVERIFY(files.size() != 0);
|
||||||
|
bool error = false;
|
||||||
|
for (const QString& f : files) {
|
||||||
|
loadCfgFile(dir.absolutePath() + "/" + f, fileLibraryData, result);
|
||||||
|
if (!result.isNull()) {
|
||||||
|
error = true;
|
||||||
|
qDebug() << f << " - " << result;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
QCOMPARE(error, false);
|
||||||
|
}
|
||||||
|
|
||||||
QTEST_MAIN(TestCppcheckLibraryData)
|
QTEST_MAIN(TestCppcheckLibraryData)
|
||||||
|
|
|
@ -41,6 +41,8 @@ private slots:
|
||||||
void markupValid();
|
void markupValid();
|
||||||
void containerValid();
|
void containerValid();
|
||||||
|
|
||||||
|
void validateAllCfg();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
static void loadCfgFile(const QString &filename, CppcheckLibraryData &data, QString &res, bool removeFile = false);
|
static void loadCfgFile(const QString &filename, CppcheckLibraryData &data, QString &res, bool removeFile = false);
|
||||||
static void saveCfgFile(const QString &filename, CppcheckLibraryData &data);
|
static void saveCfgFile(const QString &filename, CppcheckLibraryData &data);
|
||||||
|
|
|
@ -17,4 +17,8 @@ target_link_libraries(test-filelist ${QT_CORE_LIB} ${QT_TEST_LIB})
|
||||||
if (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
|
if (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
|
||||||
# Q_UNUSED() in generated code
|
# Q_UNUSED() in generated code
|
||||||
target_compile_options_safe(test-filelist -Wno-extra-semi-stmt)
|
target_compile_options_safe(test-filelist -Wno-extra-semi-stmt)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if (REGISTER_GUI_TESTS)
|
||||||
|
add_test(NAME test-filelist COMMAND $<TARGET_FILE:test-filelist>)
|
||||||
endif()
|
endif()
|
|
@ -4,6 +4,9 @@ DEPENDPATH += .
|
||||||
INCLUDEPATH += . ../../../externals/simplecpp
|
INCLUDEPATH += . ../../../externals/simplecpp
|
||||||
OBJECTS_DIR = ../../temp
|
OBJECTS_DIR = ../../temp
|
||||||
MOC_DIR = ../../temp
|
MOC_DIR = ../../temp
|
||||||
|
|
||||||
|
QT -= gui
|
||||||
|
QT += core
|
||||||
QT += testlib
|
QT += testlib
|
||||||
|
|
||||||
include(../common.pri)
|
include(../common.pri)
|
||||||
|
|
|
@ -82,7 +82,7 @@ void TestFileList::addDirectory() const
|
||||||
FileList list;
|
FileList list;
|
||||||
list.addDirectory(QString(SRCDIR) + "/../data/files");
|
list.addDirectory(QString(SRCDIR) + "/../data/files");
|
||||||
QStringList files = list.getFileList();
|
QStringList files = list.getFileList();
|
||||||
QCOMPARE(files.size(), 7);
|
QCOMPARE(files.size(), 9);
|
||||||
}
|
}
|
||||||
|
|
||||||
void TestFileList::addDirectory_recursive() const
|
void TestFileList::addDirectory_recursive() const
|
||||||
|
@ -90,7 +90,7 @@ void TestFileList::addDirectory_recursive() const
|
||||||
FileList list;
|
FileList list;
|
||||||
list.addDirectory(QString(SRCDIR) + "/../data/files", true);
|
list.addDirectory(QString(SRCDIR) + "/../data/files", true);
|
||||||
QStringList files = list.getFileList();
|
QStringList files = list.getFileList();
|
||||||
QCOMPARE(files.size(), 10);
|
QCOMPARE(files.size(), 12);
|
||||||
QDir dir(QString(SRCDIR) + "/../data/files");
|
QDir dir(QString(SRCDIR) + "/../data/files");
|
||||||
QString base = dir.canonicalPath();
|
QString base = dir.canonicalPath();
|
||||||
QVERIFY(files.contains(base + "/dir1/foo1.cpp"));
|
QVERIFY(files.contains(base + "/dir1/foo1.cpp"));
|
||||||
|
@ -129,7 +129,7 @@ void TestFileList::filterFiles2() const
|
||||||
list.addExcludeList(filters);
|
list.addExcludeList(filters);
|
||||||
list.addDirectory(QString(SRCDIR) + "/../data/files");
|
list.addDirectory(QString(SRCDIR) + "/../data/files");
|
||||||
QStringList files = list.getFileList();
|
QStringList files = list.getFileList();
|
||||||
QCOMPARE(files.size(), 5);
|
QCOMPARE(files.size(), 7);
|
||||||
QDir dir(QString(SRCDIR) + "/../data/files");
|
QDir dir(QString(SRCDIR) + "/../data/files");
|
||||||
QString base = dir.canonicalPath();
|
QString base = dir.canonicalPath();
|
||||||
QVERIFY(!files.contains(base + "/foo1.cpp"));
|
QVERIFY(!files.contains(base + "/foo1.cpp"));
|
||||||
|
@ -144,7 +144,7 @@ void TestFileList::filterFiles3() const
|
||||||
list.addExcludeList(filters);
|
list.addExcludeList(filters);
|
||||||
list.addDirectory(QString(SRCDIR) + "/../data/files", true);
|
list.addDirectory(QString(SRCDIR) + "/../data/files", true);
|
||||||
QStringList files = list.getFileList();
|
QStringList files = list.getFileList();
|
||||||
QCOMPARE(files.size(), 6);
|
QCOMPARE(files.size(), 8);
|
||||||
QDir dir(QString(SRCDIR) + "/../data/files");
|
QDir dir(QString(SRCDIR) + "/../data/files");
|
||||||
QString base = dir.canonicalPath();
|
QString base = dir.canonicalPath();
|
||||||
QVERIFY(!files.contains(base + "/foo1.cpp"));
|
QVERIFY(!files.contains(base + "/foo1.cpp"));
|
||||||
|
@ -161,26 +161,26 @@ void TestFileList::filterFiles4() const
|
||||||
list.addExcludeList(filters);
|
list.addExcludeList(filters);
|
||||||
list.addDirectory(QString(SRCDIR) + "/../data/files", true);
|
list.addDirectory(QString(SRCDIR) + "/../data/files", true);
|
||||||
QStringList files = list.getFileList();
|
QStringList files = list.getFileList();
|
||||||
QCOMPARE(files.size(), 8);
|
QCOMPARE(files.size(), 10);
|
||||||
QDir dir(QString(SRCDIR) + "/../data/files");
|
QDir dir(QString(SRCDIR) + "/../data/files");
|
||||||
QString base = dir.canonicalPath();
|
QString base = dir.canonicalPath();
|
||||||
QVERIFY(!files.contains(base + "/dir1/foo1.cpp"));
|
QVERIFY(!files.contains(base + "/dir1/foo1.cpp"));
|
||||||
QVERIFY(!files.contains(base + "/dir1/dir11/foo11.cpp"));
|
QVERIFY(!files.contains(base + "/dir1/dir11/foo11.cpp"));
|
||||||
}
|
}
|
||||||
/*
|
|
||||||
void TestFileList::filterFiles5()
|
void TestFileList::filterFiles5() const
|
||||||
{
|
{
|
||||||
FileList list;
|
FileList list;
|
||||||
QStringList filters;
|
QStringList filters;
|
||||||
filters << QDir(QString(SRCDIR) + "/../data/files/dir1/").absolutePath() + "/";
|
filters << QDir(QString(SRCDIR) + "/../data/files/dir1/").absolutePath() + "/";
|
||||||
list.addExcludeList(filters);
|
list.addExcludeList(filters);
|
||||||
list.addDirectory(QString(SRCDIR) + "/../data/files", true);
|
list.addDirectory(QString(SRCDIR) + "/../data/files", true);
|
||||||
QStringList files = list.getFileList();
|
QStringList files = list.getFileList();
|
||||||
QCOMPARE(files.size(), 8);
|
QCOMPARE(files.size(), 10);
|
||||||
QDir dir(QString(SRCDIR) + "/../data/files");
|
QDir dir(QString(SRCDIR) + "/../data/files");
|
||||||
QString base = dir.canonicalPath();
|
QString base = dir.canonicalPath();
|
||||||
QVERIFY(! files.contains(base + "/dir1/foo1.cpp"));
|
QVERIFY(!files.contains(base + "/dir1/foo1.cpp"));
|
||||||
QVERIFY(! files.contains(base + "/dir1/dir11/foo11.cpp"));
|
QVERIFY(!files.contains(base + "/dir1/dir11/foo11.cpp"));
|
||||||
}
|
}
|
||||||
*/
|
|
||||||
QTEST_MAIN(TestFileList)
|
QTEST_MAIN(TestFileList)
|
||||||
|
|
|
@ -32,4 +32,5 @@ private slots:
|
||||||
void filterFiles2() const;
|
void filterFiles2() const;
|
||||||
void filterFiles3() const;
|
void filterFiles3() const;
|
||||||
void filterFiles4() const;
|
void filterFiles4() const;
|
||||||
|
void filterFiles5() const;
|
||||||
};
|
};
|
||||||
|
|
|
@ -13,4 +13,8 @@ target_link_libraries(test-projectfile ${QT_CORE_LIB} ${QT_TEST_LIB})
|
||||||
if (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
|
if (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
|
||||||
# Q_UNUSED() in generated code
|
# Q_UNUSED() in generated code
|
||||||
target_compile_options_safe(test-projectfile -Wno-extra-semi-stmt)
|
target_compile_options_safe(test-projectfile -Wno-extra-semi-stmt)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if (REGISTER_GUI_TESTS)
|
||||||
|
add_test(NAME test-projectfile COMMAND $<TARGET_FILE:test-projectfile>)
|
||||||
endif()
|
endif()
|
|
@ -4,9 +4,10 @@ DEPENDPATH += .
|
||||||
INCLUDEPATH += . ../../../externals/simplecpp ../../../externals/tinyxml2 ../../../externals/picojson
|
INCLUDEPATH += . ../../../externals/simplecpp ../../../externals/tinyxml2 ../../../externals/picojson
|
||||||
OBJECTS_DIR = ../../temp
|
OBJECTS_DIR = ../../temp
|
||||||
MOC_DIR = ../../temp
|
MOC_DIR = ../../temp
|
||||||
|
|
||||||
QT -= gui
|
QT -= gui
|
||||||
QT += core
|
QT += core
|
||||||
CONFIG += console
|
QT += testlib
|
||||||
|
|
||||||
include(../common.pri)
|
include(../common.pri)
|
||||||
|
|
||||||
|
|
|
@ -12,5 +12,10 @@ target_link_libraries(test-translationhandler ${QT_CORE_LIB} ${QT_WIDGETS_LIB} $
|
||||||
|
|
||||||
if (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
|
if (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
|
||||||
# Q_UNUSED() in generated code
|
# Q_UNUSED() in generated code
|
||||||
target_compile_options_safe(test-projectfile -Wno-extra-semi-stmt)
|
target_compile_options_safe(test-translationhandler -Wno-extra-semi-stmt)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if (REGISTER_GUI_TESTS)
|
||||||
|
# TODO: requires X session
|
||||||
|
#add_test(NAME test-translationhandler COMMAND $<TARGET_FILE:test-translationhandler>)
|
||||||
endif()
|
endif()
|
|
@ -4,7 +4,11 @@ DEPENDPATH += .
|
||||||
INCLUDEPATH += .
|
INCLUDEPATH += .
|
||||||
OBJECTS_DIR = ../../temp
|
OBJECTS_DIR = ../../temp
|
||||||
MOC_DIR = ../../temp
|
MOC_DIR = ../../temp
|
||||||
QT += widgets
|
|
||||||
|
QT -= gui
|
||||||
|
QT += core
|
||||||
|
QT += widgets # TODO: get rid of this - causes X server dependency
|
||||||
|
QT += testlib
|
||||||
|
|
||||||
include(../common.pri)
|
include(../common.pri)
|
||||||
|
|
||||||
|
|
|
@ -28,3 +28,7 @@ if (BUILD_CORE_DLL)
|
||||||
target_compile_definitions(test-xmlreportv2 PRIVATE CPPCHECKLIB_IMPORT TINYXML2_IMPORT)
|
target_compile_definitions(test-xmlreportv2 PRIVATE CPPCHECKLIB_IMPORT TINYXML2_IMPORT)
|
||||||
target_link_libraries(test-xmlreportv2 cppcheck-core)
|
target_link_libraries(test-xmlreportv2 cppcheck-core)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
if (REGISTER_GUI_TESTS)
|
||||||
|
add_test(NAME test-xmlreportv2 COMMAND $<TARGET_FILE:test-xmlreportv2>)
|
||||||
|
endif()
|
||||||
|
|
|
@ -5,6 +5,10 @@ INCLUDEPATH += . ../../../externals/simplecpp
|
||||||
OBJECTS_DIR = ../../temp
|
OBJECTS_DIR = ../../temp
|
||||||
MOC_DIR = ../../temp
|
MOC_DIR = ../../temp
|
||||||
|
|
||||||
|
QT -= gui
|
||||||
|
QT += core
|
||||||
|
QT += testlib
|
||||||
|
|
||||||
include(../common.pri)
|
include(../common.pri)
|
||||||
include(../../../lib/lib.pri)
|
include(../../../lib/lib.pri)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue