Skip to content

Commit

Permalink
Run more native-only tests when native mode
Browse files Browse the repository at this point in the history
  • Loading branch information
Jonah Beckford committed Sep 7, 2023
1 parent 2272aab commit e33e451
Showing 1 changed file with 28 additions and 28 deletions.
56 changes: 28 additions & 28 deletions pkg/bump/WindowsSandbox/test.in.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -15,44 +15,44 @@ if %errorlevel% neq 0 exit /b %errorlevel%
REM Once ocaml has a shim:
REM - ocaml script1/script.ocamlinit

if not exist "%TEMP%\scratch2" mkdir %TEMP%\scratch2
pushd %TEMP%\scratch2

dkml init --yes

REM install something with a low number of dependencies, that sufficiently exercises Opam
opam install graphics --yes
if %errorlevel% neq 0 popd & exit /b %errorlevel%

REM regression test: https://discuss.ocaml.org/t/ann-diskuv-ocaml-1-x-x-windows-ocaml-installer-no-longer-in-preview/10309/8?u=jbeckford
opam install ppx_jane --yes
if %errorlevel% neq 0 popd & exit /b %errorlevel%

REM regression test: https://github.com/diskuv/dkml-installer-ocaml/issues/12
opam install pyml --yes
if %errorlevel% neq 0 popd & exit /b %errorlevel%

REM regression test: https://github.com/diskuv/dkml-installer-ocaml/issues/21
opam install ocaml-lsp-server merlin --yes
if %errorlevel% neq 0 popd & exit /b %errorlevel%

opam install ocamlformat --yes
if %errorlevel% neq 0 popd & exit /b %errorlevel%

CALL %LOCALAPPDATA%\Programs\DiskuvOCaml\dkmlvars.cmd
if %DiskuvOCamlMode% == "byte" (
if "%DiskuvOCamlMode%" == "byte" (
REM Dune as of 3.8.3 requires explicit xxx.bc on the command line or else
REM it will do -output-complete-exe which requires a C linker
dune build --root %TEMP%\scratch1\proj1 ./a.bc
if %errorlevel% neq 0 exit /b %errorlevel%
ocamlrun %TEMP%\scratch1\proj1\_build\default\a.bc
if %errorlevel% neq 0 exit /b %errorlevel%
)
if %DiskuvOCamlMode% == "native" (
if "%DiskuvOCamlMode%" == "native" (
if not exist "%TEMP%\scratch2" mkdir %TEMP%\scratch2
pushd %TEMP%\scratch2

dkml init --yes

REM install something with a low number of dependencies, that sufficiently exercises Opam
opam install graphics --yes
if %errorlevel% neq 0 popd & exit /b %errorlevel%

REM regression test: https://discuss.ocaml.org/t/ann-diskuv-ocaml-1-x-x-windows-ocaml-installer-no-longer-in-preview/10309/8?u=jbeckford
opam install ppx_jane --yes
if %errorlevel% neq 0 popd & exit /b %errorlevel%

REM regression test: https://github.com/diskuv/dkml-installer-ocaml/issues/12
opam install pyml --yes
if %errorlevel% neq 0 popd & exit /b %errorlevel%

REM regression test: https://github.com/diskuv/dkml-installer-ocaml/issues/21
opam install ocaml-lsp-server merlin --yes
if %errorlevel% neq 0 popd & exit /b %errorlevel%

opam install ocamlformat --yes
if %errorlevel% neq 0 popd & exit /b %errorlevel%

dune build --root %TEMP%\scratch1\proj2
if %errorlevel% neq 0 exit /b %errorlevel%
dune exec --root %TEMP%\scratch1\proj2 ./best.exe
if %errorlevel% neq 0 exit /b %errorlevel%
)

popd
popd
)

0 comments on commit e33e451

Please sign in to comment.