Skip to content

Commit 0f83b21

Browse files
committed
Simplify tests that include Lua files
This is possible because we added the osm2pgsql.config_dir variable a while back.
1 parent d6d52b7 commit 0f83b21

16 files changed

Lines changed: 16 additions & 17 deletions

tests/CMakeLists.txt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,7 @@ function(set_test test_name)
1111
target_link_libraries(${test_name} osm2pgsql_lib catch_main_lib)
1212
add_test(NAME ${test_name} COMMAND ${test_name})
1313

14-
set_tests_properties(${test_name} PROPERTIES TIMEOUT ${TESTING_TIMEOUT}
15-
ENVIRONMENT SRCPATH=${CMAKE_CURRENT_SOURCE_DIR})
14+
set_tests_properties(${test_name} PROPERTIES TIMEOUT ${TESTING_TIMEOUT})
1615

1716
if (DEFINED test_param_LABELS)
1817
list(FIND test_param_LABELS Tablespace test_num_labels)
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11

22
test = { geom_proj = 25832, area_proj = 25832 }
33

4-
dofile(os.getenv('SRCPATH') .. '/data/test_output_flex_area.lua')
4+
dofile(osm2pgsql.config_dir .. '/test_output_flex_area.lua')
55

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11

22
test = { geom_proj = 25832, area_proj = 3857 }
33

4-
dofile(os.getenv('SRCPATH') .. '/data/test_output_flex_area.lua')
4+
dofile(osm2pgsql.config_dir .. '/test_output_flex_area.lua')
55

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11

22
test = { geom_proj = 25832, area_proj = 4326 }
33

4-
dofile(os.getenv('SRCPATH') .. '/data/test_output_flex_area.lua')
4+
dofile(osm2pgsql.config_dir .. '/test_output_flex_area.lua')
55

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11

22
test = { geom_proj = 3857, area_proj = 25832 }
33

4-
dofile(os.getenv('SRCPATH') .. '/data/test_output_flex_area.lua')
4+
dofile(osm2pgsql.config_dir .. '/test_output_flex_area.lua')
55

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11

22
test = { geom_proj = 3857, area_proj = 3857 }
33

4-
dofile(os.getenv('SRCPATH') .. '/data/test_output_flex_area.lua')
4+
dofile(osm2pgsql.config_dir .. '/test_output_flex_area.lua')
55

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11

22
test = { geom_proj = 3857, area_proj = 4326 }
33

4-
dofile(os.getenv('SRCPATH') .. '/data/test_output_flex_area.lua')
4+
dofile(osm2pgsql.config_dir .. '/test_output_flex_area.lua')
55

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11

22
test = { geom_proj = 4326, area_proj = 25832 }
33

4-
dofile(os.getenv('SRCPATH') .. '/data/test_output_flex_area.lua')
4+
dofile(osm2pgsql.config_dir .. '/test_output_flex_area.lua')
55

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11

22
test = { geom_proj = 4326, area_proj = 3857 }
33

4-
dofile(os.getenv('SRCPATH') .. '/data/test_output_flex_area.lua')
4+
dofile(osm2pgsql.config_dir .. '/test_output_flex_area.lua')
55

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11

22
test = { geom_proj = 4326, area_proj = 4326 }
33

4-
dofile(os.getenv('SRCPATH') .. '/data/test_output_flex_area.lua')
4+
dofile(osm2pgsql.config_dir .. '/test_output_flex_area.lua')
55

0 commit comments

Comments
 (0)