From a48a929006fbb1e1378e7a973558f452cf72bfe3 Mon Sep 17 00:00:00 2001 From: Jim Evins Date: Fri, 24 Nov 2017 16:53:03 -0500 Subject: [PATCH] Run model unit tests in virtual X fb. --- .travis.yml | 4 ++-- model/CMakeLists.txt | 2 +- model/unit_tests/CMakeLists.txt | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index 292580d..f6fb552 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,7 +8,7 @@ before_install: - sudo apt-get update -qq install: - - sudo apt-get -y install qt59base qt59svg qt59tools zlib1g-dev + - sudo apt-get -y install qt59base qt59svg qt59tools zlib1g-dev xvfb - source /opt/qt5*/bin/qt5*-env.sh script: @@ -16,7 +16,7 @@ script: - cd build - cmake .. -DCMAKE_INSTALL_PREFIX=/usr - make -j4 - - make test + - xvfb-run make test - sudo make DESTDIR=appdir install ; sudo chown -R $USER appdir ; find appdir/ after_success: diff --git a/model/CMakeLists.txt b/model/CMakeLists.txt index 00143ae..1585607 100644 --- a/model/CMakeLists.txt +++ b/model/CMakeLists.txt @@ -92,7 +92,7 @@ target_include_directories (Model target_link_libraries (Model Barcode Merge - Qt5::Widgets + Qt5::Core Qt5::PrintSupport Qt5::Xml Qt5::Svg diff --git a/model/unit_tests/CMakeLists.txt b/model/unit_tests/CMakeLists.txt index 9b7da94..16adeed 100644 --- a/model/unit_tests/CMakeLists.txt +++ b/model/unit_tests/CMakeLists.txt @@ -4,7 +4,7 @@ if (Qt5Test_FOUND) # Test SubstitutionField class #======================================= qt5_wrap_cpp (TestSubstitutionField_moc_sources TestSubstitutionField.h) - add_executable (TestSubstitutionField TestSubstitutionField.cpp ../SubstitutionField.cpp ${TestSubstitutionField_moc_sources}) + add_executable (TestSubstitutionField TestSubstitutionField.cpp ${TestSubstitutionField_moc_sources}) target_link_libraries (TestSubstitutionField Model Qt5::Test) add_test (NAME SubstitutionField COMMAND TestSubstitutionField)