Skip to content

Commit f7625bd

Browse files
committed
coreutils: Support the name *box as a workaround for *box test suite
1 parent bd88fdc commit f7625bd

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

GNUmakefile

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -362,8 +362,7 @@ $(BUILDDIR)/.config: $(BASEDIR)/.busybox-config
362362

363363
# Test under the busybox test suite
364364
$(BUILDDIR)/busybox: busybox-src build-coreutils $(BUILDDIR)/.config
365-
@echo -e '#!/bin/sh\nexec env -a coreutils `dirname "$0"`/coreutils "$@"' > "$(BUILDDIR)/busybox.sh"
366-
$(INSTALL) -m 755 "$(BUILDDIR)/busybox.sh" "$(BUILDDIR)/busybox"
365+
$(INSTALL) -m 755 "$(BUILDDIR)/coreutils" "$(BUILDDIR)/busybox"
367366

368367
prepare-busytest: $(BUILDDIR)/busybox
369368
# disable inapplicable tests

src/bin/coreutils.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,8 @@ fn main() {
6565
if let Some(util) = validation::find_prefixed_util(binary_as_util, utils.keys().copied()) {
6666
// prefixed util => replace 0th (aka, executable name) argument
6767
Some(OsString::from(util))
68-
} else if binary_as_util.ends_with("utils") {
68+
} else if binary_as_util.ends_with("utils") || binary_as_util.ends_with("box") {
69+
// todo: Remove support of "*box" from binary
6970
uucore::set_utility_is_second_arg();
7071
args.next()
7172
} else {

0 commit comments

Comments
 (0)