Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update jsoo for testing (2) #2210

Draft
wants to merge 3 commits into
base: phated/jsoo-oom
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion compiler/dune
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,6 @@
(env
(_
(js_of_ocaml
(flags :standard --no-sourcemap --no-extern-fs --disable use-js-string))))
(flags (:standard) --no-sourcemap --no-extern-fs --disable use-js-string)
(link_flags (:standard) --no-sourcemap --disable use-js-string)
(build_runtime_flags (:standard) --no-sourcemap --no-extern-fs --disable use-js-string))))
5 changes: 0 additions & 5 deletions compiler/src/utils/hacks.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
//Provides: os_type
var os_type = (globalThis.process &&
globalThis.process.platform &&
globalThis.process.platform == "win32") ? "Win32" : "Unix";

//Provides: unix_opendir
//Requires: caml_jsstring_of_string
//Requires: make_unix_err_args, caml_raise_with_args, caml_named_value
Expand Down
6 changes: 5 additions & 1 deletion compiler/test/TestFramework.re
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,11 @@ let clean_output = output =>

let () = {
/*** Override default stdlib location to use development version of stdlib */
let stdlib_dir = Unix.getenv("GRAIN_STDLIB");
let stdlib_dir =
try(Unix.getenv("GRAIN_STDLIB")) {
| Not_found =>
failwith("GRAIN_STDLIB env variable need to be set in order to run tests")
};
let stdlib_dir = Filepath.String.derelativize(stdlib_dir);
Config.stdlib_dir := Some(Filepath.to_string(stdlib_dir));
clean_grain_output(test_input_dir);
Expand Down
3 changes: 3 additions & 0 deletions compiler/test/dune
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@
(public_name test)
(package grain-tests)
(modes exe js)
(js_of_ocaml
(link_flags (:standard --linkall))
)
(flags
(:standard
-linkall
Expand Down
Loading