Skip to content

Commit 5818599

Browse files
committed
change BDD run script to new style tester
1 parent 73d41de commit 5818599

File tree

4 files changed

+6
-16
lines changed

4 files changed

+6
-16
lines changed

CMakeLists.txt

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -308,10 +308,6 @@ if (BUILD_TESTS)
308308
set(TESTING_TIMEOUT 1200)
309309
endif()
310310
add_subdirectory(tests)
311-
configure_file(
312-
${PROJECT_SOURCE_DIR}/tests/run-behave.in
313-
${PROJECT_BINARY_DIR}/run-behave
314-
)
315311
else()
316312
message(STATUS "Tests disabled. Set BUILD_TESTS=ON to enable tests.")
317313
endif()

tests/CMakeLists.txt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,14 +118,15 @@ if (NOT WIN32)
118118
set_tests_properties(FixtureTablespaceCleanup PROPERTIES FIXTURES_CLEANUP Tablespace)
119119
endif()
120120

121+
configure_file(run-bdd-tests.in ${PROJECT_BINARY_DIR}/run-bdd-tests)
121122

122123
find_program(BEHAVE_BIN NAMES behave)
123124

124125
if (BEHAVE_BIN)
125126
foreach(BDD_TEST IN ITEMS command-line flex regression)
126127
add_test(NAME bdd-${BDD_TEST}
127-
COMMAND behave -DBINARY=$<TARGET_FILE:osm2pgsql> ${BDD_TEST}
128-
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/bdd)
128+
COMMAND ./run-bdd-tests ${CMAKE_CURRENT_SOURCE_DIR}/bdd/${BDD_TEST}
129+
WORKING_DIRECTORY ${PROJECT_BINARY_DIR})
129130
message(STATUS "Added test: bdd-${BDD_TEST}")
130131
endforeach(BDD_TEST)
131132

tests/run-bdd-tests.in

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#!/bin/sh
2+
3+
@PROJECT_SOURCE_DIR@/scripts/osm2pgsql-test-style --style-data-dir @PROJECT_SOURCE_DIR@ --test-data-dir @CMAKE_CURRENT_SOURCE_DIR@/data/ --osm2pgsql-binary @PROJECT_BINARY_DIR@/osm2pgsql "$@"

tests/run-behave.in

Lines changed: 0 additions & 10 deletions
This file was deleted.

0 commit comments

Comments
 (0)