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

Use dune's include stanza for generated tests #729

Merged
merged 1 commit into from
Aug 17, 2023
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: 0 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,6 @@ jobs:
- name: Build alt-ergo with opam
run: opam exec -- opam reinstall .

- name: Generate tests
run: opam exec -- make gentest

- name: Run tests
run: opam exec -- make runtest-ci

Expand Down
3 changes: 0 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,5 @@ alt-ergo.js
alt-ergo-worker.js
www/

# Generated dune files by gentest
tests/*/**/dune

# Generated nix files
/result*
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ packages:
# Generate new Dune tests from the problems in
# the directory tests/.
gentest: $(wildcard tests/**/*)
dune exec -- tools/gentest.exe tests/
dune build @tests/gentest --auto-promote

# Run non-regression tests.
runtest: gentest bin
Expand Down
23 changes: 23 additions & 0 deletions tests/dune
Original file line number Diff line number Diff line change
@@ -1,3 +1,26 @@
(cram
(package alt-ergo)
(deps %{bin:alt-ergo}))

(include dune.inc)

(rule
(deps (file ../tools/gentest.exe) (source_tree .))
(action
(with-stdout-to dune.inc.gen (run ../tools/gentest.exe .))))

(rule
(alias gentest)
(action (diff dune.inc dune.inc.gen)))

(rule
(alias runtest)
(action (diff dune.inc dune.inc.gen)))

(rule
(alias runtest-quick)
(action (diff dune.inc dune.inc.gen)))

(rule
(alias runtest-ci)
(action (diff dune.inc dune.inc.gen)))
Loading
Loading