diff options
author | Jon Turney <jon.turney@dronecode.org.uk> | 2023-07-04 13:59:14 +0100 |
---|---|---|
committer | Jon Turney <jon.turney@dronecode.org.uk> | 2023-07-14 14:02:37 +0100 |
commit | e8c1a579cdc5fc71b1aac1e747f6b10d4a1e8fd6 (patch) | |
tree | 229f30b5a8eabf9fe3ad1f0e79757e7cd545338e /winsup/testsuite | |
parent | b7c3a63bb3c4dab861b2bce8793b8dfb36151799 (diff) | |
download | newlib-e8c1a579cdc5fc71b1aac1e747f6b10d4a1e8fd6.zip newlib-e8c1a579cdc5fc71b1aac1e747f6b10d4a1e8fd6.tar.gz newlib-e8c1a579cdc5fc71b1aac1e747f6b10d4a1e8fd6.tar.bz2 |
Cygwin: testsuite: Setup test prereqs in 'installation' the tests run in
Do some setup in the Cygwin 'installation' at testsuite/testinst/:
* Ensure /tmp exists
* Use BusyBox to provide executables needed by tests which use system()
(sh, sleep, ls)
This enables tests which use system(), or require /tmp to exist to pass.
Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk>
Diffstat (limited to 'winsup/testsuite')
-rw-r--r-- | winsup/testsuite/Makefile.am | 25 |
1 files changed, 24 insertions, 1 deletions
diff --git a/winsup/testsuite/Makefile.am b/winsup/testsuite/Makefile.am index 7853d98..11332ed 100644 --- a/winsup/testsuite/Makefile.am +++ b/winsup/testsuite/Makefile.am @@ -339,7 +339,7 @@ testdll_tmpdir = $(shell cygpath -ma $(tmpdir) | sed -e 's#^\([A-Z]\):#/cygdrive site-extra.exp: ../config.status Makefile @rm -f ./tmp0 - @echo "set runtime_root \"`pwd`/runtime\"" >> ./tmp0 + @echo "set runtime_root \"`pwd`/testinst/bin\"" >> ./tmp0 @echo "set tmpdir $(tmpdir)" >> ./tmp0 @echo "set testdll_tmpdir $(testdll_tmpdir)" >> ./tmp0 @echo "set cygrun \"`pwd`/mingw/cygrun\"" >> ./tmp0 @@ -347,6 +347,29 @@ site-extra.exp: ../config.status Makefile EXTRA_DEJAGNU_SITE_CONFIG = site-extra.exp +# Set up things in the Cygwin 'installation' at testsuite/testinst/ to provide +# things which tests need to work +# +# * 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/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. +# +# use busybox executables as they don't have any other shared library +# dependencies other than cygwin1.dll. +# + +check-local: + $(MKDIR_P) ${builddir}/testinst/tmp + 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) |