Skip unit tests when running coverage if CARGO_MAKE_CRATE_FS_NAME is empty.
@@ -540,6 +540,7 @@ if [ -n "$CARGO_MAKE_KCOV_EXCLUDE_REGION" ]; then
KCOV_EXCLUDE_REGION_ARG="--exclude-region=${CARGO_MAKE_KCOV_EXCLUDE_REGION}"
fi
+if [ -n "CARGO_MAKE_CRATE_FS_NAME" ]; then
echo "Running unit tests from directory: ${BINARY_DIRECTORY}"
for file in ${BINARY_DIRECTORY}/${CARGO_MAKE_CRATE_FS_NAME}*
do
@@ -548,6 +549,7 @@ do
kcov --include-pattern=${CARGO_MAKE_WORKING_DIRECTORY}/src/ "$KCOV_EXCLUDE_LINE_ARG" "$KCOV_EXCLUDE_REGION_ARG" "$TARGET_DIRECTORY" "$file" || true
fi
done
+fi
echo "Running integration tests from directory: ${BINARY_DIRECTORY}"
for file in ${BINARY_DIRECTORY}/test_*
