diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 9543446..614cb81 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -33,6 +33,7 @@ test: - cd build - make check test +# memory leak check for unittest valgrind: stage: test tags: @@ -46,11 +47,17 @@ cppcheck: stage: test tags: - shell - # Probably needed to allow failure - #allow_failure: true - script: # run in bash + #allow_failure: true # Probably needed to allow failure + script: - scripts/cppcheck.sh +# Common checks ( Line endings ) +cppcheck: + stage: test + tags: + - shell + script: + - scripts/check.sh codecoverage: stage: test diff --git a/scripts/check.sh b/scripts/check.sh new file mode 100755 index 0000000..2f5dc1d --- /dev/null +++ b/scripts/check.sh @@ -0,0 +1,20 @@ +#!/bin/bash + +CURRENT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" +source $CURRENT_DIR/common.sh + +SOURCE_DIR=$PWD + +cd $SOURCE_DIR + + +info "Checking line ending" + +RESULT=$( find . -not -type d -exec file "{}" ";" | grep "ASCII text, with CRLF" | cat) + +if [ ! -z "$RESULT" ]; then + echo "----------------------------------" + echo "$RESULT" + echo "----------------------------------" + fail "LF check finished with error" +fi diff --git a/scripts/common.sh b/scripts/common.sh old mode 100644 new mode 100755 diff --git a/scripts/test.sh b/scripts/test.sh new file mode 100755 index 0000000..e69de29 diff --git a/test/auto/UtilsTest/UtilsTest.pro b/test/auto/UtilsTest/UtilsTest.pro deleted file mode 100644 index 543d59e..0000000 --- a/test/auto/UtilsTest/UtilsTest.pro +++ /dev/null @@ -1,9 +0,0 @@ -QT += testlib -QT -= gui - -CONFIG += qt console warn_on depend_includepath testcase -CONFIG -= app_bundle - -TEMPLATE = app - -SOURCES += tst_utilstest.cpp diff --git a/test/auto/UtilsTest/tst_utilstest.cpp b/test/auto/UtilsTest/tst_utilstest.cpp deleted file mode 100644 index 45a64da..0000000 --- a/test/auto/UtilsTest/tst_utilstest.cpp +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright (C) Filip Bucek - All Rights Reserved - * Unauthorized copying of this file, via any medium is strictly prohibited - * Proprietary and confidential - * Written by Filip Bucek , 2019 - */ -#include - -// add necessary includes here - -class UtilsTest : public QObject -{ - Q_OBJECT - -public: - UtilsTest(); - ~UtilsTest(); - -private slots: - void test_case1(); - -}; - -UtilsTest::UtilsTest() -{ - -} - -UtilsTest::~UtilsTest() -{ - -} - -void UtilsTest::test_case1() -{ - -} - -QTEST_APPLESS_MAIN(UtilsTest) - -#include "tst_utilstest.moc"