Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
T
tests_api
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
hive
tests_api
Commits
845d73e8
Commit
845d73e8
authored
4 years ago
by
Marcin
Browse files
Options
Downloads
Patches
Plain Diff
Add pyrest tests cmake method
parent
7098b271
No related branches found
No related tags found
1 merge request
!10
apitests for ci started with cmake and ctest
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
ApiTests.cmake
+18
-0
18 additions, 0 deletions
ApiTests.cmake
with
18 additions
and
0 deletions
ApiTests.cmake
+
18
−
0
View file @
845d73e8
...
...
@@ -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
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment