Skip to content

Commit 6029d20

Browse files
oech3oech3
authored andcommitted
build-gnu.sh: Fail 2 help-version*.sh instead of removing
1 parent 6c5fae7 commit 6029d20

File tree

1 file changed

+8
-11
lines changed

1 file changed

+8
-11
lines changed

util/build-gnu.sh

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -153,19 +153,21 @@ else
153153
echo "strip t${i}.sh from Makefile"
154154
"${SED}" -i -e "s/\$(tf)\/t${i}.sh//g" Makefile
155155
done
156-
157-
# Remove tests checking for --version & --help
158-
# Not really interesting for us and logs are too big
159-
"${SED}" -i -e '/tests\/help\/help-version.sh/ D' \
160-
-e '/tests\/help\/help-version-getopt.sh/ D' \
161-
Makefile
162156
touch gnu-built
163157
fi
164158

165159
grep -rl 'path_prepend_' tests/* | xargs -r "${SED}" -i 's| path_prepend_ ./src||'
166160
# path_prepend_ sets $abs_path_dir_: set it manually instead.
167161
grep -rl '\$abs_path_dir_' tests/*/*.sh | xargs -r "${SED}" -i "s|\$abs_path_dir_|${UU_BUILD_DIR//\//\\/}|g"
168162

163+
# Fail tests checking for --version & --help we can't pass producing too big logs
164+
cp -svf /usr/bin/false tests/help/help-version.sh
165+
cp -svf /usr/bin/false tests/help/help-version-getopt.sh
166+
echo Disable this test:
167+
echo "* the selinux crate is handling errors"
168+
echo '* the test says "maybe we should not fail when no context available"'
169+
cp -svf /usr/bin/true tests/cp/no-ctx.sh
170+
169171
# We can't build runcon and chcon without libselinux. But GNU no longer builds dummies of them. So consider they are SELinux specific.
170172
"${SED}" -i 's/^print_ver_.*/require_selinux_/' tests/runcon/runcon-compute.sh
171173
"${SED}" -i 's/^print_ver_.*/require_selinux_/' tests/runcon/runcon-no-reorder.sh
@@ -351,8 +353,3 @@ test \$n_stat1 -ge \$n_stat2 \\' tests/ls/stat-free-color.sh
351353
# upstream doesn't having the program name in the error message
352354
# but we do. We should keep it that way.
353355
"${SED}" -i 's/echo "changing security context/echo "chcon: changing security context/' tests/chcon/chcon.sh
354-
355-
# Disable this test, it is not relevant for us:
356-
# * the selinux crate is handling errors
357-
# * the test says "maybe we should not fail when no context available"
358-
"${SED}" -i -e "s|returns_ 1||g" tests/cp/no-ctx.sh

0 commit comments

Comments
 (0)