You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

runtest.sh 1.8 kB

5 years ago
5 years ago
5 years ago
5 years ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. #!/bin/bash
  2. # Copyright 2019 Huawei Technologies Co., Ltd
  3. #
  4. # Licensed under the Apache License, Version 2.0 (the "License");
  5. # you may not use this file except in compliance with the License.
  6. # You may obtain a copy of the License at
  7. #
  8. # http://www.apache.org/licenses/LICENSE-2.0
  9. #
  10. # Unless required by applicable law or agreed to in writing, software
  11. # distributed under the License is distributed on an "AS IS" BASIS,
  12. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. # See the License for the specific language governing permissions and
  14. # limitations under the License.
  15. # ============================================================================
  16. set -e
  17. BASEPATH=$(cd "$(dirname "$0")"; pwd)
  18. PROJECT_PATH=${BASEPATH}/../../..
  19. if [ $BUILD_PATH ];then
  20. echo "BUILD_PATH = $BUILD_PATH"
  21. else
  22. BUILD_PATH=${PROJECT_PATH}/build
  23. echo "BUILD_PATH = $BUILD_PATH"
  24. fi
  25. cd ${BUILD_PATH}/mindspore_serving/tests/ut/python
  26. mkdir -p mindspore_serving
  27. rm -rf mindspore_serving/master mindspore_serving/worker mindspore_serving/client mindspore_serving/*.py
  28. cp _mindspore_serving*.so mindspore_serving/
  29. cp -r ${PROJECT_PATH}/mindspore_serving/master mindspore_serving/
  30. cp -r ${PROJECT_PATH}/mindspore_serving/worker mindspore_serving/
  31. cp -r ${PROJECT_PATH}/mindspore_serving/client mindspore_serving/
  32. cp ${PROJECT_PATH}/mindspore_serving/*.py mindspore_serving/
  33. export PYTHONPATH=${BUILD_PATH}/mindspore_serving/tests/ut/python:${PROJECT_PATH}/tests/ut/python:$PYTHONPATH
  34. export LD_LIBRARY_PATH=${BUILD_PATH}/mindspore_serving/tests/ut/python:${LD_LIBRARY_PATH}
  35. echo "PYTHONPATH=$PYTHONPATH"
  36. echo "LD_LIBRARY_PATH=LD_LIBRARY_PATH"
  37. unset http_proxy
  38. unset https_proxy
  39. if [ $# -gt 0 ]; then
  40. pytest -v ${PROJECT_PATH}/tests/ut/python/tests/$1
  41. else
  42. pytest -v ${PROJECT_PATH}/tests/ut/python/tests
  43. fi
  44. RET=$?
  45. cd -
  46. exit ${RET}

A lightweight and high-performance service module that helps MindSpore developers efficiently deploy online inference services in the production environment.