diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 8eebb38a..1f2385ec 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,13 +1,31 @@ -image: st4ll1/coati_linux_64 - Linux64: - stage: deploy - only: - - master - script: - - ./script/setup.sh - - ./script/buildonly.sh package - artifacts: - paths: - - distr - expire_in: 3 days + image: st4ll1/coati_linux_64 + stage: deploy + only: + - master + script: + - ./script/setup.sh + - ./script/buildonly.sh all + - ./script/buildonly.sh package + artifacts: + paths: + - distr + expire_in: 3 days + +Linux32: + image: st4ll1/coati_linux_32 + stage: deploy + only + - master + script: + - ./script/setup.sh + - ./script/buildonly.sh all + - ./bin/app/Release/Coati --licenseFile ./setup/license.txt + - cd ./bin/test + - ./Release/Coati_test + - cd ../.. + - ./script/buildonly.sh package + artifacts: + paths: + - distr/Coati*.tar.gz + expire_in: 3 days diff --git a/CMakeLists.txt b/CMakeLists.txt index ed32f73c..1b3a4cc8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,5 +1,7 @@ cmake_minimum_required(VERSION 3.1) +#set (CMAKE_VERBOSE_MAKEFILE ON) + include(cmake/add_files.cmake) include(cmake/create_source_groups.cmake) include(cmake/version.cmake) diff --git a/script/buildonly.sh b/script/buildonly.sh index b3dadbc1..ccfaaace 100755 --- a/script/buildonly.sh +++ b/script/buildonly.sh @@ -41,6 +41,9 @@ then cmake --build build/Release --target package mkdir -p distr && mv build/Release/Coati*.tar.gz distr #&& cp build/Release/Coati*.deb distr echo "Packages copied into the distr folder" +elif [ "$1" = "all" ] || [ "$1" = "a" ] +then + cmake --build build/Release --target all else echo "no arguments: first argument 'release' or 'debug', second argument 'test' for tests" fi diff --git a/src/lib/utility/scheduling/TaskReturnSuccessWhile.h b/src/lib/utility/scheduling/TaskReturnSuccessWhile.h index 4192165f..26b23421 100644 --- a/src/lib/utility/scheduling/TaskReturnSuccessWhile.h +++ b/src/lib/utility/scheduling/TaskReturnSuccessWhile.h @@ -60,8 +60,9 @@ Task::TaskState TaskReturnSuccessWhile::doUpdate(std::shared_ptr return STATE_SUCCESS; } break; + default: + return STATE_FAILURE; } - return STATE_FAILURE; } diff --git a/src/lib_gui/qt/window/QtStartScreen.cpp b/src/lib_gui/qt/window/QtStartScreen.cpp index 7c654da2..ad3150b7 100644 --- a/src/lib_gui/qt/window/QtStartScreen.cpp +++ b/src/lib_gui/qt/window/QtStartScreen.cpp @@ -72,7 +72,7 @@ void QtRecentProjectButton::handleButtonClick() emit updateButtons(); } } -}; +} QtStartScreen::QtStartScreen(QWidget *parent) diff --git a/src/lib_license/License.cpp b/src/lib_license/License.cpp index 0a1d5172..34b16903 100644 --- a/src/lib_license/License.cpp +++ b/src/lib_license/License.cpp @@ -104,7 +104,7 @@ void License::create( createMessage(user, version, type); //encode message - Botan::PK_Signer signer(*privateKey, "EMSA4(SHA-256)"); + Botan::PK_Signer signer(*privateKey, *(m_rng.get()), "EMSA4(SHA-256)"); Botan::DataSource_Memory in(getMessage()); Botan::byte buf[4096] = {0}; while (size_t got = in.read(buf, sizeof(buf))) { diff --git a/src/test/CxxParserTestSuite.h b/src/test/CxxParserTestSuite.h index 7469630d..7b442c36 100644 --- a/src/test/CxxParserTestSuite.h +++ b/src/test/CxxParserTestSuite.h @@ -2285,7 +2285,7 @@ public: "class B\n" "{\n" "public:\n" - " typedef typename A::type type;\n" + " typedef typename A::template type type;\n" "};\n" ); diff --git a/src/test/TestSuiteFixture.cpp b/src/test/TestSuiteFixture.cpp index 84d77554..c2aa05a5 100644 --- a/src/test/TestSuiteFixture.cpp +++ b/src/test/TestSuiteFixture.cpp @@ -16,6 +16,8 @@ TestSuiteFixture::~TestSuiteFixture() { } +#include + bool TestSuiteFixture::setUpWorld() { LogManager* logManager = LogManager::createInstance().get(); @@ -24,7 +26,28 @@ bool TestSuiteFixture::setUpWorld() logManager->addLogger(std::make_shared("data/log/test_log.txt")); logManager->addLogger(std::make_shared()); +#ifdef __linux__ + const std::string homedir = getenv("HOME"); + + if (!homedir.empty()) + { + if(!ApplicationSettings::getInstance()->load( + FilePath(homedir + "/.config/coati/ApplicationSettings.xml") + )) + { + std::cout << "no settings" << std::endl; + return false; + } + } + else + { + std::cout << "no homedir" << std::endl; + return false; + } + +#else ApplicationSettings::getInstance()->load(FilePath("data/TestSettings.xml")); +#endif return true; } diff --git a/src/test/Vector2TestSuite.h b/src/test/Vector2TestSuite.h index 4420c0a8..7bd72da2 100644 --- a/src/test/Vector2TestSuite.h +++ b/src/test/Vector2TestSuite.h @@ -72,8 +72,8 @@ public: float targetX = x / std::sqrt(x * x + y * y); float targetY = y / std::sqrt(x * x + y * y); vec0.normalize(); - TS_ASSERT_EQUALS(targetX, vec0.x); - TS_ASSERT_EQUALS(targetY, vec0.y); + TS_ASSERT_DELTA(targetX, vec0.x, 1e-7); + TS_ASSERT_DELTA(targetY, vec0.y, 1e-7); } void test_vector2_comparison()