@@ -23,28 +23,11 @@ jobs:
23
23
echo "current dir: $(pwd)"
24
24
git config --global --add safe.directory ../FlagGems
25
25
if [ "${{ github.event_name }}" == "pull_request" ]; then
26
- echo "current dir: $(pwd)"
27
26
echo "This is a pull request event. PR number is ${{ github.event.pull_request.number }}"
28
27
PR_ID=${{ github.event.pull_request.number }}
29
28
elif [ "${{ github.event_name }}" == "push" ]; then
30
29
PR_NUMBER=$(git log -1 --pretty=format:'%s' | grep -oE '#[0-9]+' | grep -oE '[0-9]+')
31
30
echo "This is a push event. The relate PR number is ${PR_NUMBER}"
32
31
PR_ID=${PR_NUMBER}
33
32
fi
34
- ID_SHA="${PR_ID}-${GITHUB_SHA}"
35
- echo ID_SHA $ID_SHA
36
- PR_ID_DIR="PR${PR_ID}"
37
-
38
- COVERAGE_ARGS="--parallel-mode --omit "*/.flaggems/*","*/usr/lib/*" --source=./src,./tests --data-file=${ID_SHA}-op"
39
- coverage run ${COVERAGE_ARGS} -m pytest -s tests/test_blas_ops.py --ref=cpu --mode=quick && \
40
- coverage run ${COVERAGE_ARGS} -m pytest -s tests/test_reduction_ops.py --ref=cpu --mode=quick && \
41
- coverage run ${COVERAGE_ARGS} -m pytest -s tests/test_general_reduction_ops.py --ref=cpu --mode=quick && \
42
- coverage run ${COVERAGE_ARGS} -m pytest -s tests/test_norm_ops.py --ref=cpu --mode=quick && \
43
- coverage run ${COVERAGE_ARGS} -m pytest -s tests/test_unary_pointwise_ops.py --ref=cpu --mode=quick && \
44
- coverage run ${COVERAGE_ARGS} -m pytest -s tests/test_binary_pointwise_ops.py --ref=cpu --mode=quick && \
45
- coverage run ${COVERAGE_ARGS} -m pytest -s tests/test_special_ops.py --ref=cpu --mode=quick && \
46
- coverage run ${COVERAGE_ARGS} -m pytest -s tests/test_pointwise_type_promotion.py --ref=cpu --mode=quick && \
47
- coverage run ${COVERAGE_ARGS} -m pytest -s tests/test_tensor_constructor_ops.py --ref=cpu --mode=quick
48
-
49
- mkdir -p /home/zhangbo/PR_Coverage/PR${PR_ID}/${ID_SHA}
50
- mv ${ID_SHA}* /home/zhangbo/PR_Coverage/PR${PR_ID}/${ID_SHA}
33
+ bash tools/op-test-quick-cpu.sh ${PR_ID}
0 commit comments