File: run-testdata-multipolygon.cmake

package info (click to toggle)
libosmium 2.22.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 4,544 kB
  • sloc: cpp: 52,804; sh: 148; makefile: 19
file content (45 lines) | stat: -rw-r--r-- 1,357 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#-----------------------------------------------------------------------------
#
#  Helper script that runs the 'multipolygon' test.
#
#-----------------------------------------------------------------------------

# Remove files that might be left over from previous run
file(REMOVE multipolygon.db multipolygon-tests.json)


#-----------------------------------------------------------------------------
#
#  Create multipolygons from test data.
#
#-----------------------------------------------------------------------------
execute_process(
    COMMAND ${EXECUTABLE} ${OSM_TESTDATA}/grid/data/all.osm
    RESULT_VARIABLE _result
    OUTPUT_FILE multipolygon.log
    ERROR_FILE multipolygon.log
)

if(_result)
    message(FATAL_ERROR "Error running testdata-multipolygon command")
endif()


#-----------------------------------------------------------------------------
#
#  Compare created multipolygons with reference data.
#
#-----------------------------------------------------------------------------
execute_process(
    COMMAND ${RUBY} ${OSM_TESTDATA}/bin/compare-areas.rb
        ${OSM_TESTDATA}/grid/data/tests.json
        multipolygon-tests.json
    RESULT_VARIABLE _result
)

if(_result)
    message(FATAL_ERROR "Error running compare-areas command")
endif()


#-----------------------------------------------------------------------------