Skip to content

alcotest_stubs.c compile with MSVC - #369

Merged
samoht merged 1 commit into
mirage:mainfrom
jonahbeckford:fix-msvc
Feb 24, 2023
Merged

samoht merged 1 commit into
mirage:mainfrom
jonahbeckford:fix-msvc

Conversation

@jonahbeckford

Copy link
Copy Markdown
Contributor

unistd.h is not present in Windows SDK (MSVC) and usually unnecessary.

Before:

========= [TROUBLESHOOTING] alcotest-3480-337052.out ===========

[alcotest-3480-337052.out] File "src/alcotest/dune", line 6, characters 9-23:
[alcotest-3480-337052.out] 6 |   (names alcotest_stubs))
[alcotest-3480-337052.out]              ^^^^^^^^^^^^^^
[alcotest-3480-337052.out] (cd _build/default/src/alcotest && "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.25.28610\bin\HostX64\x64\cl.exe" -nologo -O2 -Gy- -MD -D_CRT_SECURE_NO_DEPRECATE -nologo -O2 -Gy- -MD -I D:/.opam/dkml/lib/ocaml -I D:\.opam\dkml\lib\astring -I D:\.opam\dkml\lib\fmt -I ../alcotest-engine /Foalcotest_stubs.obj -c alcotest_stubs.c)
[alcotest-3480-337052.out] alcotest_stubs.c
[alcotest-3480-337052.out] alcotest_stubs.c(4): fatal error C1083: Cannot open include file: 'unistd.h': No such file or directory

@samoht

samoht commented Feb 24, 2023

Copy link
Copy Markdown
Member

Thanks! I trust @TheLortex and @MisterDA on this :-)

@samoht
samoht merged commit 688cbe1 into mirage:main Feb 24, 2023
samoht added a commit to samoht/opam-repository that referenced this pull request Feb 24, 2023
…d alcotest-async (1.7.0)

CHANGES:

- compile with MSVC (mirage/alcotest#369, @jonahbeckfordm review by @TheLortex
  and @MisterDA)

- Allow skipping a test case from inside the test case (mirage/alcotest#368, @apeschar)

- Fix compilation on bytecode architectures (mirage/alcotest#335, @glondu)

- Get `alcotest_stubs.c` to compile with MSVC (mirage/alcotest#369, @jonahbeckford)

- Try automatically reporting the location of calls to Alcotest.check.
  (mirage/alcotest#366, @MisterDA, review by @TheLortex)

- Detect that Alcotest is running in CI and change output accordingly.
  (mirage/alcotest#364, @MisterDA)

- Upgrade to `dune >= 3.0`. (mirage/alcotest#360, @MisterDA)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants