X-Git-Url: https://osm.etsi.org/gitweb/?p=osm%2Ftests.git;a=blobdiff_plain;f=devops-stages%2Fstage-test.sh;fp=devops-stages%2Fstage-test.sh;h=0fcf210874a3138edb9e322fc5e840731444019c;hp=00c8981e7894817bced81374aa1e19c5ab7e51da;hb=61bbf92c1b2a4563f1636f053a4846b669161714;hpb=fccb028b493afafb8a602953ed5125303423d3ff diff --git a/devops-stages/stage-test.sh b/devops-stages/stage-test.sh index 00c8981..0fcf210 100755 --- a/devops-stages/stage-test.sh +++ b/devops-stages/stage-test.sh @@ -57,6 +57,17 @@ check_crlf_terminators () { exit 1 } +check_spaces_eol () { + folder="$1" + spaces_eol="y" + ! grep -ri " $" ${folder} && spaces_eol="" + [ -n "${spaces_eol}" ] && \ + echo "Some files in ${folder} have spaces at the end of some lines" && \ + echo "Use this command to change it:" && \ + echo " sed -i 's/ *$//g' " && \ + exit 1 +} + echo "Checking tabs in robot files. No tabs should be present" check_tabs robot-systest/testsuite check_tabs robot-systest/lib @@ -77,6 +88,11 @@ check_crlf_terminators robot-systest/testsuite check_crlf_terminators robot-systest/lib echo "No presence of CRLF terminators in robot files. Correct!" +echo "Checking spaces at the end of lines in robot files. No spaces at EOL should be found" +check_spaces_eol robot-systest/testsuite +check_spaces_eol robot-systest/lib +echo "No presence of spaces at EOL in robot files. Correct!" + echo "SUCCESS" exit 0