forked from ondra/server-sdk
Merge branch 'fix/line-endings' into 'master'
Fix/line endings See merge request spaceti-app/integrations/common/server-sdk!2
This commit is contained in:
commit
c24bfa5296
@ -33,6 +33,7 @@ test:
|
|||||||
- cd build
|
- cd build
|
||||||
- make check test
|
- make check test
|
||||||
|
|
||||||
|
# memory leak check for unittest
|
||||||
valgrind:
|
valgrind:
|
||||||
stage: test
|
stage: test
|
||||||
tags:
|
tags:
|
||||||
@ -46,11 +47,17 @@ cppcheck:
|
|||||||
stage: test
|
stage: test
|
||||||
tags:
|
tags:
|
||||||
- shell
|
- shell
|
||||||
# Probably needed to allow failure
|
#allow_failure: true # Probably needed to allow failure
|
||||||
#allow_failure: true
|
script:
|
||||||
script: # run in bash
|
|
||||||
- scripts/cppcheck.sh
|
- scripts/cppcheck.sh
|
||||||
|
|
||||||
|
# Common checks ( Line endings )
|
||||||
|
lineendings:
|
||||||
|
stage: test
|
||||||
|
tags:
|
||||||
|
- shell
|
||||||
|
script:
|
||||||
|
- scripts/check.sh
|
||||||
|
|
||||||
codecoverage:
|
codecoverage:
|
||||||
stage: test
|
stage: test
|
||||||
|
|||||||
20
scripts/check.sh
Executable file
20
scripts/check.sh
Executable 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
0
scripts/common.sh
Normal file → Executable 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
|
|
||||||
@ -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"
|
|
||||||
Loading…
x
Reference in New Issue
Block a user