Skip to content

Commit

Permalink
Merge pull request #660 from apiaryio/tjanc/cmake-integration-tests
Browse files Browse the repository at this point in the history
Added cucumber integration tests to CTest config
  • Loading branch information
tjanc authored Nov 5, 2018
2 parents 44c81e6 + 0accdfb commit ec00e31
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,11 @@ add_subdirectory(ext/snowcrash EXCLUDE_FROM_ALL)
# drafter
add_subdirectory(src)
if(${BUILD_TESTING})
option(INTEGRATION_TESTS "Run integration tests" OFF)
add_subdirectory(test)
if(${INTEGRATION_TESTS})
include(integration.cmake)
endif()
add_custom_target(drafter-test-suite ALL)
add_dependencies(drafter-test-suite drafter-test markdown-parser-test snowcrash-test)
endif()
Expand Down
2 changes: 1 addition & 1 deletion features/support/env.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
Before do
@dirs << "../../features/fixtures"

ENV['PATH'] = "./bin#{File::PATH_SEPARATOR}#{ENV['PATH']}"
ENV['PATH'] = "#{ENV['PWD']}/src#{File::PATH_SEPARATOR}#{ENV['PATH']}"
end
7 changes: 7 additions & 0 deletions integration.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
cmake_minimum_required(VERSION 3.6 FATAL_ERROR)

find_program(Bundler bundle)

file(COPY ${CMAKE_CURRENT_LIST_DIR}/features DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
add_custom_target(BundleInstall ALL COMMAND ${Bundler} install --path vendor/bundle)
add_test(NAME DrafterIntegration COMMAND ${Bundler} exec cucumber)

0 comments on commit ec00e31

Please sign in to comment.