Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failing tests on Ubuntu 14.04, Mapnik 2.3.0-pre #55

Open
systemed opened this issue Aug 27, 2015 · 2 comments
Open

Failing tests on Ubuntu 14.04, Mapnik 2.3.0-pre #55

systemed opened this issue Aug 27, 2015 · 2 comments

Comments

@systemed
Copy link

Following tests are failing. Mapnik 2.3.0-pre from packages as per https://github.com/mapnik/mapnik/wiki/UbuntuInstallation.

Error: test_should_add_a_geometry(TestMapnikFeature): ArgumentError: Unable to convert Fixnum to long long
/root/Ruby-Mapnik/test/test_mapnik_feature.rb:23:in `initialize'
/root/Ruby-Mapnik/test/test_mapnik_feature.rb:23:in `new'
/root/Ruby-Mapnik/test/test_mapnik_feature.rb:23:in `test_should_add_a_geometry'
     20:   end
     21: 
     22:   def test_should_add_a_geometry
  => 23:     feature = Mapnik::Feature.new(Mapnik::Context.new, 1)
     24:     assert_equal(0, feature.number_of_geometries)
     25:     feature.add_geometries_from_wkt("POINT(30 10)")
     26:     assert_equal(1, feature.number_of_geometries)

Error: test_should_instantiate(TestMapnikFeature): ArgumentError: Unable to convert Fixnum to long long
/root/Ruby-Mapnik/test/test_mapnik_feature.rb:7:in `initialize'
/root/Ruby-Mapnik/test/test_mapnik_feature.rb:7:in `new'
/root/Ruby-Mapnik/test/test_mapnik_feature.rb:7:in `test_should_instantiate'
      4: 
      5:   def test_should_instantiate
      6:     feature_id = 12
  =>  7:     assert feature = Mapnik::Feature.new(Mapnik::Context.new, feature_id)
      8:     assert_equal feature_id, feature.id
      9:     assert_equal "Feature ( id=#{feature_id})", feature.to_s.gsub("\n", '')
     10:   end

Error: test_should_return_its_envelope(TestMapnikFeature): ArgumentError: Unable to convert Fixnum to long long
/root/Ruby-Mapnik/test/test_mapnik_feature.rb:18:in `initialize'
/root/Ruby-Mapnik/test/test_mapnik_feature.rb:18:in `new'
/root/Ruby-Mapnik/test/test_mapnik_feature.rb:18:in `test_should_return_its_envelope'
     15:   end
     16: 
     17:   def test_should_return_its_envelope
  => 18:     assert feature = Mapnik::Feature.new(Mapnik::Context.new, 1)
     19:     assert feature.envelope.kind_of?(Mapnik::Envelope)
     20:   end
     21: 

Error: test_should_return_number_of_geometries(TestMapnikFeature): ArgumentError: Unable to convert Fixnum to long long
/root/Ruby-Mapnik/test/test_mapnik_feature.rb:13:in `initialize'
/root/Ruby-Mapnik/test/test_mapnik_feature.rb:13:in `new'
/root/Ruby-Mapnik/test/test_mapnik_feature.rb:13:in `test_should_return_number_of_geometries'
     10:   end
     11: 
     12:   def test_should_return_number_of_geometries
  => 13:     assert feature = Mapnik::Feature.new(Mapnik::Context.new, 1)
     14:     assert_equal 0, feature.number_of_geometries
     15:   end
     16: 

Error: test_should_load_from_file(TestMapnikMap): ArgumentError: Unable to convert  to mapnik::Map*
/root/Ruby-Mapnik/lib/ruby_mapnik/mapnik/map.rb:107:in `__load_map__'
/root/Ruby-Mapnik/lib/ruby_mapnik/mapnik/map.rb:107:in `from_file'
/root/Ruby-Mapnik/test/test_mapnik_map.rb:182:in `test_should_load_from_file'
     179: 
     180:   def test_should_load_from_file
     181:     file = File.open(File.join(File.expand_path(File.dirname(__FILE__)), "data", "test_map.xml"))
  => 182:     map = Mapnik::Map.from_file(file)
     183:     assert map.layers.any?
     184:     assert map.styles['My Style']
     185:   end

Error: test_should_load_from_file_path_string(TestMapnikMap): ArgumentError: Unable to convert  to mapnik::Map*
/root/Ruby-Mapnik/lib/ruby_mapnik/mapnik/map.rb:107:in `__load_map__'
/root/Ruby-Mapnik/lib/ruby_mapnik/mapnik/map.rb:107:in `from_file'
/root/Ruby-Mapnik/test/test_mapnik_map.rb:175:in `test_should_load_from_file_path_string'
     172: 
     173:   def test_should_load_from_file_path_string
     174:     file_path = File.join(File.expand_path(File.dirname(__FILE__)), "data", "test_map.xml")
  => 175:     map = Mapnik::Map.from_file(file_path)
     176:     assert map.layers.any?
     177:     assert map.styles['My Style']
     178:   end

(There were also a handful of dependencies not mentioned in README.md: hoe, rake-compiler, minitest, test-unit, chunky_png.)

@systemed
Copy link
Author

By commenting out the failing TestMapnikMap tests and test_should_instantiate in TestMapnikFeature, and changing #if MAPNIK_VERSION >= 200200 to == in _mapnik_feature_rb.cpp, it builds successfully. However, running rundemo.rb results in a very partial image, with just some of the woodland at the top left.

Curiously, reverting to 0.1.5, making the same changes, and removing the force_odd_labels code actually results in a successful build and demo image.

@gravitystorm
Copy link
Contributor

Same set of failures as #52 - we need to track down at what point they started failing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants