diff --git a/master_changes.md b/master_changes.md index 93761245738..f369b93c4d1 100644 --- a/master_changes.md +++ b/master_changes.md @@ -145,6 +145,7 @@ users) ### Tests * Add switch removal test: failure on removal linked switch [#6276 @btjorge] * 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 diff --git a/tests/reftests/admin.test b/tests/reftests/admin.test index db07b952668..819d5275bcd 100644 --- a/tests/reftests/admin.test +++ b/tests/reftests/admin.test @@ -321,14 +321,94 @@ vars -- A word ### ::::::::::::: ### :III: check : ### ::::::::::::: +### +opam-version: "2.0" +depends: [ + "lorem" { = "1.0" & with-test } # for obsolete -i test + "not-found" { with-test } # for installability -i test +] +### +opam-version: "2.0" +depends: [ + "tortor" # for cycle test + "dignissim" {with-doc} # for cycle -i test +] +### +opam-version: "2.0" +depends: "lectus" +### +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...