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

Add js_of_ocaml dep for tests, adapt test to ocaml.5.3 #42

Merged
merged 6 commits into from
Jan 15, 2025
Merged
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
3 changes: 1 addition & 2 deletions .github/workflows/workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ jobs:
node-version:
- 20.x
ocaml-compiler:
- 5.3.x
- 5.2.x
- 4.12.x
- 4.11.x
Expand Down Expand Up @@ -53,8 +54,6 @@ jobs:

- run: opam install --deps-only --with-doc --with-test -y landmarks

- run: opam install js_of_ocaml

- run: opam exec -- dune build -p landmarks

- run: opam exec -- dune build -p landmarks @runtest
Expand Down
5 changes: 4 additions & 1 deletion dune-project
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,10 @@
"\| instrumentation of the code may either done by hand, automatically or
"\| semi-automatically using the ppx pepreprocessor (see landmarks-ppx package).
)
(depends (ocaml (>= 4.08)))
(depends
(ocaml (>= 4.08))
(js_of_ocaml (and :with-test (> 5)))
)
)

(package
Expand Down
1 change: 1 addition & 0 deletions landmarks.opam
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ bug-reports: "https://github.com/LexiFi/landmarks/issues"
depends: [
"dune" {>= "3.16"}
"ocaml" {>= "4.08"}
"js_of_ocaml" {with-test & > "5"}
"odoc" {with-doc}
]
build: [
Expand Down
22 changes: 7 additions & 15 deletions tests/poly-fail/dune
Original file line number Diff line number Diff line change
@@ -1,19 +1,11 @@
(rule
(targets test.out)
(deps
(:ppx ../tools/standalone.exe)
(:tt ../../toplevel/tt.exe))
(action
(with-stdout-to
test.out
(with-stdin-from
test.ml
(run %{tt} -color never -noprompt -no-version -ppx "%{ppx} --as-ppx")))))

(rule
(alias runtest)
(package landmarks-ppx)
(enabled_if
(>= %{ocaml_version} "5"))
(deps
test.ml
(:ppx ../tools/standalone.exe))
(action
(diff test.out.expected test.out)))
(ignore-outputs
(with-accepted-exit-codes 2
(run ocaml -I ../../src -I ../../src/.landmark.objs/byte %{lib:landmarks:landmark.cma} -ppx "%{ppx} --as-ppx" test.ml)
))))
7 changes: 0 additions & 7 deletions tests/poly-fail/test.out.expected

This file was deleted.

Loading