Skip to content

Commit c0f0fc7

Browse files
oech3oech3
authored andcommitted
build-gnu.sh: Remove a hack to force-enable tests & some fix
1 parent d614057 commit c0f0fc7

1 file changed

Lines changed: 2 additions & 6 deletions

File tree

util/build-gnu.sh

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
# spell-checker:ignore (paths) abmon deref discrim eacces getlimits getopt ginstall inacc infloop inotify reflink ; (misc) INT_OFLOW OFLOW
66
# spell-checker:ignore baddecode submodules xstrtol distros ; (vars/env) SRCDIR vdir rcexp xpart dired OSTYPE ; (utils) greadlink gsed multihardlink texinfo CARGOFLAGS
77
# spell-checker:ignore openat TOCTOU CFLAGS
8-
# spell-checker:ignore hfsplus casefold chattr
98

109
set -e
1110

@@ -128,7 +127,7 @@ else
128127
"${SED}" -i 's|check-texinfo: $(syntax_checks)|check-texinfo:|' doc/local.mk
129128
# Use CFLAGS for best build time since we discard GNU coreutils
130129
CFLAGS="${CFLAGS} -pipe -O0 -s" ./configure -C --quiet --disable-gcc-warnings --disable-nls --disable-dependency-tracking --disable-bold-man-page-references \
131-
--enable-single-binary=symlinks \
130+
--enable-single-binary=symlinks --enable-install-program="arch,kill,uptime,hostname" \
132131
"$([ "${SELINUX_ENABLED}" = 1 ] && echo --with-selinux || echo --without-selinux)"
133132
#Add timeout to to protect against hangs
134133
"${SED}" -i 's|^"\$@|'"${SYSTEM_TIMEOUT}"' 600 "\$@|' build-aux/test-driver
@@ -168,7 +167,7 @@ grep -rl 'path_prepend_' tests/* | xargs -r "${SED}" -i 's| path_prepend_ ./src|
168167
grep -rl '\$abs_path_dir_' tests/*/*.sh | xargs -r "${SED}" -i "s|\$abs_path_dir_|${UU_BUILD_DIR//\//\\/}|g"
169168

170169
# We can't build runcon and chcon without libselinux. But GNU no longer builds dummies of them. So consider they are SELinux specific.
171-
"${SED}" -i 's/^print_ver_.*/require_selinux_/' tests/runcon/runcon-compute.sh
170+
#"${SED}" -i 's/^print_ver_.*/require_selinux_/' tests/runcon/runcon-compute.sh #this test incorrectly passes with false symlink
172171
"${SED}" -i 's/^print_ver_.*/require_selinux_/' tests/runcon/runcon-no-reorder.sh
173172
"${SED}" -i 's/^print_ver_.*/require_selinux_/' tests/chcon/chcon-fail.sh
174173

@@ -249,9 +248,6 @@ sed -i -e "s|---dis ||g" tests/tail/overlay-headers.sh
249248
"${SED}" -i "s/ {ERR=>\"\$prog: foobar\\\\n\" \. \$try_help }/ {ERR=>\"error: unexpected argument '--foobar' found\n\n tip: to pass '--foobar' as a value, use '-- --foobar'\n\nUsage: basenc [OPTION]... [FILE]\n\nFor more information, try '--help'.\n\"}]/" tests/basenc/basenc.pl
250249
"${SED}" -i "s/ {ERR_SUBST=>\"s\/(unrecognized|unknown) option \[-' \]\*foobar\[' \]\*\/foobar\/\"}],//" tests/basenc/basenc.pl
251250

252-
# Remove the check whether a util was built. Otherwise tests against utils like "arch" are not run.
253-
"${SED}" -i "s|require_built_ |# require_built_ |g" init.cfg
254-
255251
# exit early for the selinux check. The first is enough for us.
256252
"${SED}" -i "s|# Independent of whether SELinux|return 0\n #|g" init.cfg
257253

0 commit comments

Comments
 (0)