From: Michael Schroeder Date: Mon, 3 Dec 2012 15:06:22 +0000 (+0100) Subject: add "forcebest" testcases X-Git-Tag: upstream/0.2.3~25 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=3f08b4d2d692bc5d6e3f5e46d1d537c19b7f2a26;p=platform%2Fupstream%2Flibsolv.git add "forcebest" testcases --- diff --git a/test/testcases/forcebest/forcebest_dup.t b/test/testcases/forcebest/forcebest_dup.t new file mode 100644 index 0000000..8de43eb --- /dev/null +++ b/test/testcases/forcebest/forcebest_dup.t @@ -0,0 +1,45 @@ +repo system 0 testtags +#>=Pkg: A 1 1 noarch +#>=Vnd: foo +#>+Prv: +#>A = 1-1 +#>-Prv: +#>=Pkg: D 1 1 noarch +#>=Vnd: foo +#>+Prv: +#>D = 1-1 +#>-Prv: +#>+Con: +#>A = 3-1 +#>-Con: +repo available 0 testtags +#>=Pkg: A 2 1 noarch +#>=Vnd: foo +#>+Prv: +#>A = 2-1 +#>-Prv: +#>=Pkg: A 3 1 noarch +#>=Vnd: bar +#>+Prv: +#>A = 3-1 +#>-Prv: +system i686 rpm system + +job distupgrade name A [forcebest] +result transaction,problems +#>erase D-1-1.noarch@system +#>problem 1210fdfb info package D-1-1.noarch conflicts with A = 3-1 provided by A-3-1.noarch +#>problem 1210fdfb solution 0d75a914 erase D-1-1.noarch@system +#>problem 1210fdfb solution d85f7c4e allow A-2-1.noarch@available +#>upgrade A-1-1.noarch@system A-3-1.noarch@available + +# test if bestobeypolicy is a noop for dup jobs +nextjob +solverflags bestobeypolicy +job distupgrade name A [forcebest] +result transaction,problems +#>erase D-1-1.noarch@system +#>problem 1210fdfb info package D-1-1.noarch conflicts with A = 3-1 provided by A-3-1.noarch +#>problem 1210fdfb solution 0d75a914 erase D-1-1.noarch@system +#>problem 1210fdfb solution d85f7c4e allow A-2-1.noarch@available +#>upgrade A-1-1.noarch@system A-3-1.noarch@available diff --git a/test/testcases/forcebest/forcebest_in.t b/test/testcases/forcebest/forcebest_in.t new file mode 100644 index 0000000..976ceda --- /dev/null +++ b/test/testcases/forcebest/forcebest_in.t @@ -0,0 +1,40 @@ +repo system 0 testtags +#>=Pkg: D 1 1 noarch +#>=Vnd: foo +#>+Prv: +#>D = 1-1 +#>-Prv: +#>+Con: +#>A = 3-1 +#>-Con: +repo available 0 testtags +#>=Pkg: A 2 1 noarch +#>=Vnd: foo +#>+Prv: +#>A = 2-1 +#>-Prv: +#>=Pkg: A 3 1 noarch +#>=Vnd: bar +#>+Prv: +#>A = 3-1 +#>-Prv: +system i686 rpm system + +job install name A [forcebest] +result transaction,problems +#>erase D-1-1.noarch@system +#>install A-3-1.noarch@available +#>problem 1210fdfb info package D-1-1.noarch conflicts with A = 3-1 provided by A-3-1.noarch +#>problem 1210fdfb solution 0d75a914 erase D-1-1.noarch@system +#>problem 1210fdfb solution d85f7c4e deljob install name A [forcebest] + +# currently bestobeypolicy is a noop for install jobs +nextjob +solverflags bestobeypolicy +job install name A [forcebest] +result transaction,problems +#>erase D-1-1.noarch@system +#>install A-3-1.noarch@available +#>problem 1210fdfb info package D-1-1.noarch conflicts with A = 3-1 provided by A-3-1.noarch +#>problem 1210fdfb solution 0d75a914 erase D-1-1.noarch@system +#>problem 1210fdfb solution d85f7c4e deljob install name A [forcebest] diff --git a/test/testcases/forcebest/forcebest_up.t b/test/testcases/forcebest/forcebest_up.t new file mode 100644 index 0000000..74c01b0 --- /dev/null +++ b/test/testcases/forcebest/forcebest_up.t @@ -0,0 +1,40 @@ +repo system 0 testtags +#>=Pkg: A 1 1 noarch +#>=Vnd: foo +#>+Prv: +#>A = 1-1 +#>-Prv: +#>=Pkg: D 1 1 noarch +#>=Vnd: foo +#>+Prv: +#>D = 1-1 +#>-Prv: +#>+Con: +#>A = 3-1 +#>-Con: +repo available 0 testtags +#>=Pkg: A 2 1 noarch +#>=Vnd: foo +#>+Prv: +#>A = 2-1 +#>-Prv: +#>=Pkg: A 3 1 noarch +#>=Vnd: bar +#>+Prv: +#>A = 3-1 +#>-Prv: +system i686 rpm system + +job update name A [forcebest] +result transaction,problems +#>problem 1210fdfb info package D-1-1.noarch conflicts with A = 3-1 provided by A-3-1.noarch +#>problem 1210fdfb solution 0d75a914 erase D-1-1.noarch@system +#>problem 1210fdfb solution 0d75a914 replace A-1-1.noarch@system A-3-1.noarch@available +#>problem 1210fdfb solution d85f7c4e allow A-2-1.noarch@available +#>upgrade A-1-1.noarch@system A-2-1.noarch@available + +nextjob +solverflags bestobeypolicy +job update name A [forcebest] +result transaction,problems +#>upgrade A-1-1.noarch@system A-2-1.noarch@available