From: Michael Schroeder Date: Wed, 14 Dec 2022 16:02:02 +0000 (+0100) Subject: Add testcases for the alternative introspection X-Git-Tag: 0.7.24~23 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8ae7e918721364c609e850d3c6561f7132a64c63;p=thirdparty%2Flibsolv.git Add testcases for the alternative introspection --- diff --git a/test/testcases/alternative/job.t b/test/testcases/alternative/job.t new file mode 100644 index 00000000..18e3b78f --- /dev/null +++ b/test/testcases/alternative/job.t @@ -0,0 +1,22 @@ +repo system 0 empty +repo test 0 testtags +#>=Pkg: A 1 1 noarch +#>=Prv: X +#>=Pkg: B 1 1 noarch +#>=Prv: X +system unset * system +job install provides X +result transaction,problems,alternatives +#>alternative 63535fbb 0 X +#>alternative 63535fbb 1 + A-1-1.noarch@test +#>alternative 63535fbb 2 B-1-1.noarch@test +#>install A-1-1.noarch@test + +nextjob +job install oneof A-1-1.noarch@test B-1-1.noarch@test +result transaction,problems,alternatives +#>alternative 63535fbb 0 A-1-1.noarch, B-1-1.noarch +#>alternative 63535fbb 1 + A-1-1.noarch@test +#>alternative 63535fbb 2 B-1-1.noarch@test +#>install A-1-1.noarch@test + diff --git a/test/testcases/alternative/learnt.t b/test/testcases/alternative/learnt.t new file mode 100644 index 00000000..2aade85b --- /dev/null +++ b/test/testcases/alternative/learnt.t @@ -0,0 +1,43 @@ +### or in CC1 +####>=Con: CC2 (A1 | A2 | A3) + +repo system 0 empty +repo test 0 testtags +#>=Pkg: Q 1 1 noarch +#>=Req: A +#>=Pkg: A1 1 1 noarch +#>=Pkg: A2 1 2 noarch +#>=Pkg: A3 1 3 noarch +#>=Req: C = 2-1 +#>=Pkg: A 2 1 noarch +#>=Con: A1 +#>=Con: A2 +#>=Con: A3 +#>=Req: B +#>=Pkg: B 1 1 noarch +#>=Req: X +#>=Pkg: C 2 1 noarch +#>=Prv: X +#>=Req: CC1 +#>=Req: CC2 +#>=Pkg: CC1 1 1 noarch +#>=Pkg: CC2 1 1 noarch +#>=Req: (A1 | A2 | A3) CC1 +#>=Pkg: C 2 2 noarch +#>=Prv: X +#>=Req: CC1 +#>=Req: CC2 +#>=Pkg: A 1 1 noarch +#>=Req: C = 2-2 +system unset * system +job install name Q +result transaction,problems,alternatives +#>alternative d80be72d 0 ((A1 or A2 or A3) if CC1), required by CC2-1-1.noarch +#>alternative d80be72d 1 + A1-1-1.noarch@test +#>alternative d80be72d 2 A2-1-2.noarch@test +#>install A-1-1.noarch@test +#>install A1-1-1.noarch@test +#>install C-2-2.noarch@test +#>install CC1-1-1.noarch@test +#>install CC2-1-1.noarch@test +#>install Q-1-1.noarch@test diff --git a/test/testcases/alternative/recommends.t b/test/testcases/alternative/recommends.t new file mode 100644 index 00000000..923e6c61 --- /dev/null +++ b/test/testcases/alternative/recommends.t @@ -0,0 +1,16 @@ +repo system 0 empty +repo test 0 testtags +#>=Pkg: A 1 1 noarch +#>=Rec: X +#>=Pkg: B 1 1 noarch +#>=Prv: X +#>=Pkg: C 1 1 noarch +#>=Prv: X +system unset * system +job install name A +result transaction,problems,alternatives +#>alternative f1989d4c 0 X, recommended by A-1-1.noarch +#>alternative f1989d4c 1 + B-1-1.noarch@test +#>alternative f1989d4c 2 C-1-1.noarch@test +#>install A-1-1.noarch@test +#>install B-1-1.noarch@test diff --git a/test/testcases/alternative/requires.t b/test/testcases/alternative/requires.t new file mode 100644 index 00000000..953708b5 --- /dev/null +++ b/test/testcases/alternative/requires.t @@ -0,0 +1,16 @@ +repo system 0 empty +repo test 0 testtags +#>=Pkg: A 1 1 noarch +#>=Req: X +#>=Pkg: B 1 1 noarch +#>=Prv: X +#>=Pkg: C 1 1 noarch +#>=Prv: X +system unset * system +job install name A +result transaction,problems,alternatives +#>alternative 8f2fa5fa 0 X, required by A-1-1.noarch +#>alternative 8f2fa5fa 1 + B-1-1.noarch@test +#>alternative 8f2fa5fa 2 C-1-1.noarch@test +#>install A-1-1.noarch@test +#>install B-1-1.noarch@test diff --git a/test/testcases/alternative/strongrecommends.t b/test/testcases/alternative/strongrecommends.t new file mode 100644 index 00000000..db7c51de --- /dev/null +++ b/test/testcases/alternative/strongrecommends.t @@ -0,0 +1,31 @@ +repo system 0 empty +repo test 0 testtags +#>=Pkg: A 1 1 noarch +#>=Rec: X +#>=Pkg: B 1 1 noarch +#>=Prv: X +#>=Pkg: C 1 1 noarch +#>=Prv: X +#>=Pkg: D 1 1 noarch +#>=Prv: X +system unset * system +solverflags strongrecommends +job install name A +result transaction,problems,alternatives +#>alternative 432b0214 0 X, recommended by A-1-1.noarch +#>alternative 432b0214 1 + B-1-1.noarch@test +#>alternative 432b0214 2 C-1-1.noarch@test +#>alternative 432b0214 3 D-1-1.noarch@test +#>install A-1-1.noarch@test +#>install B-1-1.noarch@test + +nextjob +solverflags strongrecommends +job install name A +job disfavor name B +result transaction,problems,alternatives +#>alternative eb7c0cd8 0 X, recommended by A-1-1.noarch +#>alternative eb7c0cd8 1 + C-1-1.noarch@test +#>alternative eb7c0cd8 2 D-1-1.noarch@test +#>install A-1-1.noarch@test +#>install C-1-1.noarch@test diff --git a/test/testcases/alternative/update.t b/test/testcases/alternative/update.t new file mode 100644 index 00000000..a5ee654d --- /dev/null +++ b/test/testcases/alternative/update.t @@ -0,0 +1,21 @@ +repo system 0 testtags +#>=Pkg: X 1 1 noarch +repo test 0 testtags +#>=Pkg: X 2 1 noarch +#>=Pkg: B 1 1 noarch +#>=Obs: X = 1 +system unset * system +job update all packages +result transaction,problems,alternatives +#>alternative 6014509b 0 X-1-1.noarch +#>alternative 6014509b 1 + X-2-1.noarch@test +#>alternative 6014509b 2 B-1-1.noarch@test +#>upgrade X-1-1.noarch@system X-2-1.noarch@test + +nextjob +job distupgrade all packages [forcebest] +result transaction,problems,alternatives +#>alternative 6014509b 0 X-1-1.noarch +#>alternative 6014509b 1 + X-2-1.noarch@test +#>alternative 6014509b 2 B-1-1.noarch@test +#>upgrade X-1-1.noarch@system X-2-1.noarch@test