Skip to content

Commit 41ee992

Browse files
committed
Add submodule with osm-testdata repository.
Before this repository had to be installed externally. Now a submodule update can be used to get the correct version of the osm-testdata repository.
1 parent 4d42245 commit 41ee992

File tree

7 files changed

+16
-5
lines changed

7 files changed

+16
-5
lines changed

.gitmodules

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[submodule "test/data-tests/osm-testdata"]
2+
path = test/data-tests/osm-testdata
3+
url = https://github.com/osmcode/osm-testdata

.travis.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,6 @@ matrix:
210210

211211
install:
212212
- git clone --quiet --depth 1 https://github.com/mapbox/protozero.git ../protozero
213-
- git clone --quiet --depth 1 https://github.com/osmcode/osm-testdata.git ../osm-testdata
214213
- |
215214
if [[ "${TRAVIS_OS_NAME}" == "osx" ]]; then
216215
brew remove gdal
@@ -220,6 +219,7 @@ install:
220219

221220
before_script:
222221
- cd ${TRAVIS_BUILD_DIR}
222+
- git submodule update --init
223223
- mkdir build && cd build
224224
- cmake -LA .. -DCMAKE_BUILD_TYPE=${BUILD_TYPE} -DBUILD_WITH_CCACHE=1 -DOSM_TESTDATA="${TRAVIS_BUILD_DIR}/../osm-testdata"
225225

CMakeLists.txt

+1-2
Original file line numberDiff line numberDiff line change
@@ -513,8 +513,7 @@ include(CPack)
513513
if(BUILD_DATA_TESTS AND OSM_TESTDATA STREQUAL "OSM_TESTDATA-NOTFOUND")
514514
message("\n========================== WARNING ==========================")
515515
message("osm-testdata directory not found, data tests were disabled!\n")
516-
message("You can get it from https://github.com/osmcode/osm-testdata")
517-
message("Clone it into the same directory libosmium is in")
516+
message("Call 'git submodule update --init' to install test data")
518517
message("or set the OSM_TESTDATA cmake variable to its path.")
519518
message("=============================================================\n")
520519
endif()

README.md

+8
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,14 @@ chapter in the manual.
7676

7777
## Testing
7878

79+
To download the `osm-testdata` submodule call:
80+
81+
```
82+
git submodule update --init
83+
```
84+
85+
This will enable additional tests.
86+
7987
See the
8088
[Libosmium Manual](http://osmcode.org/libosmium/manual.html#running-tests)
8189
for instructions.

appveyor.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ clone_folder: c:\projects\libosmium
3636
# halts: "msys2-runtime and catgets are in conflict. Remove catgets?"
3737
# See also: https://github.com/Alexpux/MSYS2-packages/issues/1141
3838
install:
39+
- git submodule update --init
3940
- cd c:\projects
40-
- git clone --depth 1 https://github.com/osmcode/osm-testdata
4141
- git clone --depth 1 https://github.com/mapbox/protozero
4242
- if [%config%]==[MSYS2] (
4343
C:\msys64\usr\bin\pacman --noconfirm --sync --refresh --refresh --sysupgrade --sysupgrade --ask=20

test/data-tests/CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ if(NOT GDAL_FOUND OR NOT EXPAT_FOUND)
1515
endif()
1616

1717
message(STATUS "Looking for osm-testdata")
18-
find_path(OSM_TESTDATA grid/data/all.osm HINT ../../../osm-testdata)
18+
find_path(OSM_TESTDATA grid/data/all.osm HINT osm-testdata)
1919
if(OSM_TESTDATA STREQUAL "OSM_TESTDATA-NOTFOUND")
2020
message(STATUS "Looking for osm-testdata - not found (data tests disabled)")
2121
message(STATUS "Configuring data tests - failed")

test/data-tests/osm-testdata

Submodule osm-testdata added at e5857aa

0 commit comments

Comments
 (0)