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

test protobuffer import without requiring osmosis/JAVA #1788

Closed
emiltin opened this issue Nov 20, 2015 · 12 comments
Closed

test protobuffer import without requiring osmosis/JAVA #1788

emiltin opened this issue Nov 20, 2015 · 12 comments

Comments

@emiltin
Copy link
Contributor

emiltin commented Nov 20, 2015

testing pbf import currently uses osmosis, which requires a java installation. if you don't have one, you will get a system popup on os x asking if if you want to install java.

osmosis is used for converting xml (.osm) to pbf.

@daniel-j-h
Copy link
Member

libosmium comes with a tool that is able to convert from osm xml to osm pbf --- but that's not all we're using osmosis for, is it?

@TheMarex
Copy link
Member

@daniel-j-h I actually think that is the only current usecase. That is the only reference that I found grepping for osmosis.

unless system "osmosis --read-xml #{osm_file}.osm --write-pbf #{osm_file}.osm.pbf omitmetadata=true >>#{PREPROCESS_LOG_FILE} 2>&1"

@emiltin
Copy link
Contributor Author

emiltin commented Nov 21, 2015

yes only use. does libosmium come with a binary for converting?
another solution would be to include a pbf file in the repo, but i think it would make it less flexible and clear what we're testing.

@lonvia
Copy link
Contributor

lonvia commented Nov 21, 2015

Is this conversion even needed now that the osm data is parsed with libosmium? It should be able to read the xml directly.

@emiltin
Copy link
Contributor Author

emiltin commented Nov 21, 2015

the default for tests is to load xml. but if we want to also test loading pbf files we need a few tests that load pbf files.

@lonvia
Copy link
Contributor

lonvia commented Nov 21, 2015

In theory it would be the job of the libosmium test suite to check that pbf is read correctly in terms of content. Consequently, it would be completely sufficient to have a single test that reads a fixed pbf file and makes sure that libosmium is used correctly by OSRM. In practice, it all depends on how much you trust libosmium.

@TheMarex
Copy link
Member

Since this are integration tests we want to make sure our whole stack is working, so we should probably not just drop the tests. In any case its just like three test cases, we don't rerun all test on pbf and xml.

👍 for removing osmosis and replacing with the equivalent osmium based tool.

@emiltin
Copy link
Contributor Author

emiltin commented Nov 21, 2015

osmium is build with c++, so we would get rid of java?

@daniel-j-h
Copy link
Member

@emiltin note that you have to build osmium_convert explicitely by means of setting BUILD_EXAMPLES.

Right now, we do not build the examples, but use libosmium as header only drop-in.

@emiltin
Copy link
Contributor Author

emiltin commented Nov 24, 2015

we would then build the osmium tools as part of the osrm build process?

@daniel-j-h
Copy link
Member

Correct; without building the tests or other features, just the examples. Then use the osmium_convert tool to convert between xml and pbf.

daniel-j-h added a commit that referenced this issue Jan 11, 2016
This provides a script to build the libosmium examples such as
osmium_convert (to convert from xml to pbf).

I initially tried a CMake ExternalProject setup, but this was more
complicated than I initially thought; this is the more elegant solution.

The goal is to eventually rip out osmosis, so that we no longer depend
on java for the cucumber tests.

References:

- #1788
TheMarex pushed a commit that referenced this issue Jan 13, 2016
This provides a script to build the libosmium examples such as
osmium_convert (to convert from xml to pbf).

I initially tried a CMake ExternalProject setup, but this was more
complicated than I initially thought; this is the more elegant solution.

The goal is to eventually rip out osmosis, so that we no longer depend
on java for the cucumber tests.

References:

- #1788
@daniel-j-h
Copy link
Member

#1877 rips out osmosis / the java dependency.

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

4 participants