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.

32 lines
819 B

6 years ago
let projectDir = Sys.getcwd();
let tmpDir = Filename.concat(projectDir, ".fnmTmp");
6 years ago
include Rely.Make({
let config =
Rely.TestFrameworkConfig.initialize({
snapshotDir:
Filename.concat(
projectDir,
Filename.concat("test", "__snapshots__"),
),
projectDir,
});
});
let run = args => {
let arguments =
args |> Array.append([|"./_build/default/executable/FnmApp.exe"|]);
let env = Unix.environment() |> Array.append([|"FNM_DIR=" ++ tmpDir|]);
6 years ago
let result =
Lwt_process.pread_chars(~env, ("", arguments)) |> Lwt_stream.to_string;
Lwt_main.run(result);
};
let clearTmpDir = () => {
let _ = Lwt_process.pread(("", [|"rm", "-rf", tmpDir|])) |> Lwt_main.run;
();
};
let redactSfwRoot =
Str.global_replace(Str.regexp_string(tmpDir), "<sfwRoot>");