Skip to content

Commit

Permalink
Extend the tests on opam admin check by including all the arguments
Browse files Browse the repository at this point in the history
Co-authored-by: Raja Boujbel <[email protected]>
  • Loading branch information
kit-ty-kate and rjbou committed Dec 12, 2024
1 parent 5564d7c commit fa95cc5
Show file tree
Hide file tree
Showing 2 changed files with 82 additions and 1 deletion.
1 change: 1 addition & 0 deletions master_changes.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ users)
## Reftests
### Tests
* Extend the tests on opam admin to include packages using builtin global variables [#6331 @kit-ty-kate]
* Extend the tests on opam admin check by including all the arguments [#6331 @kit-ty-kate @rjbou]

### Engine

Expand Down
82 changes: 81 additions & 1 deletion tests/reftests/admin.test
Original file line number Diff line number Diff line change
Expand Up @@ -321,14 +321,94 @@ vars -- A word
### :::::::::::::
### :III: check :
### :::::::::::::
### <packages/suspendisse/suspendisse.1/opam>
opam-version: "2.0"
depends: [
"lorem" { = "1.0" & with-test } # for obsolete -i test
"not-found" { with-test } # for installability -i test
]
### <packages/lectus/lectus.1/opam>
opam-version: "2.0"
depends: [
"tortor" # for cycle test
"dignissim" {with-doc} # for cycle -i test
]
### <packages/tortor/tortor.1/opam>
opam-version: "2.0"
depends: "lectus"
### <packages/dignissim/dignissim.1/opam>
opam-version: "2.0"
depends: "lectus"
### # by default, the check does installability & cycle check
### opam admin check
Checking installability of every package. This may take a few minutes...
[ERROR] These packages are not installable (3):
ocaml-system.1.2 risus.1 suspendisse.1
[ERROR] Dependency cycles detected:
* lectus = 1 -> dignissim = 1
* lectus = 1 -> tortor = 1
Summary: out of 25 packages (22 distinct names)
- 3 uninstallable roots
- 3 packages part of dependency cycles

# Return code 1 #
### opam admin check -i
Checking installability of every package. This may take a few minutes...
[ERROR] These packages are not installable (2):
ocaml-system.1.2 risus.1
[ERROR] Dependency cycles detected:
* lectus = 1 -> tortor = 1
Summary: out of 25 packages (22 distinct names)
- 2 uninstallable roots
- 2 packages part of dependency cycles

# Return code 1 #
### opam admin check --installability
Checking installability of every package. This may take a few minutes...
[ERROR] These packages are not installable (3):
ocaml-system.1.2 risus.1 suspendisse.1
Summary: out of 25 packages (22 distinct names)
- 3 uninstallable roots

# Return code 1 #
### opam admin check --installability -i
Checking installability of every package. This may take a few minutes...
[ERROR] These packages are not installable (2):
ocaml-system.1.2 risus.1
Summary: out of 21 packages (18 distinct names)
Summary: out of 25 packages (22 distinct names)
- 2 uninstallable roots

# Return code 1 #
### opam admin check --obsolete
[ERROR] Obsolete packages detected:
- lorem 2.0
Summary: out of 25 packages (22 distinct names)
- 1 obsolete packages

# Return code 1 #
### opam admin check --obsolete -i
[ERROR] Obsolete packages detected:
- lorem 1.0, 2.0
Summary: out of 25 packages (22 distinct names)
- 2 obsolete packages

# Return code 1 #
### opam admin check --cycles
[ERROR] Dependency cycles detected:
* lectus = 1 -> dignissim = 1
* lectus = 1 -> tortor = 1
Summary: out of 25 packages (22 distinct names)
- 3 packages part of dependency cycles

# Return code 1 #
### opam admin check --cycles -i
[ERROR] Dependency cycles detected:
* lectus = 1 -> tortor = 1
Summary: out of 25 packages (22 distinct names)
- 2 packages part of dependency cycles

# Return code 1 #
### rm -r packages/suspendisse packages/lectus packages/tortor packages/dignissim
### : index :
### opam admin index
Generating urls.txt...
Expand Down

0 comments on commit fa95cc5

Please sign in to comment.