Skip to content

Commit

Permalink
[CI] Allow CI_PYTEST_ADD_OPTIONS to be unbound. (apache#5644)
Browse files Browse the repository at this point in the history
This patch allows the test script to execute normally
when CI_PYTEST_ADD_OPTIONS is not available.
  • Loading branch information
tqchen authored and trevor-m committed Jun 18, 2020
1 parent 215f6d3 commit 7bc05ec
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions tests/scripts/setup-pytest-env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,14 @@
# specific language governing permissions and limitations
# under the License.

# NOTE: allow unbound variable here
set +u
if [[ ! -z $CI_PYTEST_ADD_OPTIONS ]]; then
export PYTEST_ADDOPTS="-v $CI_PYTEST_ADD_OPTIONS"
else
export PYTEST_ADDOPTS=""
fi
set -u
set -e

export TVM_PATH=`pwd`
export PYTHONPATH=${TVM_PATH}/python:${TVM_PATH}/topi/python
export PYTEST_ADDOPTS="-v $CI_PYTEST_ADD_OPTIONS"

0 comments on commit 7bc05ec

Please sign in to comment.