Update some fixes

f38
Akira TAGOH 6 years ago
parent c0a402d955
commit c528456077

@ -19,7 +19,8 @@ Options:
-l, --lang=LANG Test LANG language coverage (default: en)
-p, --path=PATH Test fonts on PATH
-a, --artifactsdir=DIR test environment dir to store artifacts
-i, --ignore=FILE Ignore FILE to check.
-e, --exclude=FILE Exclude FILE to check.
-i, --include=FILE Include File to check.
_EOF_
}
@ -28,14 +29,19 @@ DEBUG="${DEBUG:-}"
OPT_LANG="${OPT_LANG:-en}"
OPT_PATH="${OPT_PATH:-}"
OPT_ARTIFACTS_DIR="${OPT_ARTIFACTS_DIR:-}"
OPT_IGNORE=()
OPT_EXCLUDE=()
OPT_INCLUDE=()
opt=$(getopt -n "$0" --options "hvl:p:t:a:i:" --longoptions "help,verbose,lang:,path:,test:,artifactsdir:,ignore:" -- "$@")
opt=$(getopt -n "$0" --options "hvl:p:t:a:e:i:" --longoptions "help,verbose,lang:,path:,test:,artifactsdir:,exclude:,include:" -- "$@")
eval set -- "$opt"
while [[ $# -gt 0 ]]; do
case "$1" in
-i|--ignore)
OPT_IGNORE+=("$2")
-i|--include)
OPT_INCLUDE+=("$2")
shift 2
;;
-e|--exclude)
OPT_EXCLUDE+=("$2")
shift 2
;;
-a|--artifactsdir)
@ -75,7 +81,8 @@ fi
debug "Path: $OPT_PATH"
debug "Lang: $OPT_LANG"
debug "Artifacts dir: $OPT_ARTIFACTS_DIR"
debug "Ignore: ${OPT_IGNORE[@]}"
debug "Exclude: ${OPT_EXCLUDE[@]}"
debug "Include: ${OPT_INCLUDE[@]}"
STR_TEST_DASHED=$(echo "$OPT_PATH" | sed -e 's/\//-/g')
clean_exit() {
@ -136,13 +143,21 @@ set -f
if test -f $i; then
n=`basename $i`
set +e
contains "$n" "${OPT_IGNORE[@]}"
contains "$n" "${OPT_EXCLUDE[@]}"
ret=$?
set -e
if [ $ret -eq 1 ]; then
debug "ignoring $i"
continue
fi
set +e
contains "$n" "${OPT_INCLUDE[@]}"
ret=$?
set -e
if [ $ret -eq 0 ]; then
debug "$i isn't targeted file"
continue
fi
debug " $i"
res=`fc-validate -l $OPT_LANG $i`
if echo $res | grep -q Missing; then

@ -2,7 +2,7 @@
- block:
- name: language coverage
script: run-lang-coverage-test --lang "{{ item }}" --path "{{ path_prefix }}" --artifactsdir "{{ remote_artifacts }}" {{ "" if coverage.values is not defined or coverage[item].ignore is not defined else "--ignore " + (coverage[item].ignore | join('--ignore ')) }}
script: run-lang-coverage-test --lang "{{ item }}" --path "{{ path_prefix }}" --artifactsdir "{{ remote_artifacts }}" {{ "" if coverage.values is not defined or coverage[item].ignore is not defined else "--exclude " + (coverage[item].ignore | join('--exclude ')) }} {{ "" if coverage.values is not defined or coverage[item].include is not defined else "--include " + (coverage[item].include | join('--include ')) }}
with_items:
- "{{ coverage if coverage.keys is not defined else coverage.keys()|list }}"
- name: generic family assignment

Loading…
Cancel
Save