summaryrefslogtreecommitdiff
path: root/infra/command
diff options
context:
space:
mode:
Diffstat (limited to 'infra/command')
-rw-r--r--infra/command/format6
-rw-r--r--infra/command/gen-coverage-report4
2 files changed, 4 insertions, 6 deletions
diff --git a/infra/command/format b/infra/command/format
index 5cf9606fa..993a6ad5a 100644
--- a/infra/command/format
+++ b/infra/command/format
@@ -154,11 +154,9 @@ function check_python_files() {
fi
# Check python files
- FILES_TO_CHECK_PYTHON=`echo "$FILES_TO_CHECK" | tr ' ' '\n' | egrep '\.py$'`
+ FILES_TO_CHECK_PYTHON=(`echo "$FILES_TO_CHECK" | tr ' ' '\n' | egrep '\.py$'`)
# Exceptional case: one-cmds don't have '.py' extension: ignore non-python source (cmake, etc) and ignore shell script: one-prepare-venv
- FILES_TO_CHECK_PYTHON=`echo "$FILES_TO_CHECK_PYTHON" | egrep -v '^compiler/one-cmds/.*\..*$' | egrep -v '^compiler/one-cmds/one-prepare-venv$'`
- # Transform to array
- FILES_TO_CHECK_PYTHON=($FILES_TO_CHECK_PYTHON)
+ FILES_TO_CHECK_PYTHON+=(`echo "$FILES_TO_CHECK" | tr ' ' '\n' | egrep '^compiler/one-cmds/[^(\./)]*$' | egrep -v '^compiler/one-cmds/one-prepare-venv$'`)
for s in ${DIRECTORIES_NOT_TO_BE_TESTED[@]}; do
skip=${s#'.'/}/
diff --git a/infra/command/gen-coverage-report b/infra/command/gen-coverage-report
index 3058aee9a..df6377d2a 100644
--- a/infra/command/gen-coverage-report
+++ b/infra/command/gen-coverage-report
@@ -69,10 +69,10 @@ done
opencl_files=($(find ./runtime/onert/backend/gpu_cl/open_cl/ \( -name "*.cc" -o -name "*.h" \) -exec realpath {} \; ))
-# Exclude *.test.cpp files from coverage report
+# Exclude test files from coverage report
# Exclude flatbuffer generated files from coverage report
"${LCOV_PATH}" -r "${EXTRACTED_COVERAGE_INFO_PATH}" -o "${EXCLUDED_COVERAGE_INFO_PATH}" \
- '*.test.cpp' '*_schema_generated.h' "${opencl_files[@]}"
+ '*.test.cpp' '*.test.cc' '*/test/*' '*/tests/*' '*_schema_generated.h' "${opencl_files[@]}"
# Final coverage data
cp -v ${EXCLUDED_COVERAGE_INFO_PATH} ${COVERAGE_INFO_PATH}