Skip to content
Snippets Groups Projects
Commit 845d73e8 authored by Marcin's avatar Marcin
Browse files

Add pyrest tests cmake method

parent 7098b271
No related branches found
No related tags found
1 merge request!10apitests for ci started with cmake and ctest
......@@ -23,6 +23,24 @@ macro(ADD_API_TEST common_working_dir directory_with_test product api_name test_
set_property(TEST "api/${api_name}/${test_name}" PROPERTY LABELS python_tests ${api_name} ${test_name})
endmacro(ADD_API_TEST)
# @common_working_dir - the root of working directories for all the api test
# @directory_with_test - full path to tests_api repo on the disk
# @product - hived or hivemind
# @blocks - number of synchronized blocks
# @api_name - full api name i.e. condenser_api
macro(ADD_API_PYREST_TEST common_working_dir directory_with_test product blocks api_name)
# set(working_dir ${CMAKE_BINARY_DIR}/tests)
set( pyrest_tests_subdir "pyrest_tests" )
set(working_dir ${directory_with_test}/${product}/${pyrest_tests_subdir})
set(test_file_path ${directory_with_test}/${product}/${pyrest_tests_subdir}/${blocks}/${api_name}/${api_name}_test.yaml)
set(api_test_directory ${directory_with_test}/${product}/${pyrest_tests_subdir}/${api_name})
set(test_name "api/pyresttests/${blocks}/${api_name}")
message(STATUS "Adding ${test_name}" )
set(test_parameters ${test_file_path} "--import_extensions=validator_ex\;comparator_equal")
add_test(NAME ${test_name} COMMAND pyresttest ${TEST_NODE} ${test_parameters} WORKING_DIRECTORY ${working_dir})
set_property(TEST ${test_name} PROPERTY LABELS python_tests ${api_name} ${test_name})
endmacro(ADD_API_PYREST_TEST)
# @directory_with_test - full path to tests_api repo on the disk
# @product - hived or hivemind
macro(ADD_API_SMOKETEST directory_with_test product)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment