Skip to content
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

Merged
merged 3 commits into from Jul 11, 2019
Merged

Conversation

klecki
Copy link
Contributor

@klecki klecki commented Jun 27, 2019

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

@klecki
Copy link
Contributor Author

klecki commented Jun 27, 2019

TODO: proper dependencies for python tests.

# limitations under the License.


set(DALI_PYTHON_NOSETESTS
Copy link
Contributor

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?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@mzient
Copy link
Contributor

mzient commented Jun 28, 2019

!build

@@ -151,6 +151,10 @@ cuda_include_directories(
"${PROJECT_SOURCE_DIR}"
"${PROJECT_SOURCE_DIR}/include")


set(CHECK_TARGET "check")
Copy link
Contributor

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"?

Copy link
Contributor Author

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).

@dali-automaton
Copy link
Collaborator

CI MESSAGE: [797539]: BUILD STARTED

@dali-automaton
Copy link
Collaborator

CI MESSAGE: [797539]: BUILD PASSED

@klecki klecki changed the title [WIP] Add make check target that runs basic tests Add make check target that runs basic tests Jun 28, 2019
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>
@klecki
Copy link
Contributor Author

klecki commented Jul 10, 2019

!build

@dali-automaton
Copy link
Collaborator

CI MESSAGE: [809053]: BUILD STARTED

@dali-automaton
Copy link
Collaborator

CI MESSAGE: [809053]: BUILD PASSED

@klecki klecki merged commit 1f63dfa into NVIDIA:master Jul 11, 2019
haoxintong pushed a commit to haoxintong/DALI that referenced this pull request Jul 16, 2019
`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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants