File: testRunnerProcesses.ml

package info (click to toggle)
ounit 2.2.7-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 712 kB
  • sloc: ml: 5,932; makefile: 69; javascript: 59; ansic: 9
file content (21 lines) | stat: -rw-r--r-- 505 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
open OUnit2

let test =
  OUnitTest.TestCase
    (OUnitTest.Short,
     let open Lwt.Infix in
     OUnitLwt.lwt_wrapper
       (fun _ctxt ->
          Lwt_io.open_file ~mode:Lwt_io.Input "test.txt"
          >>= fun channel ->
          Lwt_io.read_char channel
          >|= fun _ -> ()))

let test =
  (* Running a lot of tests in parallel allows to check for race conditions
   * see bug OF#1765
   *)
  "testRunnerProcesses" >::: (Array.to_list (Array.make 50 test))

let () =
  run_test_tt_main test