Skip to content

Commit

Permalink
Enable C# tests on mingw-w64
Browse files Browse the repository at this point in the history
  • Loading branch information
dra27 committed Nov 25, 2020
1 parent f2a94b1 commit 0339875
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 19 deletions.
4 changes: 2 additions & 2 deletions Changes
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ Working version
to the implementation and the coercion.
(Leandro Ostera, review by Gabriel Scherer and Thomas Refis)

- #10045: Add libext variable to ocamltest
(David Allsopp)
- #10045: Add libext variable to ocamltest and enable C# tests on on mingw
(David Allsopp, review by ???)

### Build system:

Expand Down
19 changes: 9 additions & 10 deletions ocamltest/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -52,23 +52,22 @@ endif

ifeq "$(UNIX_OR_WIN32)" "win32"
ocamlsrcdir := $(shell echo "$(abspath $(shell pwd)/..)" | cygpath -w -f -)
CSC := csc
ifeq "$(HOST:i686-%=i686)" "i686"
CSCFLAGS := /platform:x86
else
CSCFLAGS :=
endif
CSCFLAGS += /nologo /nowarn:1668
else
ocamlsrcdir := $(abspath $(shell pwd)/..)
CSC :=
CSCFLAGS :=
endif
mkexe := $(MKEXE)

ifeq "$(TOOLCHAIN)" "msvc"
CPP := $(CPP) 2> nul
CSC := csc
ifeq "$(HOST)" "i686-pc-windows"
CSCFLAGS := /platform:x86
else
CSCFLAGS :=
endif
CSCFLAGS += /nologo /nowarn:1668
else
CSC :=
CSCFLAGS :=
endif

ifeq "$(WITH_OCAMLDOC)" "ocamldoc"
Expand Down
19 changes: 12 additions & 7 deletions tools/ci/appveyor/appveyor_build.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -114,19 +114,24 @@ call :UpgradeCygwin
goto :EOF

:build
setlocal
if "%PORT%" equ "msvc64" (
setlocal
call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\amd64\vcvars64.bat"
rem Build C portions of msvc32 with an old C compiler (catches various tedious warnings)
call "C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\SetEnv.cmd" /x86
"%CYG_ROOT%\bin\bash.exe" -lc "$APPVEYOR_BUILD_FOLDER/tools/ci/appveyor/appveyor_build.sh msvc32-only" || exit /b 1
) else (
rem Build mingw32, but with a C# compiler in PATH for the testsuite
call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\vcvars32.bat"
"%CYG_ROOT%\bin\bash.exe" -lc "$APPVEYOR_BUILD_FOLDER/tools/ci/appveyor/appveyor_build.sh" || exit /b 1
)
rem Do the main build (either msvc64 or mingw32)
"%CYG_ROOT%\bin\bash.exe" -lc "$APPVEYOR_BUILD_FOLDER/tools/ci/appveyor/appveyor_build.sh" || exit /b 1

if "%PORT%" neq "msvc64" goto :EOF

rem Reconfigure the environment and run the msvc32 partial build
endlocal
call "C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\SetEnv.cmd" /x86
"%CYG_ROOT%\bin\bash.exe" -lc "$APPVEYOR_BUILD_FOLDER/tools/ci/appveyor/appveyor_build.sh msvc32-only" || exit /b 1
rem Reconfigure the environment and run the msvc64 full build
call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\amd64\vcvars64.bat"
"%CYG_ROOT%\bin\bash.exe" -lc "$APPVEYOR_BUILD_FOLDER/tools/ci/appveyor/appveyor_build.sh" || exit /b 1

goto :EOF

:test
Expand Down

0 comments on commit 0339875

Please sign in to comment.