Skip to content

Commit

Permalink
run.sh (PaddlePaddle#21)
Browse files Browse the repository at this point in the history
* run.sh

* run.sh

* run.sh

* cancel -sv args in pytest

* add base run.sh

* add base run.sh

* add bug list

* optimize run script
  • Loading branch information
DDDivano authored Jul 8, 2021
1 parent a588397 commit fc1a8af
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 0 deletions.
22 changes: 22 additions & 0 deletions framework/api/nn/run.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
pip3.7 install pytest
export FLAGS_call_stack_level=2
cases=`find . -name "test*.py" | sort`
ignore=""
bug=0

echo "============ failed cases =============" >> result.txt
for file in ${cases}
do
echo ${file}
if [[ ${ignore} =~ ${file##*/} ]]; then
echo "跳过"
else
python3.7 -m pytest ${file}
if [ $? -ne 0 ]; then
echo ${file} >> result.txt
bug=`expr ${bug} + 1`
fi
fi
done

echo "total bugs: "${bug} >> result.txt
8 changes: 8 additions & 0 deletions framework/api/run.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
home=$PWD
# nn
cd nn
rm -rf ./result.txt
echo "[nn cases result]" >> result.txt
bash ./run.sh
cat ./result.txt
cd $home

0 comments on commit fc1a8af

Please sign in to comment.