Author: kkaempf Date: Wed Nov 12 15:37:20 2008 New Revision: 11658 URL: http://svn.opensuse.org/viewcvs/zypp?rev=11658&view=rev Log: use generic .solv from bindings/testdata Modified: trunk/sat-solver/bindings/ruby/tests/_patch.rb trunk/sat-solver/bindings/ruby/tests/_solv2patches.rb trunk/sat-solver/bindings/ruby/tests/covenants.rb trunk/sat-solver/bindings/ruby/tests/decisions.rb trunk/sat-solver/bindings/ruby/tests/dumpsolv.rb trunk/sat-solver/bindings/ruby/tests/gen_patches.rb trunk/sat-solver/bindings/ruby/tests/loading.rb trunk/sat-solver/bindings/ruby/tests/patch_updates.rb trunk/sat-solver/bindings/ruby/tests/patchsolv2updateinfo.rb trunk/sat-solver/bindings/ruby/tests/pool.rb trunk/sat-solver/bindings/ruby/tests/problems.rb trunk/sat-solver/bindings/ruby/tests/providers.rb trunk/sat-solver/bindings/ruby/tests/relation.rb trunk/sat-solver/bindings/ruby/tests/repo.rb trunk/sat-solver/bindings/ruby/tests/repodata.rb trunk/sat-solver/bindings/ruby/tests/rpmdb.rb trunk/sat-solver/bindings/ruby/tests/search.rb trunk/sat-solver/bindings/ruby/tests/solutions.rb trunk/sat-solver/bindings/ruby/tests/solvable.rb trunk/sat-solver/bindings/ruby/tests/solver.rb trunk/sat-solver/bindings/ruby/tests/transaction.rb trunk/sat-solver/bindings/ruby/tests/updates.rb Modified: trunk/sat-solver/bindings/ruby/tests/_patch.rb URL: http://svn.opensuse.org/viewcvs/zypp/trunk/sat-solver/bindings/ruby/tests/_p... ============================================================================== --- trunk/sat-solver/bindings/ruby/tests/_patch.rb (original) +++ trunk/sat-solver/bindings/ruby/tests/_patch.rb Wed Nov 12 15:37:20 2008 @@ -1,3 +1,5 @@ +$:.unshift "../../../build/bindings/ruby" +require 'pathname' # # Code11 Patch Modified: trunk/sat-solver/bindings/ruby/tests/_solv2patches.rb URL: http://svn.opensuse.org/viewcvs/zypp/trunk/sat-solver/bindings/ruby/tests/_s... ============================================================================== --- trunk/sat-solver/bindings/ruby/tests/_solv2patches.rb (original) +++ trunk/sat-solver/bindings/ruby/tests/_solv2patches.rb Wed Nov 12 15:37:20 2008 @@ -17,6 +17,9 @@ # # +$:.unshift "../../../build/bindings/ruby" +require 'pathname' + require 'satsolver' require '_patch' Modified: trunk/sat-solver/bindings/ruby/tests/covenants.rb URL: http://svn.opensuse.org/viewcvs/zypp/trunk/sat-solver/bindings/ruby/tests/co... ============================================================================== --- trunk/sat-solver/bindings/ruby/tests/covenants.rb (original) +++ trunk/sat-solver/bindings/ruby/tests/covenants.rb Wed Nov 12 15:37:20 2008 @@ -1,16 +1,18 @@ -$:.unshift ".." +$:.unshift "../../../build/bindings/ruby" +require 'pathname' # test Covenants require 'test/unit' -require 'pathname' require 'satsolver' class CovenantTest < Test::Unit::TestCase def test_convenant pool = Satsolver::Pool.new "i686" assert pool - repo = pool.add_solv( Pathname( File.dirname( __FILE__ ) ) + "os11-biarch.solv" ) + solvpath = Pathname( File.dirname( __FILE__ ) ) + Pathname( "../../testdata" ) + "os11-biarch.solv" + repo = pool.add_solv( solvpath ) + assert repo.size > 0 repo.name = "test" solver = pool.create_solver Modified: trunk/sat-solver/bindings/ruby/tests/decisions.rb URL: http://svn.opensuse.org/viewcvs/zypp/trunk/sat-solver/bindings/ruby/tests/de... ============================================================================== --- trunk/sat-solver/bindings/ruby/tests/decisions.rb (original) +++ trunk/sat-solver/bindings/ruby/tests/decisions.rb Wed Nov 12 15:37:20 2008 @@ -1,3 +1,6 @@ +$:.unshift "../../../build/bindings/ruby" +require 'pathname' + # # After successful solving, the solver returns the result as list of Decisions. # @@ -19,7 +22,6 @@ # The number of decision steps is available through Solver.decision_count # -$:.unshift ".." # test Decisions require 'test/unit' Modified: trunk/sat-solver/bindings/ruby/tests/dumpsolv.rb URL: http://svn.opensuse.org/viewcvs/zypp/trunk/sat-solver/bindings/ruby/tests/du... ============================================================================== --- trunk/sat-solver/bindings/ruby/tests/dumpsolv.rb (original) +++ trunk/sat-solver/bindings/ruby/tests/dumpsolv.rb Wed Nov 12 15:37:20 2008 @@ -4,7 +4,8 @@ # Example code how to use Ruby bindings to implement tools/dumpsolv # -$:.unshift ".." +$:.unshift "../../../build/bindings/ruby" +require 'pathname' require 'satsolver' require 'pp' Modified: trunk/sat-solver/bindings/ruby/tests/gen_patches.rb URL: http://svn.opensuse.org/viewcvs/zypp/trunk/sat-solver/bindings/ruby/tests/ge... ============================================================================== --- trunk/sat-solver/bindings/ruby/tests/gen_patches.rb (original) +++ trunk/sat-solver/bindings/ruby/tests/gen_patches.rb Wed Nov 12 15:37:20 2008 @@ -1,6 +1,8 @@ -$:.unshift ".." +$:.unshift "../../../build/bindings/ruby" +require 'pathname' # +# # Generate 'code11 patches' from code10 patch repo # Modified: trunk/sat-solver/bindings/ruby/tests/loading.rb URL: http://svn.opensuse.org/viewcvs/zypp/trunk/sat-solver/bindings/ruby/tests/lo... ============================================================================== --- trunk/sat-solver/bindings/ruby/tests/loading.rb (original) +++ trunk/sat-solver/bindings/ruby/tests/loading.rb Wed Nov 12 15:37:20 2008 @@ -2,11 +2,13 @@ # Test loading of the bindings # +$:.unshift "../../../build/bindings/ruby" +require 'pathname' + File.open("/tmp/output", "w") { |f| f.puts "PWD: #{Dir.pwd}" } -$:.unshift ".." # test loading of extension require 'test/unit' Modified: trunk/sat-solver/bindings/ruby/tests/patch_updates.rb URL: http://svn.opensuse.org/viewcvs/zypp/trunk/sat-solver/bindings/ruby/tests/pa... ============================================================================== --- trunk/sat-solver/bindings/ruby/tests/patch_updates.rb (original) +++ trunk/sat-solver/bindings/ruby/tests/patch_updates.rb Wed Nov 12 15:37:20 2008 @@ -1,7 +1,8 @@ -$:.unshift ".." - # test Patch and Update +$:.unshift "../../../build/bindings/ruby" +require 'pathname' + require 'satsolver' require '_solv2patches' Modified: trunk/sat-solver/bindings/ruby/tests/patchsolv2updateinfo.rb URL: http://svn.opensuse.org/viewcvs/zypp/trunk/sat-solver/bindings/ruby/tests/pa... ============================================================================== --- trunk/sat-solver/bindings/ruby/tests/patchsolv2updateinfo.rb (original) +++ trunk/sat-solver/bindings/ruby/tests/patchsolv2updateinfo.rb Wed Nov 12 15:37:20 2008 @@ -1,4 +1,5 @@ -$:.unshift ".." +$:.unshift "../../../build/bindings/ruby" +require 'pathname' # # Generate 'code11 updateinfo' from (code10) patch solv Modified: trunk/sat-solver/bindings/ruby/tests/pool.rb URL: http://svn.opensuse.org/viewcvs/zypp/trunk/sat-solver/bindings/ruby/tests/po... ============================================================================== --- trunk/sat-solver/bindings/ruby/tests/pool.rb (original) +++ trunk/sat-solver/bindings/ruby/tests/pool.rb Wed Nov 12 15:37:20 2008 @@ -15,7 +15,8 @@ # For Repos there is each_repo, count_repos, get_repo and find_repo. # -$:.unshift ".." +$:.unshift "../../../build/bindings/ruby" +require 'pathname' # test Pool require 'test/unit' Modified: trunk/sat-solver/bindings/ruby/tests/problems.rb URL: http://svn.opensuse.org/viewcvs/zypp/trunk/sat-solver/bindings/ruby/tests/pr... ============================================================================== --- trunk/sat-solver/bindings/ruby/tests/problems.rb (original) +++ trunk/sat-solver/bindings/ruby/tests/problems.rb Wed Nov 12 15:37:20 2008 @@ -40,7 +40,8 @@ # source requires relation but no providers are installable # -$:.unshift ".." +$:.unshift "../../../build/bindings/ruby" +require 'pathname' # test Problems require 'test/unit' Modified: trunk/sat-solver/bindings/ruby/tests/providers.rb URL: http://svn.opensuse.org/viewcvs/zypp/trunk/sat-solver/bindings/ruby/tests/pr... ============================================================================== --- trunk/sat-solver/bindings/ruby/tests/providers.rb (original) +++ trunk/sat-solver/bindings/ruby/tests/providers.rb Wed Nov 12 15:37:20 2008 @@ -2,7 +2,8 @@ # Check each_provider callback # -$:.unshift ".." +$:.unshift "../../../build/bindings/ruby" +require 'pathname' # test EachProvider require 'test/unit' @@ -13,7 +14,9 @@ pool = Satsolver::Pool.new assert pool pool.arch = "x86_64" - repo = pool.add_solv( "os11-biarch.solv" ) + solvpath = Pathname( File.dirname( __FILE__ ) ) + Pathname( "../../testdata" ) + "os11-biarch.solv" + repo = pool.add_solv( solvpath ) + assert pool.size > 0 repo.name = "openSUSE 11.0 Beta3 BiArch" puts "Repo #{repo.name} loaded with #{repo.size} solvables" system = pool.add_rpmdb( "/" ) Modified: trunk/sat-solver/bindings/ruby/tests/relation.rb URL: http://svn.opensuse.org/viewcvs/zypp/trunk/sat-solver/bindings/ruby/tests/re... ============================================================================== --- trunk/sat-solver/bindings/ruby/tests/relation.rb (original) +++ trunk/sat-solver/bindings/ruby/tests/relation.rb Wed Nov 12 15:37:20 2008 @@ -18,11 +18,11 @@ # # -$:.unshift ".." +$:.unshift "../../../build/bindings/ruby" +require 'pathname' # test Relation require 'test/unit' -require 'pathname' require 'satsolver' class SolvableTest < Test::Unit::TestCase @@ -32,7 +32,8 @@ @repo = Satsolver::Repo.new( @pool, "test" ) assert @repo @pool.arch = "i686" - @repo = @pool.add_solv( Pathname( File.dirname( __FILE__ ) ) + "os11-biarch.solv" ) + solvpath = Pathname( File.dirname( __FILE__ ) ) + Pathname( "../../testdata" ) + "os11-biarch.solv" + @repo = @pool.add_solv( solvpath ) assert @repo.size > 0 end def test_relation_accessors Modified: trunk/sat-solver/bindings/ruby/tests/repo.rb URL: http://svn.opensuse.org/viewcvs/zypp/trunk/sat-solver/bindings/ruby/tests/re... ============================================================================== --- trunk/sat-solver/bindings/ruby/tests/repo.rb (original) +++ trunk/sat-solver/bindings/ruby/tests/repo.rb Wed Nov 12 15:37:20 2008 @@ -26,11 +26,11 @@ # this will return the 'best' solvable named 'A' or nil if no such solvable exists. # -$:.unshift ".." +$:.unshift "../../../build/bindings/ruby" +require 'pathname' # test Repo require 'test/unit' -require 'pathname' require 'satsolver' class RepoTest < Test::Unit::TestCase @@ -48,7 +48,8 @@ pool = Satsolver::Pool.new assert pool pool.arch = "i686" - repo = pool.add_solv( Pathname( File.dirname( __FILE__ ) ) + "os11-biarch.solv" ) + solvpath = Pathname( File.dirname( __FILE__ ) ) + Pathname( "../../testdata" ) + "os11-biarch.solv" + repo = pool.add_solv( solvpath ) repo.name = "test" assert repo.name == "test" assert repo.size > 0 @@ -57,7 +58,8 @@ pool = Satsolver::Pool.new assert pool pool.arch = "i686" - repo = pool.add_solv( Pathname( File.dirname( __FILE__ ) ) + "os11-biarch.solv" ) + solvpath = Pathname( File.dirname( __FILE__ ) ) + Pathname( "../../testdata" ) + "os11-biarch.solv" + repo = pool.add_solv( solvpath ) repo.each { |s| puts s } Modified: trunk/sat-solver/bindings/ruby/tests/repodata.rb URL: http://svn.opensuse.org/viewcvs/zypp/trunk/sat-solver/bindings/ruby/tests/re... ============================================================================== --- trunk/sat-solver/bindings/ruby/tests/repodata.rb (original) +++ trunk/sat-solver/bindings/ruby/tests/repodata.rb Wed Nov 12 15:37:20 2008 @@ -3,10 +3,10 @@ # $:.unshift "../../../build/bindings/ruby" +require 'pathname' # test Repodata require 'test/unit' -require 'pathname' require 'satsolver' class RepodataTest < Test::Unit::TestCase @@ -14,7 +14,8 @@ pool = Satsolver::Pool.new assert pool pool.arch = "x86_64" - repo = pool.add_solv( Pathname( File.dirname( __FILE__ ) ) + "os11-biarch.solv" ) + solvpath = Pathname( File.dirname( __FILE__ ) ) + Pathname( "../../testdata" ) + "os11-biarch.solv" + repo = pool.add_solv( solvpath ) repo.name = "openSUSE 11.0 Beta3 BiArch" puts "Repo #{repo.name} loaded with #{repo.size} solvables" Modified: trunk/sat-solver/bindings/ruby/tests/rpmdb.rb URL: http://svn.opensuse.org/viewcvs/zypp/trunk/sat-solver/bindings/ruby/tests/rp... ============================================================================== --- trunk/sat-solver/bindings/ruby/tests/rpmdb.rb (original) +++ trunk/sat-solver/bindings/ruby/tests/rpmdb.rb Wed Nov 12 15:37:20 2008 @@ -10,7 +10,8 @@ # # -$:.unshift ".." +$:.unshift "../../../build/bindings/ruby" +require 'pathname' # test adding rpmdb require 'test/unit' Modified: trunk/sat-solver/bindings/ruby/tests/search.rb URL: http://svn.opensuse.org/viewcvs/zypp/trunk/sat-solver/bindings/ruby/tests/se... ============================================================================== --- trunk/sat-solver/bindings/ruby/tests/search.rb (original) +++ trunk/sat-solver/bindings/ruby/tests/search.rb Wed Nov 12 15:37:20 2008 @@ -3,10 +3,10 @@ # $:.unshift "../../../build/bindings/ruby" +require 'pathname' # test Repodata require 'test/unit' -require 'pathname' require 'satsolver' class RepodataTest < Test::Unit::TestCase @@ -17,7 +17,8 @@ pool = Satsolver::Pool.new assert pool pool.arch = "x86_64" - repo = pool.add_solv( Pathname( File.dirname( __FILE__ ) ) + "os11-biarch.solv" ) + solvpath = Pathname( File.dirname( __FILE__ ) ) + Pathname( "../../testdata" ) + "os11-biarch.solv" + repo = pool.add_solv( solvpath ) repo.name = "openSUSE 11.0 Beta3 BiArch" puts "Repo #{repo.name} loaded with #{repo.size} solvables" @@ -29,7 +30,8 @@ pool = satsolver.Pool() assert pool pool.set_arch("i686") - repo = pool.add_solv( "os11-biarch.solv" ) + solvpath = Pathname( File.dirname( __FILE__ ) ) + Pathname( "../../testdata" ) + "os11-biarch.solv" + repo = pool.add_solv( solvpath ) repo.set_name("test") for d in pool.search("/usr/bin/python", satsolver.SEARCH_STRING|satsolver.SEARCH_FILES): print d.solvable(), "matches '/usr/bin/python' in ", d.key(), ": ", d.value() @@ -42,7 +44,8 @@ pool = Satsolver::Pool.new assert pool pool.arch = "x86_64" - repo = pool.add_solv( Pathname( File.dirname( __FILE__ ) ) + "os11-biarch.solv" ) + solvpath = Pathname( File.dirname( __FILE__ ) ) + Pathname( "../../testdata" ) + "os11-biarch.solv" + repo = pool.add_solv( solvpath ) repo.name = "openSUSE 11.0 Beta3 BiArch" puts "Repo #{repo.name} loaded with #{repo.size} solvables" @@ -54,7 +57,8 @@ pool = satsolver.Pool() assert pool pool.set_arch("i686") - repo = pool.add_solv( "os11-biarch.solv" ) + solvpath = Pathname( File.dirname( __FILE__ ) ) + Pathname( "../../testdata" ) + "os11-biarch.solv" + repo = pool.add_solv( solvpath ) repo.set_name("test") for d in repo.search("/usr/bin/python", satsolver.SEARCH_STRING|satsolver.SEARCH_FILES): print d.solvable(), "matches '/usr/bin/python' in ", d.key(), ": ", d.value() Modified: trunk/sat-solver/bindings/ruby/tests/solutions.rb URL: http://svn.opensuse.org/viewcvs/zypp/trunk/sat-solver/bindings/ruby/tests/so... ============================================================================== --- trunk/sat-solver/bindings/ruby/tests/solutions.rb (original) +++ trunk/sat-solver/bindings/ruby/tests/solutions.rb Wed Nov 12 15:37:20 2008 @@ -5,7 +5,8 @@ # # -$:.unshift ".." +$:.unshift "../../../build/bindings/ruby" +require 'pathname' # test Solutions require 'test/unit' Modified: trunk/sat-solver/bindings/ruby/tests/solvable.rb URL: http://svn.opensuse.org/viewcvs/zypp/trunk/sat-solver/bindings/ruby/tests/so... ============================================================================== --- trunk/sat-solver/bindings/ruby/tests/solvable.rb (original) +++ trunk/sat-solver/bindings/ruby/tests/solvable.rb Wed Nov 12 15:37:20 2008 @@ -1,9 +1,9 @@ -$:.unshift ".." +$:.unshift "../../../build/bindings/ruby" +require 'pathname' # test Solvable require 'test/unit' -require 'pathname' require 'satsolver' def show_dep name, deps @@ -26,7 +26,8 @@ @pool = Satsolver::Pool.new assert @pool @pool.arch = "i686" - @pool.add_solv( Pathname( File.dirname( __FILE__ ) ) + "os11-biarch.solv" ) + solvpath = Pathname( File.dirname( __FILE__ ) ) + Pathname( "../../testdata" ) + "os11-biarch.solv" + @pool.add_solv( solvpath ) assert @pool.size > 0 end def test_solvable Modified: trunk/sat-solver/bindings/ruby/tests/solver.rb URL: http://svn.opensuse.org/viewcvs/zypp/trunk/sat-solver/bindings/ruby/tests/so... ============================================================================== --- trunk/sat-solver/bindings/ruby/tests/solver.rb (original) +++ trunk/sat-solver/bindings/ruby/tests/solver.rb Wed Nov 12 15:37:20 2008 @@ -1,4 +1,5 @@ -$:.unshift ".." +$:.unshift "../../../build/bindings/ruby" +require 'pathname' # test Solver Modified: trunk/sat-solver/bindings/ruby/tests/transaction.rb URL: http://svn.opensuse.org/viewcvs/zypp/trunk/sat-solver/bindings/ruby/tests/tr... ============================================================================== --- trunk/sat-solver/bindings/ruby/tests/transaction.rb (original) +++ trunk/sat-solver/bindings/ruby/tests/transaction.rb Wed Nov 12 15:37:20 2008 @@ -1,9 +1,9 @@ -$:.unshift ".." +$:.unshift "../../../build/bindings/ruby" +require 'pathname' # test Transction require 'test/unit' -require 'pathname' require 'satsolver' class TransactionTest < Test::Unit::TestCase @@ -11,7 +11,8 @@ pool = Satsolver::Pool.new assert pool pool.arch = "i686" - repo = pool.add_solv( Pathname( File.dirname( __FILE__ ) ) + "os11-biarch.solv" ) + solvpath = Pathname( File.dirname( __FILE__ ) ) + Pathname( "../../testdata" ) + "os11-biarch.solv" + repo = pool.add_solv( solvpath ) repo.name = "test1" transaction = Satsolver::Transaction.new( pool ) Modified: trunk/sat-solver/bindings/ruby/tests/updates.rb URL: http://svn.opensuse.org/viewcvs/zypp/trunk/sat-solver/bindings/ruby/tests/up... ============================================================================== --- trunk/sat-solver/bindings/ruby/tests/updates.rb (original) +++ trunk/sat-solver/bindings/ruby/tests/updates.rb Wed Nov 12 15:37:20 2008 @@ -1,4 +1,5 @@ -$:.unshift ".." +$:.unshift "../../../build/bindings/ruby" +require 'pathname' # test Updates -- To unsubscribe, e-mail: zypp-commit+unsubscribe@opensuse.org For additional commands, e-mail: zypp-commit+help@opensuse.org