Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"style(util): fix/format scripts to meet the shellcheck/shfmt rules" #5090

Merged
merged 1 commit into from Jul 17, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
18 changes: 11 additions & 7 deletions util/analyze-gnu-results.sh
@@ -1,4 +1,4 @@
#!/bin/sh
#!/bin/bash
# spell-checker:ignore xpass XPASS testsuite
set -e

Expand Down Expand Up @@ -67,9 +67,13 @@ function get_error {
echo $((NON_ROOT + AS_ROOT))
}

export TOTAL=$(get_total)
export PASS=$(get_pass)
export SKIP=$(get_skip)
export FAIL=$(get_fail)
export XPASS=$(get_xpass)
export ERROR=$(get_error)
# we don't need the return codes indeed, ignore them
# shellcheck disable=SC2155
{
export TOTAL=$(get_total)
export PASS=$(get_pass)
export SKIP=$(get_skip)
export FAIL=$(get_fail)
export XPASS=$(get_xpass)
export ERROR=$(get_error)
}
1 change: 0 additions & 1 deletion util/build-gnu.sh
Expand Up @@ -215,7 +215,6 @@ sed -i -e "s/provoked error./provoked error\ncat pat |sort -u > pat/" tests/misc
# Update the GNU error message to match ours
sed -i -e "s/link-to-dir: hard link not allowed for directory/failed to create hard link 'link-to-dir' =>/" -e "s|link-to-dir/: hard link not allowed for directory|failed to create hard link 'link-to-dir/' =>|" tests/ln/hard-to-sym.sh


# GNU sleep accepts some crazy string, not sure we should match this behavior
sed -i -e "s/timeout 10 sleep 0x.002p1/#timeout 10 sleep 0x.002p1/" tests/misc/sleep.sh

Expand Down
6 changes: 3 additions & 3 deletions util/run-gnu-test.sh
Expand Up @@ -36,7 +36,7 @@ if test $# -ge 1; then
SPECIFIC_TESTS="$SPECIFIC_TESTS $t"
done
# trim it
SPECIFIC_TESTS=$(echo $SPECIFIC_TESTS| xargs)
SPECIFIC_TESTS=$(echo $SPECIFIC_TESTS | xargs)
echo "Running specific tests: $SPECIFIC_TESTS"
fi

Expand All @@ -46,14 +46,14 @@ fi
#shellcheck disable=SC2086

if test "$1" != "run-root"; then
# run the regular tests
# run the regular tests
if test $# -ge 1; then
timeout -sKILL 4h make -j "$(nproc)" check TESTS="$SPECIFIC_TESTS" SUBDIRS=. RUN_EXPENSIVE_TESTS=yes RUN_VERY_EXPENSIVE_TESTS=yes VERBOSE=no gl_public_submodule_commit="" srcdir="${path_GNU}" || : # Kill after 4 hours in case something gets stuck in make
else
timeout -sKILL 4h make -j "$(nproc)" check SUBDIRS=. RUN_EXPENSIVE_TESTS=yes RUN_VERY_EXPENSIVE_TESTS=yes VERBOSE=no gl_public_submodule_commit="" srcdir="${path_GNU}" || : # Kill after 4 hours in case something gets stuck in make
fi
else
# in case we would like to run tests requiring root
# in case we would like to run tests requiring root
if test -z "$1" -o "$1" == "run-root"; then
if test -n "$CI"; then
echo "Running check-root to run only root tests"
Expand Down
1 change: 0 additions & 1 deletion util/update-version.sh
Expand Up @@ -47,4 +47,3 @@ sed -i -e "s|uucore = { version=\">=$FROM\",|uucore = { version=\">=$TO\",|" $PR
# Update crates using uucore_procs
#shellcheck disable=SC2086
sed -i -e "s|uucore_procs = { version=\">=$FROM\",|uucore_procs = { version=\">=$TO\",|" $PROGS