# Copyright (c) 2025 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. source $(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/utils.sh init function run_linux_cpu_test() { export FLAGS_PIR_OPTEST=True export FLAGS_CI_PIPELINE=py3 mkdir -p ${PADDLE_ROOT}/build cd ${PADDLE_ROOT}/build echo "::group::Installing hypothesis..." pip install hypothesis echo "::endgroup::" if [ -d "${PADDLE_ROOT}/dist/" ]; then echo "::group::Installing paddle wheel..." pip install ${PADDLE_ROOT}/dist/*whl echo "::endgroup::" fi cp ${PADDLE_ROOT}/build/test/legacy_test/op_test.py ${PADDLE_ROOT}/build/python cp ${PADDLE_ROOT}/build/test/legacy_test/testsuite.py ${PADDLE_ROOT}/build/python cp -r ${PADDLE_ROOT}/build/test/white_list ${PADDLE_ROOT}/build/python ut_total_startTime_s=`date +%s` if [ ${WITH_TESTING:-ON} == "ON" ] ; then cat <> ${PADDLE_ROOT}/build/build_summary.txt ut_actual_total_endTime_s=`date +%s` echo "ipipe_log_param_actual_TestCases_Total_Time: $[ $ut_actual_total_endTime_s - $ut_actual_total_startTime_s ]s" echo "ipipe_log_param_actual_TestCases_Total_Time: $[ $ut_actual_total_endTime_s - $ut_actual_total_startTime_s ]s" >> ${PADDLE_ROOT}/build/build_summary.txt if [[ "$EXIT_CODE" != "0" ]]; then show_ut_retry_result fi set -ex fi } run_linux_cpu_test ${PYTHON_ABI:-""} ${PROC_RUN:-1} if [[ -f ${PADDLE_ROOT}/build/build_summary.txt ]];then echo "=====================build summary======================" cat ${PADDLE_ROOT}/build/build_summary.txt echo "========================================================" fi