[newlib-cygwin] Cygwin: teststuite: Use Busybox executables for system() tests
Jon Turney
jturney@sourceware.org
Sun Jul 9 16:01:54 GMT 2023
https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=4b54e1a1656cadb6bc8af971e6a023f882ce158d
commit 4b54e1a1656cadb6bc8af971e6a023f882ce158d
Author: Jon Turney <jon.turney@dronecode.org.uk>
Date: Sun Jul 9 12:12:50 2023 +0100
Cygwin: teststuite: Use Busybox executables for system() tests
Use BusyBox to provide executables needed by tests which use system().
Diff:
---
.github/workflows/cygwin.yml | 1 +
winsup/testsuite/Makefile.am | 13 ++++++++++---
2 files changed, 11 insertions(+), 3 deletions(-)
diff --git a/.github/workflows/cygwin.yml b/.github/workflows/cygwin.yml
index d1b32f823..248a3e4cd 100644
--- a/.github/workflows/cygwin.yml
+++ b/.github/workflows/cygwin.yml
@@ -71,6 +71,7 @@ jobs:
packages: >-
autoconf,
automake,
+ busybox,
cocom,
dblatex,
dejagnu,
diff --git a/winsup/testsuite/Makefile.am b/winsup/testsuite/Makefile.am
index 824bf3361..aa39f6ce1 100644
--- a/winsup/testsuite/Makefile.am
+++ b/winsup/testsuite/Makefile.am
@@ -355,12 +355,19 @@ EXTRA_DEJAGNU_SITE_CONFIG = site-extra.exp
#
# * Create /tmp
# * Ensure there is a /usr/bin/sh for tests which use system()
-# * Ensure there is a /usr/bin/sleep for tests which use system('sleep 10')
+# * Ensure there is a /usr/bin/sleep for tests which use system("sleep 10")
+# * Ensure there is a /usr/bin/ls for tests which use system("ls")
#
+# copy to avoid all the complexities: hardlink will fail if builddir is on a
+# separate filesystem, symlink would need to be constructed with regard to the
+# mounts of the test installation, and making it into /bin/ will cause
+# CreateProcess() to load cygwin1.dll from there.
+
check-local:
$(MKDIR_P) ${builddir}/testinst/tmp
- cd ${builddir}/testinst/bin && ln -sf /usr/bin/dash.exe sh.exe
- cd ${builddir}/testinst/bin && ln -sf /usr/bin/sleep.exe sleep.exe
+ cd ${builddir}/testinst/bin && cp /usr/libexec/busybox/bin/busybox.exe sh.exe
+ cd ${builddir}/testinst/bin && cp /usr/libexec/busybox/bin/busybox.exe sleep.exe
+ cd ${builddir}/testinst/bin && cp /usr/libexec/busybox/bin/busybox.exe ls.exe
# target to build all the programs needed by check, without running check
check_programs: $(check_PROGRAMS)
More information about the Cygwin-cvs
mailing list