Skip to content

Commit 07b68ee

Browse files
authored
Merge pull request #8380 from drinkcat/cp-preserve-gid
tests/cp/preserve-gid: Partial fix
2 parents 5a322e1 + 58095fa commit 07b68ee

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

util/build-gnu.sh

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -166,12 +166,12 @@ if test -f gnu-built; then
166166
else
167167
# Disable useless checks
168168
sed -i 's|check-texinfo: $(syntax_checks)|check-texinfo:|' doc/local.mk
169+
# Change the PATH to test the uutils coreutils instead of the GNU coreutils
170+
sed -i "s/^[[:blank:]]*PATH=.*/ PATH='${UU_BUILD_DIR//\//\\/}\$(PATH_SEPARATOR)'\"\$\$PATH\" \\\/" tests/local.mk
169171
./bootstrap --skip-po
170172
./configure --quiet --disable-gcc-warnings --disable-nls --disable-dependency-tracking --disable-bold-man-page-references
171173
#Add timeout to to protect against hangs
172174
sed -i 's|^"\$@|'"${SYSTEM_TIMEOUT}"' 600 "\$@|' build-aux/test-driver
173-
# Change the PATH in the Makefile to test the uutils coreutils instead of the GNU coreutils
174-
sed -i "s/^[[:blank:]]*PATH=.*/ PATH='${UU_BUILD_DIR//\//\\/}\$(PATH_SEPARATOR)'\"\$\$PATH\" \\\/" Makefile
175175
sed -i 's| tr | /usr/bin/tr |' tests/init.sh
176176
# Use a better diff
177177
sed -i 's|diff -c|diff -u|g' tests/Coreutils.pm
@@ -200,7 +200,9 @@ else
200200
touch gnu-built
201201
fi
202202

203-
grep -rl 'path_prepend_' tests/* | xargs sed -i 's| path_prepend_ ./src||'
203+
grep -rl 'path_prepend_' tests/* | xargs -r sed -i 's| path_prepend_ ./src||'
204+
# path_prepend_ sets $abs_path_dir_: set it manually instead.
205+
grep -rl '\$abs_path_dir_' tests/*/*.sh | xargs -r sed -i "s|\$abs_path_dir_|${UU_BUILD_DIR//\//\\/}|g"
204206

205207
# Use the system coreutils where the test fails due to error in a util that is not the one being tested
206208
sed -i "s|grep '^#define HAVE_CAP 1' \$CONFIG_HEADER > /dev/null|true|" tests/ls/capability.sh

0 commit comments

Comments
 (0)