diff --git a/tools/code_coverage/coverage.sh b/tools/code_coverage/coverage.sh index 4a09094c..01809fe0 100755 --- a/tools/code_coverage/coverage.sh +++ b/tools/code_coverage/coverage.sh @@ -13,7 +13,7 @@ FlagGemsROOT="$( cd "$( dirname "${BASH_SOURCE[0]}")/../../" && pwd )" echo ${FlagGemsROOT} cmds=( - "CUDA_VISIBLE_DEVICES=0 coverage run --parallel-mode --omit "*/.flaggems/*","*/usr/lib/*" --source=./src,./tests -m pytest -s tests/test_unary_pointwise_ops.py &" + "CUDA_VISIBLE_DEVICES=0 coverage run --parallel-mode --omit "*/.flaggems/*","*/usr/lib/*" --source=./src,./tests,./tools/code_coverage -m pytest -s tests/test_unary_pointwise_ops.py::test_accuracy_abs &" # "CUDA_VISIBLE_DEVICES=0 coverage run --parallel-mode --omit "*/.flaggems/*","*/usr/lib/*" --source=./src,./tests -m pytest -s tests/test_pointwise_type_promotion.py &" # "CUDA_VISIBLE_DEVICES=1 coverage run --parallel-mode --omit "*/.flaggems/*","*/usr/lib/*" --source=./src,./tests -m pytest -s tests/test_binary_pointwise_ops.py &" # "CUDA_VISIBLE_DEVICES=1 coverage run --parallel-mode --omit "*/.flaggems/*","*/usr/lib/*" --source=./src,./tests -m pytest -s tests/test_tensor_constructor_ops.py &" diff --git a/tools/code_coverage/jit_func_position.py b/tools/code_coverage/jit_func_position.py index 685905d3..3eed97ed 100644 --- a/tools/code_coverage/jit_func_position.py +++ b/tools/code_coverage/jit_func_position.py @@ -69,6 +69,8 @@ def get_end_line(self, node): args = parser.parse_args() for filename in args.files: + if not filename.endswith(".py"): + continue logging.debug(filename) with open(filename, "r") as file: source_code = file.read()