You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

54 lines
1.5 KiB

(*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*)
open! IStd
(** module for running OCaml unit tests *)
let rec mk_test_fork_proof test =
let open OUnitTest in
match test with
| TestCase (length, f) ->
TestCase (length, Tasks.fork_protect ~f)
| TestList l ->
TestList (List.map ~f:mk_test_fork_proof l)
| TestLabel (label, test) ->
TestLabel (label, mk_test_fork_proof test)
let () =
ResultsDir.create_results_dir () ;
let open OUnit2 in
let tests =
(* OUnit runs tests in parallel using fork(2) *)
List.map ~f:mk_test_fork_proof
( [ AbstractInterpreterTests.tests
; AccessTreeTests.tests
; AddressTakenTests.tests
; CStubsTests.tests
; DifferentialFiltersTests.tests
; DifferentialTests.tests
; FileDiffTests.tests
; GradleTests.tests
; IListTests.tests
; JavaClassNameTests.tests
; JavaProfilerSamplesTest.tests
; LivenessTests.tests
; LRUHashtblTests.tests
; MaximumSharingTests.tests
; ProcCfgTests.tests
; RestartSchedulerTests.tests
; SchedulerTests.tests
; SeverityTests.tests
; TaintTests.tests
; TraceTests.tests
; WeakTopologicalOrderTests.tests ]
@ ClangTests.tests @ AllNullsafeTests.tests )
in
let test_suite = "all" >::: tests in
OUnit2.run_test_tt_main test_suite