WIP: check: lineending -> fixing

This commit is contained in:
Filip Bucek 2019-11-08 10:55:20 +01:00
parent e650163631
commit cb61286f33
6 changed files with 30 additions and 53 deletions

View File

@ -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

20
scripts/check.sh Executable file
View File

@ -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

0
scripts/common.sh Normal file → Executable file
View File

0
scripts/test.sh Executable file
View File

View File

@ -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

View File

@ -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 <fbucek@invloop.cz>, 2019
*/
#include <QtTest>
// 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"