We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9f1922b commit c71a734Copy full SHA for c71a734
util/build-run-test-coverage-linux.sh
@@ -65,8 +65,18 @@ set +x
65
run_test_and_aggregate() {
66
echo "# Running coverage tests for ${1}"
67
68
+ # Determine if sudo is needed for this utility
69
+ local SUDO_CMD=""
70
+ case "${1}" in
71
+ chroot|chown|cp|dd|install|mknod)
72
+ if command -v sudo >/dev/null 2>&1 && sudo -n true 2>/dev/null; then
73
+ SUDO_CMD="sudo -E"
74
+ fi
75
+ ;;
76
+ esac
77
+
78
# Build and run tests for the UTIL
- cargo nextest run \
79
+ ${SUDO_CMD} cargo nextest run \
80
--profile coverage \
81
--no-fail-fast \
82
--color=always \
0 commit comments