public inbox for newlib-cvs@sourceware.org
help / color / mirror / Atom feed
* [newlib-cygwin] Cygwin: teststuite: Use Busybox executables for system() tests
@ 2023-07-09 16:01 Jon Turney
  0 siblings, 0 replies; only message in thread
From: Jon Turney @ 2023-07-09 16:01 UTC (permalink / raw)
  To: cygwin-cvs, newlib-cvs

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)

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-07-09 16:01 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-07-09 16:01 [newlib-cygwin] Cygwin: teststuite: Use Busybox executables for system() tests Jon Turney

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).