mirror of
https://github.com/qgis/QGIS.git
synced 2025-04-19 00:04:52 -04:00
make spell test a proper test and not a standalone script
This commit is contained in:
parent
08c2e66b88
commit
4021490791
@ -79,7 +79,6 @@ before_script:
|
|||||||
|
|
||||||
script:
|
script:
|
||||||
- ./ci/travis/${TRAVIS_OS_NAME}/script.sh
|
- ./ci/travis/${TRAVIS_OS_NAME}/script.sh
|
||||||
- ./ci/travis/check_spelling.sh
|
|
||||||
|
|
||||||
after_script:
|
after_script:
|
||||||
- ./ci/travis/${TRAVIS_OS_NAME}/after_script.sh
|
- ./ci/travis/${TRAVIS_OS_NAME}/after_script.sh
|
||||||
|
@ -1,20 +1,25 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
export PATH=${HOME}/osgeo4travis/bin:${PATH}
|
|
||||||
|
|
||||||
|
|
||||||
echo "Spell check"
|
echo "Spell check"
|
||||||
|
cd $(git rev-parse --show-toplevel)
|
||||||
|
|
||||||
if [[ ! -z $TRAVIS_PULL_REQUEST_BRANCH ]]; then
|
if [[ ! -z $TRAVIS_PULL_REQUEST_BRANCH ]]; then
|
||||||
# if on a PR, just analyse the changed files
|
# if on a PR, just analyse the changed files
|
||||||
echo "TRAVIS PR BRANCH: $TRAVIS_PULL_REQUEST_BRANCH"
|
echo "TRAVIS PR BRANCH: $TRAVIS_PULL_REQUEST_BRANCH"
|
||||||
FILES=$(git diff --diff-filter=AM --name-only $(git merge-base HEAD master) | tr '\n' ' ' )
|
FILES=$(git diff --diff-filter=AM --name-only $(git merge-base HEAD master) | tr '\n' ' ' )
|
||||||
else
|
export PATH=${HOME}/osgeo4travis/bin:${PATH}
|
||||||
|
elif [[ ! -z $TRAVIS_COMMIT_RANGE ]]; then
|
||||||
echo "TRAVIS COMMIT RANGE: $TRAVIS_COMMIT_RANGE"
|
echo "TRAVIS COMMIT RANGE: $TRAVIS_COMMIT_RANGE"
|
||||||
FILES=$(git diff --diff-filter=AM --name-only ${TRAVIS_COMMIT_RANGE/.../..} | tr '\n' ' ' )
|
FILES=$(git diff --diff-filter=AM --name-only ${TRAVIS_COMMIT_RANGE/.../..} | tr '\n' ' ' )
|
||||||
|
export PATH=${HOME}/osgeo4travis/bin:${PATH}
|
||||||
|
else
|
||||||
|
echo "Runnng spell test on all files (might take a while)"
|
||||||
|
FILES=""
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ ! -z $FILES ]]; then
|
if [[ ! -z $FILES ]]; then
|
||||||
./scripts/spell_check/check_spelling.sh -r $FILES
|
DIR=$(git rev-parse --show-toplevel)/scripts/spell_check
|
||||||
|
${DIR}/check_spelling.sh -r $FILES
|
||||||
fi
|
fi
|
@ -6,3 +6,5 @@ ENDIF (ENABLE_TESTS)
|
|||||||
IF(WITH_ASTYLE)
|
IF(WITH_ASTYLE)
|
||||||
ADD_TEST(qgis_indentation ${CMAKE_SOURCE_DIR}/scripts/verify-indentation.sh)
|
ADD_TEST(qgis_indentation ${CMAKE_SOURCE_DIR}/scripts/verify-indentation.sh)
|
||||||
ENDIF(WITH_ASTYLE)
|
ENDIF(WITH_ASTYLE)
|
||||||
|
|
||||||
|
ADD_TEST(qgis_spelling ${CMAKE_SOURCE_DIR}/scripts/spell_check/spell_test.sh)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user