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

[CI] Allow command-line argument or TVM_BUILD_PATH for C++ unittests #12011

Merged
merged 4 commits into from
Jul 6, 2022

Conversation

Lunderberg
Copy link
Contributor

@Lunderberg Lunderberg commented Jul 5, 2022

Previously, the ci.py script would execute all C++ unit tests in the "build" directory, regardless of the docker image being used. This change allows a caller to specify the build directory to be used by task_cpp_unittest.sh, either by the command line or by using the same TVM_BUILD_PATH environment variable as used by the top-level Makefile, and passes this argument from ci.py. To preserve the existing behavior for the pre-commit CI, if no argument is passed and if the TVM_BUILD_PATHis undefined,task_cpp_unittest.shdefaults to the"build"` directory.

Python unit tests executed through ci.py used the TVM_LIBRARY_PATH environment variable, and were not similarly affected.

cc @Mousius @areusch @driazati

Previously, the `ci.py` script would execute all C++ unit tests in the
`"build"` directory, regardless of the docker image being used.  This
change allows a caller to specify the build directory to be used by
`task_cpp_unittest.sh`, either by the command line or by using the
same `TVM_BUILD_PATH environment variable as used by the top-level
Makefile, and passes this argument from `ci.py`.  To preserve the
existing behavior for the pre-commit CI, if no argument is passed and
if the `TVM_BUILD_PATH` is undefined, `task_cpp_unittest.sh` defaults
to the `"build"` directory.

Python unit tests executed through `ci.py` used the `TVM_LIBRARY_PATH`
environment variable, and were not similarly affected.
@Lunderberg Lunderberg requested a review from driazati July 5, 2022 20:43
@Lunderberg
Copy link
Contributor Author

Motivating reason was #11970, where a failure in the C++ tests in ci_wasm required multiple steps to reproduce locally.

Copy link
Member

@driazati driazati left a comment

Choose a reason for hiding this comment

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

lgtm, thanks for cleaning this up!

tests/scripts/ci.py Outdated Show resolved Hide resolved
Co-authored-by: driazati <9407960+driazati@users.noreply.github.com>
@github-actions github-actions bot requested review from Mousius and areusch July 5, 2022 21:18
Otherwise, `set -u` rightly errors out for it being undefined.
@masahi masahi merged commit c57320b into apache:main Jul 6, 2022
blackkker pushed a commit to blackkker/tvm that referenced this pull request Jul 7, 2022
…pache#12011)

* [CI] Use command-line argument or TVM_BUILD_PATH for C++ unittests

Previously, the `ci.py` script would execute all C++ unit tests in the
`"build"` directory, regardless of the docker image being used.  This
change allows a caller to specify the build directory to be used by
`task_cpp_unittest.sh`, either by the command line or by using the
same `TVM_BUILD_PATH environment variable as used by the top-level
Makefile, and passes this argument from `ci.py`.  To preserve the
existing behavior for the pre-commit CI, if no argument is passed and
if the `TVM_BUILD_PATH` is undefined, `task_cpp_unittest.sh` defaults
to the `"build"` directory.

Python unit tests executed through `ci.py` used the `TVM_LIBRARY_PATH`
environment variable, and were not similarly affected.

* Remove `name=name` in format script

Co-authored-by: driazati <9407960+driazati@users.noreply.github.com>

* Fix lint error

* Use default expansion of TVM_BUILD_PATH

Otherwise, `set -u` rightly errors out for it being undefined.

Co-authored-by: driazati <9407960+driazati@users.noreply.github.com>
masahi pushed a commit to masahi/tvm that referenced this pull request Jul 15, 2022
…pache#12011)

* [CI] Use command-line argument or TVM_BUILD_PATH for C++ unittests

Previously, the `ci.py` script would execute all C++ unit tests in the
`"build"` directory, regardless of the docker image being used.  This
change allows a caller to specify the build directory to be used by
`task_cpp_unittest.sh`, either by the command line or by using the
same `TVM_BUILD_PATH environment variable as used by the top-level
Makefile, and passes this argument from `ci.py`.  To preserve the
existing behavior for the pre-commit CI, if no argument is passed and
if the `TVM_BUILD_PATH` is undefined, `task_cpp_unittest.sh` defaults
to the `"build"` directory.

Python unit tests executed through `ci.py` used the `TVM_LIBRARY_PATH`
environment variable, and were not similarly affected.

* Remove `name=name` in format script

Co-authored-by: driazati <9407960+driazati@users.noreply.github.com>

* Fix lint error

* Use default expansion of TVM_BUILD_PATH

Otherwise, `set -u` rightly errors out for it being undefined.

Co-authored-by: driazati <9407960+driazati@users.noreply.github.com>
@Lunderberg Lunderberg deleted the ci_py_cpp_unittest_directory branch August 1, 2022 15:11
mikeseven pushed a commit to mikeseven/tvm that referenced this pull request Sep 27, 2023
…pache#12011)

* [CI] Use command-line argument or TVM_BUILD_PATH for C++ unittests

Previously, the `ci.py` script would execute all C++ unit tests in the
`"build"` directory, regardless of the docker image being used.  This
change allows a caller to specify the build directory to be used by
`task_cpp_unittest.sh`, either by the command line or by using the
same `TVM_BUILD_PATH environment variable as used by the top-level
Makefile, and passes this argument from `ci.py`.  To preserve the
existing behavior for the pre-commit CI, if no argument is passed and
if the `TVM_BUILD_PATH` is undefined, `task_cpp_unittest.sh` defaults
to the `"build"` directory.

Python unit tests executed through `ci.py` used the `TVM_LIBRARY_PATH`
environment variable, and were not similarly affected.

* Remove `name=name` in format script

Co-authored-by: driazati <9407960+driazati@users.noreply.github.com>

* Fix lint error

* Use default expansion of TVM_BUILD_PATH

Otherwise, `set -u` rightly errors out for it being undefined.

Co-authored-by: driazati <9407960+driazati@users.noreply.github.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.

3 participants