From 1859e865f2461d6366865f8679df74bc53858676 Mon Sep 17 00:00:00 2001 From: Guillaume Valadon Date: Wed, 12 Apr 2017 13:16:50 +0200 Subject: [PATCH] Exclude directories from coverage reports --- .appveyor.yml | 2 +- .coveragerc | 8 ++++++++ .travis.yml | 2 +- 3 files changed, 10 insertions(+), 2 deletions(-) create mode 100644 .coveragerc diff --git a/.appveyor.yml b/.appveyor.yml index 81705c9b9..46361ef07 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -41,5 +41,5 @@ after_test: # Install & run codecov - "%PYTHON%\\python -m pip install codecov" - "SET PATH=%PYTHON%\\Scripts\\;%PATH%" - - "coverage combine ./ ./scapy/tools/" + - "coverage combine ./" - codecov diff --git a/.coveragerc b/.coveragerc new file mode 100644 index 000000000..d992f26c5 --- /dev/null +++ b/.coveragerc @@ -0,0 +1,8 @@ +[run] +omit = + # Python specific path + /usr/local/lib/python2.7/* + # Scapy specific paths + test/* + bin/* + scapy/tools/* diff --git a/.travis.yml b/.travis.yml index a29479395..dcc023e7f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -53,5 +53,5 @@ script: bash .travis/test.sh after_success: - if [ "$SCAPY_COVERAGE" = "yes" ]; then pip install codecov; fi # With UTScapy, the coverage dot file is located in the test directory - - if [ "$SCAPY_COVERAGE" = "yes" ]; then cd test; coverage combine; fi + - if [ "$SCAPY_COVERAGE" = "yes" ]; then coverage combine ./test; fi - if [ "$SCAPY_COVERAGE" = "yes" ]; then codecov; fi