• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#!/bin/bash
2# Copyright 2022 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# ============================================================================
16set -e
17BASE_PATH=$(cd "$(dirname $0)"; pwd)
18rm -rf ${BASE_PATH}/if
19mkdir ${BASE_PATH}/if
20unset SLOG_PRINT_TO_STDOUT
21cd ${BASE_PATH}/if
22echo "start test if with ge backend"
23env > env.log
24python ../run_if.py > test_if.log 2>&1 &
25process_pid=`echo $!`
26wait ${process_pid}
27status=`echo $?`
28if [ "${status}" != "0" ]; then
29    echo "[ERROR] test if with ge backend failed. status: ${status}"
30    exit 1
31else
32    echo "[INFO] test if with ge backend success."
33fi
34
35exit 0
36