Skip to content

Commit

Permalink
test: tidy up tests, disable some tests on windows (#160)
Browse files Browse the repository at this point in the history
* test: tidy up tests, disable some tests on windows

* runtest on windows in CI

* run ssl test

* all but ssl

* move ssl_certs over
  • Loading branch information
anmonteiro authored Nov 17, 2024
1 parent f14abe3 commit 72c275c
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 50 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
- {ocaml-version: '4.14', os: ubuntu-latest, runtest: true}
- {ocaml-version: '5.1', os: ubuntu-latest, runtest: true}
- {ocaml-version: '5.2', os: ubuntu-latest, runtest: true}
- {ocaml-version: '5.2', os: windows-latest, runtest: false}
- {ocaml-version: '5.2', os: windows-latest, runtest: true}
steps:
- uses: actions/checkout@v4
- uses: ocaml/setup-ocaml@v3
Expand Down
84 changes: 35 additions & 49 deletions tests/dune
Original file line number Diff line number Diff line change
@@ -1,60 +1,46 @@
(alias
(name github_action_tests)
(rule
(alias github_action_tests)
(action
(run ./ssl_version.exe))
(deps
(alias_rec runtest)))

(library
(name util)
(modules util)
(libraries ssl threads str alcotest))

(test
(name ssl_test)
(modules ssl_test)
(libraries ssl alcotest)
(deps digicert_certificate.pem))

(test
(name ssl_comm)
(modules ssl_comm)
(libraries ssl alcotest))

(executable
(name ssl_version)
(modules ssl_version)
(libraries ssl alcotest))

(rule
(alias github_action_tests)
(action
(run ./ssl_version.exe)))

(test
(name ssl_context)
(modules ssl_context)
(libraries ssl alcotest util)
(deps client.pem client.key server.key ca.pem ca.key))

(test
(name ssl_ciphers)
(modules ssl_ciphers)
(libraries ssl alcotest util)
(deps client.pem client.key dh4096.pem server.key server.pem))

(test
(name ssl_certs)
(modules ssl_certs)
(libraries ssl alcotest util)
(deps client.pem ca.pem ca.key server.key server.pem))
(library
(name util)
(modules util)
(libraries ssl threads str alcotest))

(test
(name ssl_sock)
(modules ssl_sock)
(tests
(names ssl_test ssl_certs)
(modules ssl_test ssl_certs)
(libraries ssl alcotest util)
(deps ca.pem ca.key server.key server.pem))

(test
(name ssl_io)
(modules ssl_io)
(deps
digicert_certificate.pem
client.pem
client.key
dh4096.pem
server.key
server.pem
ca.pem
ca.key)
(enabled_if
(<> %{os_type} "Win32")))

(tests
(names ssl_comm ssl_context ssl_ciphers ssl_sock ssl_io)
(modules ssl_comm ssl_context ssl_ciphers ssl_sock ssl_io)
(libraries ssl alcotest util)
(deps ca.pem ca.key server.key server.pem))
(deps
digicert_certificate.pem
client.pem
client.key
dh4096.pem
server.key
server.pem
ca.pem
ca.key))

0 comments on commit 72c275c

Please sign in to comment.