@@ -44,7 +44,7 @@ module Test = struct
4444
4545 [@@@ endif]
4646
47- let run ~seed (self : t ) : _ result =
47+ let run ?( long = false ) ~seed (self : t ) : _ result =
4848 match
4949 let what = CCOption. map_or ~default: " " (fun s -> s ^ " " ) self.name in
5050 match self.run with
@@ -113,7 +113,7 @@ module Test = struct
113113 in
114114
115115 (* TODO: if verbose, print stats, etc. *)
116- let res = Q.Test. check_cell ~rand cell in
116+ let res = Q.Test. check_cell ~long ~ rand cell in
117117
118118 (match get_state res with
119119 | QCheck.TestResult. Success -> Ok ()
@@ -229,7 +229,12 @@ let make ~__FILE__ () : (module S) =
229229
230230let getenv_opt s = try Some (Sys. getenv s) with _ -> None
231231
232- let run_all ?seed :seed_hex ~descr (l : Test.t list list) : unit =
232+ let long =
233+ match getenv_opt " LONG" with
234+ | Some ("true" | "1" ) -> true
235+ | _ -> false
236+
237+ let run_all ?seed :seed_hex ?(long = long) ~descr (l : Test.t list list ) : unit =
233238 let start = Unix. gettimeofday () in
234239
235240 (* generate or parse seed *)
@@ -264,7 +269,7 @@ let run_all ?seed:seed_hex ~descr (l : Test.t list list) : unit =
264269 NOTE: we probably want this to be silent?
265270 Format.printf "> run %s@." (Test.str_loc t);
266271 *)
267- match Test. run ~seed t with
272+ match Test. run ~long ~ seed t with
268273 | Ok () -> ()
269274 | Error msg ->
270275 Format. printf " FAILED: %s@." (Test. str_loc t);
0 commit comments