Skip to content

Commit 7291d87

Browse files
author
Lin Liu
committed
CP-311259: Refine for comments
- Move tls lib to xapi-consts - Ignore mli test check in ocaml/*/test_xxxt for quality-gate Signed-off-by: Lin Liu <lin.liu01@citrix.com>
1 parent b82b271 commit 7291d87

9 files changed

Lines changed: 16 additions & 62 deletions

File tree

dune-project

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -31,15 +31,6 @@
3131
(package
3232
(name zstd))
3333

34-
(package
35-
(name tls)
36-
(synopsis "TLS policy types and format-specific string renderers")
37-
(description
38-
"Provides TLS policy types and renderers for GnuTLS priority strings and OpenSSL cipher lists.")
39-
(depends
40-
(ocaml
41-
(>= 4.14))))
42-
4334
(package
4435
(name clock)
4536
(synopsis "Xapi's library for managing time")

ocaml/libs/tls/dune

Lines changed: 0 additions & 5 deletions
This file was deleted.

ocaml/tests/dune

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,7 @@
99
test_vm_placement test_vm_helpers test_repository test_repository_helpers
1010
test_ref test_xapi_helpers test_vm_group
1111
test_livepatch test_rpm test_updateinfo test_storage_smapiv1_wrapper test_storage_quicktest test_observer
12-
test_pool_periodic_update_sync test_pkg_mgr test_tar_ext test_pool_repository
13-
test_tls))
12+
test_pool_periodic_update_sync test_pkg_mgr test_tar_ext test_pool_repository))
1413
(libraries
1514
alcotest
1615
angstrom
@@ -173,13 +172,6 @@
173172
(action (run ./check-no-xenctrl %{x}))
174173
)
175174

176-
(test
177-
(name test_tls)
178-
(modes exe)
179-
(modules test_tls)
180-
(libraries alcotest tls)
181-
)
182-
183175
(env (_ (env-vars (XAPI_TEST 1))))
184176

185177
; disassemble, but without sources

ocaml/xapi-consts/test/dune

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
(test
2+
(name test_tls_policy)
3+
(package xapi-consts)
4+
(libraries alcotest xapi-consts)
5+
)
Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
* GNU Lesser General Public License for more details.
1313
*)
1414

15-
open Tls
15+
open Tls_policy
1616

1717
(* ---- GnuTLS tests ------------------------------------------------------- *)
1818

@@ -163,4 +163,5 @@ let openssl_tests =
163163
]
164164

165165
let () =
166-
Alcotest.run "Tls" [("Gnutls", gnutls_tests); ("Openssl", openssl_tests)]
166+
Alcotest.run "Tls_policy"
167+
[("Gnutls", gnutls_tests); ("Openssl", openssl_tests)]
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ type policy = {
2828
; server_preference: bool
2929
}
3030

31-
(* ---- Default XenServer policy ------------------------------------------- *)
31+
(* ---- Default policy ------------------------------------------- *)
3232

3333
let default =
3434
{
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,12 @@
1616
1717
Usage:
1818
{[
19-
let () = print_endline (Tls.Gnutls.default_policy ())
20-
let () = print_endline (Tls.Openssl.default_policy ())
21-
let () = print_endline Tls.Openssl.default_curve
19+
let () = print_endline (Tls_policy.Gnutls.default_policy ())
20+
let () = print_endline (Tls_policy.Openssl.default_policy ())
21+
let () = print_endline Tls_policy.Openssl.default_curve
2222
(* or with a custom policy: *)
2323
let my_policy = { ... }
24-
let () = print_endline (Tls.Openssl.string_of_policy my_policy)
24+
let () = print_endline (Tls_policy.Openssl.string_of_policy my_policy)
2525
]} *)
2626

2727
type version = TLS_1_2 | TLS_1_3

opam/tls.opam

Lines changed: 0 additions & 31 deletions
This file was deleted.

quality-gate.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,11 @@ verify-cert () {
2525
}
2626

2727
mli-files () {
28-
N=455
28+
N=450
2929
X="ocaml/tests"
3030
X+="|ocaml/quicktest"
3131
X+="|ocaml/message-switch/core_test"
32+
X+="|ocaml/.*/test/test_"
3233
# do not count ml files from the tests in ocaml/{tests/quicktest}
3334
M=$(comm -23 <(git ls-files -- '**/*.ml' | sed 's/.ml$//' | sort) \
3435
<(git ls-files -- '**/*.mli' | sed 's/.mli$//' | sort) |\

0 commit comments

Comments
 (0)