Skip to content

Commit d1b8590

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 d1b8590

9 files changed

Lines changed: 34 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: 8 additions & 3 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

@@ -162,5 +162,10 @@ let openssl_tests =
162162
; ("string_of_policy_raises", `Quick, test_openssl_string_of_policy_raises)
163163
]
164164

165-
let () =
166-
Alcotest.run "Tls" [("Gnutls", gnutls_tests); ("Openssl", openssl_tests)]
165+
let tests =
166+
[
167+
("Gnutls", gnutls_tests)
168+
; ("Openssl", openssl_tests)
169+
]
170+
171+
let () = Alcotest.run "Tls_policy" tests
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
(*
2+
* Copyright (c) Cloud Software Group, Inc.
3+
*
4+
* This program is free software; you can redistribute it and/or modify
5+
* it under the terms of the GNU Lesser General Public License as published
6+
* by the Free Software Foundation; version 2.1 only. with the special
7+
* exception on linking described in file LICENSE.
8+
*
9+
* This program is distributed in the hope that it will be useful,
10+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
11+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12+
* GNU Lesser General Public License for more details.
13+
*)
14+
15+
val tests : unit Alcotest.test list
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.

0 commit comments

Comments
 (0)