From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2201) id 944B93858C2C; Sun, 9 Jul 2023 16:01:19 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 944B93858C2C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1688918479; bh=KPn10BQetNCPusrAknHykxy6on/sqU5xD2+rfdblwck=; h=From:To:Subject:Date:From; b=qZfWcaBdXcUKDBTdPi+NDnRseH1sOiS3JyAG9T8Y6O/4Hf8lUoLZZearAZ5l55cTS 4RuDdx7arn5EYXZsAYqTc59Ea4vpvyQkZSts93W8UpxOlE4RWcvteRaaLSlOmyCyUS tp8hmf39CPH0IKJe+0Rz1z7RxLM7lUPhfnsf0KRo= Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: Jon Turney To: cygwin-cvs@sourceware.org, newlib-cvs@sourceware.org Subject: [newlib-cygwin] Cygwin: testsuite: setup test installation X-Act-Checkin: newlib-cygwin X-Git-Author: Jon Turney X-Git-Refname: refs/heads/master X-Git-Oldrev: e38f91d5a96c4554c69c833243e5afec8e3e90eb X-Git-Newrev: 11873f3b1ef94db95b7d3da634471e7e05a86278 Message-Id: <20230709160119.944B93858C2C@sourceware.org> Date: Sun, 9 Jul 2023 16:01:19 +0000 (GMT) List-Id: https://sourceware.org/git/gitweb.cgi?p=3Dnewlib-cygwin.git;h=3D11873f3b1ef= 94db95b7d3da634471e7e05a86278 commit 11873f3b1ef94db95b7d3da634471e7e05a86278 Author: Jon Turney Date: Tue Jul 4 13:59:14 2023 +0100 Cygwin: testsuite: setup test installation =20 Do some set up in the Cygwin 'installation' at testsuite/testinst/ to provide things which tests need to work: Diff: --- .github/workflows/cygwin.yml | 2 +- winsup/cygwin/Makefile.am | 4 ++-- winsup/testsuite/Makefile.am | 14 +++++++++++++- 3 files changed, 16 insertions(+), 4 deletions(-) diff --git a/.github/workflows/cygwin.yml b/.github/workflows/cygwin.yml index 575ff1fdc..d1b32f823 100644 --- a/.github/workflows/cygwin.yml +++ b/.github/workflows/cygwin.yml @@ -116,6 +116,6 @@ jobs: export PATH=3D/usr/bin:$(cygpath ${SYSTEMROOT})/system32 && export MAKEFLAGS=3D-j$(nproc) && cd build && - (export PATH=3D${{ matrix.target }}/winsup/testsuite/runtime:${PAT= H} && cmd /c $(cygpath -wa ${{ matrix.target }}/winsup/cygserver/cygserver)= &) && + (export PATH=3D${{ matrix.target }}/winsup/testsuite/testinst/bin:= ${PATH} && cmd /c $(cygpath -wa ${{ matrix.target }}/winsup/cygserver/cygse= rver) &) && (cd ${{ matrix.target }}/winsup; make check || true) shell: C:\cygwin\bin\bash.exe --noprofile --norc -eo pipefail '{0}' diff --git a/winsup/cygwin/Makefile.am b/winsup/cygwin/Makefile.am index c34ca6ddc..bfb5ead10 100644 --- a/winsup/cygwin/Makefile.am +++ b/winsup/cygwin/Makefile.am @@ -602,8 +602,8 @@ $(NEW_DLL_NAME): $(LDSCRIPT) libdll.a $(VERSION_OFILES)= $(LIBSERVER)\ $(newlib_build)/libm.a \ $(newlib_build)/libc.a \ -lgcc -lkernel32 -lntdll -Wl,-Map,cygwin.map - @$(MKDIR_P) ${target_builddir}/winsup/testsuite/runtime/ - $(AM_V_at)$(INSTALL_PROGRAM) $(NEW_DLL_NAME) ${target_builddir}/winsup/te= stsuite/runtime/$(DLL_NAME) + @$(MKDIR_P) ${target_builddir}/winsup/testsuite/testinst/bin/ + $(AM_V_at)$(INSTALL_PROGRAM) $(NEW_DLL_NAME) ${target_builddir}/winsup/te= stsuite/testinst/bin/$(DLL_NAME) =20 # cygwin import library toolopts=3D--cpu=3D@target_cpu@ --ar=3D@AR@ --as=3D@AS@ --nm=3D@NM@ --objc= opy=3D@OBJCOPY@ diff --git a/winsup/testsuite/Makefile.am b/winsup/testsuite/Makefile.am index 7853d98e8..577c32370 100644 --- a/winsup/testsuite/Makefile.am +++ b/winsup/testsuite/Makefile.am @@ -339,7 +339,7 @@ testdll_tmpdir =3D $(shell cygpath -ma $(tmpdir) | sed = -e 's#^\([A-Z]\):#/cygdrive =20 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,18 @@ site-extra.exp: ../config.status Makefile =20 EXTRA_DEJAGNU_SITE_CONFIG =3D site-extra.exp =20 +# Set up things in the Cygwin 'installation' at testsuite/testinst/ to pro= vide +# 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') +# +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 + # target to build all the programs needed by check, without running check check_programs: $(check_PROGRAMS)