mirror of
https://github.com/uutils/coreutils
synced 2024-11-10 15:14:24 +00:00
maint/polish ~ (util) shfmt -w -i=4 -ci
This commit is contained in:
parent
3a13857dc3
commit
fdd11e0637
4 changed files with 23 additions and 20 deletions
|
@ -12,7 +12,7 @@ ME_dir="$(dirname -- "$(readlink -fm -- "$0")")"
|
|||
REPO_main_dir="$(dirname -- "${ME_dir}")"
|
||||
|
||||
cd "${REPO_main_dir}" &&
|
||||
echo "[ \"$PWD\" ]"
|
||||
echo "[ \"$PWD\" ]"
|
||||
|
||||
#shellcheck disable=SC2086
|
||||
UTIL_LIST=$("${ME_dir}"/show-utils.sh ${FEATURES_OPTION})
|
||||
|
@ -26,13 +26,14 @@ done
|
|||
# cargo clean
|
||||
|
||||
export CARGO_INCREMENTAL=0
|
||||
export RUSTC_WRAPPER="" ## NOTE: RUSTC_WRAPPER=='sccache' breaks code coverage calculations (uu_*.gcno files are not created during build)
|
||||
export RUSTC_WRAPPER="" ## NOTE: RUSTC_WRAPPER=='sccache' breaks code coverage calculations (uu_*.gcno files are not created during build)
|
||||
# export RUSTFLAGS="-Zprofile -Ccodegen-units=1 -Copt-level=0 -Clink-dead-code -Coverflow-checks=off -Zno-landing-pads"
|
||||
export RUSTFLAGS="-Zprofile -Ccodegen-units=1 -Copt-level=0 -Clink-dead-code -Coverflow-checks=off -Zpanic_abort_tests -Cpanic=abort"
|
||||
export RUSTDOCFLAGS="-Cpanic=abort"
|
||||
export RUSTUP_TOOLCHAIN="nightly-gnu"
|
||||
#shellcheck disable=SC2086
|
||||
{ cargo build ${FEATURES_OPTION}
|
||||
{
|
||||
cargo build ${FEATURES_OPTION}
|
||||
cargo test --no-run ${FEATURES_OPTION}
|
||||
cargo test --quiet ${FEATURES_OPTION}
|
||||
cargo test --quiet ${FEATURES_OPTION} ${CARGO_INDIVIDUAL_PACKAGE_OPTIONS}
|
||||
|
@ -55,4 +56,4 @@ if genhtml --version 2>/dev/null 1>&2; then
|
|||
else
|
||||
grcov . --output-type html --output-path "${COVERAGE_REPORT_DIR}" --branch --ignore build.rs --ignore '/*' --ignore '[A-Za-z]:/*' --ignore 'C:/Users/*' --excl-br-line '^\s*((debug_)?assert(_eq|_ne)?!|#\[derive\()'
|
||||
fi
|
||||
if [ $? -ne 0 ]; then exit 1 ; fi
|
||||
if [ $? -ne 0 ]; then exit 1; fi
|
||||
|
|
|
@ -3,11 +3,12 @@ set -e
|
|||
|
||||
ARG=""
|
||||
if test "$1" != "--do-it"; then
|
||||
ARG="--dry-run --allow-dirty"
|
||||
ARG="--dry-run --allow-dirty"
|
||||
fi
|
||||
|
||||
for dir in src/uucore/ src/uucore_procs/ src/uu/stdbuf/src/libstdbuf/ ; do
|
||||
( cd "$dir"
|
||||
for dir in src/uucore/ src/uucore_procs/ src/uu/stdbuf/src/libstdbuf/; do
|
||||
(
|
||||
cd "$dir"
|
||||
#shellcheck disable=SC2086
|
||||
cargo publish $ARG
|
||||
)
|
||||
|
@ -16,7 +17,8 @@ done
|
|||
|
||||
PROGS=$(ls -1d src/uu/*/)
|
||||
for p in $PROGS; do
|
||||
( cd "$p"
|
||||
(
|
||||
cd "$p"
|
||||
#shellcheck disable=SC2086
|
||||
cargo publish $ARG
|
||||
)
|
||||
|
|
|
@ -7,9 +7,9 @@ REPO_main_dir="$(dirname -- "${ME_dir}")"
|
|||
|
||||
export COVERAGE_REPORT_DIR="${REPO_main_dir}/target/debug/coverage-nix"
|
||||
|
||||
if ! "${ME_dir}/build-code_coverage.sh"; then exit 1 ; fi
|
||||
if ! "${ME_dir}/build-code_coverage.sh"; then exit 1; fi
|
||||
|
||||
case ";$OSID_tags;" in
|
||||
*";wsl;"* ) powershell.exe -c "$(wslpath -w "${COVERAGE_REPORT_DIR}"/index.html)" ;;
|
||||
* ) xdg-open --version >/dev/null 2>&1 && xdg-open "${COVERAGE_REPORT_DIR}"/index.html || echo "report available at '\"${COVERAGE_REPORT_DIR}\"/index.html'" ;;
|
||||
esac ;
|
||||
*";wsl;"*) powershell.exe -c "$(wslpath -w "${COVERAGE_REPORT_DIR}"/index.html)" ;;
|
||||
*) xdg-open --version >/dev/null 2>&1 && xdg-open "${COVERAGE_REPORT_DIR}"/index.html || echo "report available at '\"${COVERAGE_REPORT_DIR}\"/index.html'" ;;
|
||||
esac
|
||||
|
|
|
@ -17,11 +17,11 @@ project_main_dir="${ME_parent_dir_abs}"
|
|||
# printf 'project_main_dir="%s"\n' "${project_main_dir}"
|
||||
cd "${project_main_dir}" &&
|
||||
|
||||
# `jq` available?
|
||||
if ! jq --version 1>/dev/null 2>&1; then
|
||||
echo "WARN: missing \`jq\` (install with \`sudo apt install jq\`); falling back to default (only fully cross-platform) utility list" 1>&2
|
||||
echo "$default_utils"
|
||||
else
|
||||
cargo metadata "$*" --format-version 1 | jq -r "[.resolve.nodes[] | { id: .id, deps: [.deps[] | { name:.name, pkg:.pkg }] }] | .[] | select(.id|startswith(\"coreutils\")) | [.deps[] | select((.name|startswith(\"uu_\")) or (.pkg|startswith(\"uu_\")))] | [.[].pkg | match(\"^\\\w+\";\"g\")] | [.[].string | sub(\"^uu_\"; \"\")] | sort | join(\" \")"
|
||||
# cargo metadata "$*" --format-version 1 | jq -r "[.resolve.nodes[] | { id: .id, deps: [.deps[] | { name:.name, pkg:.pkg }] }] | .[] | select(.id|startswith(\"coreutils\")) | [.deps[] | select((.name|startswith(\"uu_\")) or (.pkg|startswith(\"uu_\")))] | [.[].pkg | match(\"^\\\w+\";\"g\")] | [.[].string] | sort | join(\" \")"
|
||||
fi
|
||||
# `jq` available?
|
||||
if ! jq --version 1>/dev/null 2>&1; then
|
||||
echo "WARN: missing \`jq\` (install with \`sudo apt install jq\`); falling back to default (only fully cross-platform) utility list" 1>&2
|
||||
echo "$default_utils"
|
||||
else
|
||||
cargo metadata "$*" --format-version 1 | jq -r "[.resolve.nodes[] | { id: .id, deps: [.deps[] | { name:.name, pkg:.pkg }] }] | .[] | select(.id|startswith(\"coreutils\")) | [.deps[] | select((.name|startswith(\"uu_\")) or (.pkg|startswith(\"uu_\")))] | [.[].pkg | match(\"^\\\w+\";\"g\")] | [.[].string | sub(\"^uu_\"; \"\")] | sort | join(\" \")"
|
||||
# cargo metadata "$*" --format-version 1 | jq -r "[.resolve.nodes[] | { id: .id, deps: [.deps[] | { name:.name, pkg:.pkg }] }] | .[] | select(.id|startswith(\"coreutils\")) | [.deps[] | select((.name|startswith(\"uu_\")) or (.pkg|startswith(\"uu_\")))] | [.[].pkg | match(\"^\\\w+\";\"g\")] | [.[].string] | sort | join(\" \")"
|
||||
fi
|
||||
|
|
Loading…
Reference in a new issue