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 Morris committed Jun 18, 2020
1 parent fb6140f commit 8ff1925
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 8ff1925

Please sign in to comment.