New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add make check target that runs basic tests #1019
Conversation
TODO: proper dependencies for python tests. |
dali/test/python/CMakeLists.txt
Outdated
# limitations under the License. | ||
|
||
|
||
set(DALI_PYTHON_NOSETESTS |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It soon will be out of sync with L0_*, can we have one file where we keep those test and call it from L0_ and cmake?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
!build |
@@ -151,6 +151,10 @@ cuda_include_directories( | |||
"${PROJECT_SOURCE_DIR}" | |||
"${PROJECT_SOURCE_DIR}/include") | |||
|
|||
|
|||
set(CHECK_TARGET "check") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Out of curiosity: why not "test"?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I got inspired by https://clang.llvm.org/get_started.html where they have make check-clang.
I didn't want to call it test
, because make test
could also suggest the building of tests (which we control by BUILD_TEST
CMake flag).
CI MESSAGE: [797539]: BUILD STARTED |
CI MESSAGE: [797539]: BUILD PASSED |
Separate subtargets make check-gtest # for C++ unit tests make check-python # runs L0_python_self_tests For python there is tree of targets: make check-python-nose # runs all nosetests from L0_python_self_test make check-python-nose-testname # to run specific test make check-python-test # runs all python something.py tests from L0_python_self_test make check-python-test-testname # to run specific test Does not modify user's environment by any installation Expects nose and required pip packages to be present Expects DALI_EXTRA_PATH to be set up Signed-off-by: Krzysztof Lecki <klecki@nvidia.com>
make check-python uses that to run tests Simplified targets to: check: check-gtest # only C++ gtest cases check-python # contents of L0_python-self-test/test_body.sh Signed-off-by: Krzysztof Lecki <klecki@nvidia.com>
!build |
CI MESSAGE: [809053]: BUILD STARTED |
CI MESSAGE: [809053]: BUILD PASSED |
`check` target runs gtest and python L0 unit tests. Does not modify user's environment by any installation Expects nose and required pip packages to be present Expects DALI_EXTRA_PATH to be set up Moved test running in qa/L0_python-self-test to separate file make check-python uses that to run tests check has two subtargets: check-gtest # only C++ gtest cases check-python # contents of L0_python-self-test/test_body.sh Signed-off-by: Krzysztof Lecki <klecki@nvidia.com>
Separate subtargets
make check-gtest # for C++ unit tests
make check-python # runs L0_python_self_tests
make check # runs all check-* targets
Does not modify user's environment by any installation
Expects nose and required pip packages to be present
Expects DALI_EXTRA_PATH to be set up
Signed-off-by: Krzysztof Lecki klecki@nvidia.com