forked from ocaml/dune
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve check-alias test (ocaml#3594)
Signed-off-by: Jeremie Dimino <[email protected]>
- Loading branch information
1 parent
a1c7fba
commit 6b213b1
Showing
1 changed file
with
29 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,29 @@ | ||
$ dune build --root exe @check --display short && ls exe/.merlin | ||
Entering directory 'exe' | ||
ocamldep .foo.eobjs/foo.ml.d | ||
ocamlc .foo.eobjs/byte/foo.{cmi,cmo,cmt} | ||
exe/.merlin | ||
|
||
$ dune build --root lib @check --display short && ls lib/.merlin | ||
Entering directory 'lib' | ||
ocamlc bar$ext_obj | ||
ocamldep .foo.objs/foo.ml.d | ||
ocamlc .foo.objs/byte/foo.{cmi,cmo,cmt} | ||
lib/.merlin | ||
Check that the @check alias builds: | ||
- the merlin file | ||
- the cmi/cmo/cmt files | ||
|
||
A test should be considered successful if it prints the .merlin files | ||
as well as the foo.{cmi,cmo,cmt} files. | ||
|
||
$ build_check_and_list_interesting_files_in () | ||
> ( | ||
> cd $1 | ||
> dune build @check | ||
> find _build \( -name '*.cm*' -o -name .merlin \) -printf '%f\n' | LANG=C sort | ||
> ) | ||
|
||
Test the property for executables: | ||
|
||
$ build_check_and_list_interesting_files_in exe | ||
.merlin | ||
foo.cmi | ||
foo.cmo | ||
foo.cmt | ||
|
||
Test the property for libraries: | ||
|
||
$ build_check_and_list_interesting_files_in lib | ||
.merlin | ||
foo.cmi | ||
foo.cmo | ||
foo.cmt |