Skip to content

Commit

Permalink
Improve cram test
Browse files Browse the repository at this point in the history
This moves the dune file up so it will apply to all future tests
as long as turning the test into a cram folder, incuding the files
to the tree rather than generating them as part of the test.

`cd`ing into the folder to try running commands is now possible which
should help debugging issues.
We still `cat` the content of the files so that the `run.t` file is self
contained and one does not have to browse files to fully understand the
test.

Signed-off-by: Nathan Rebours <[email protected]>
  • Loading branch information
NathanReb committed Nov 5, 2021
1 parent 394a3bd commit c7ee2b0
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 7 deletions.
1 change: 1 addition & 0 deletions test/bin/missing-dune-project/dune → test/bin/dune
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
(cram
(applies_to :whole_subtree)
(deps %{bin:opam-monorepo}))
1 change: 1 addition & 0 deletions test/bin/missing-dune-project.t/a.opam
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
opam-version: "2.0"
1 change: 1 addition & 0 deletions test/bin/missing-dune-project.t/b.opam
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
opam-version: "2.0"
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
Let us setup a simple project with two local packages, defined at the root
We have a simple project with two local packages, defined at the root

$ cat > a.opam << EOF
> opam-version: "2.0"
> EOF
$ cat a.opam
opam-version: "2.0"

$ cat > b.opam << EOF
> opam-version: "2.0"
> EOF
$ cat b.opam
opam-version: "2.0"

The project has no dune-project file. That means that if we run `opam-monorepo lock`,
it will have more than onw target: `a` and `b`. It therefore has to determine the name of the
Expand Down

0 comments on commit c7ee2b0

Please sign in to comment.