summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormattip <matti.picus@gmail.com>2019-05-06 06:32:17 -0400
committermattip <matti.picus@gmail.com>2019-05-06 06:32:17 -0400
commit5d7680896dd1d4a562be8897f08cee528a5a6c42 (patch)
tree4f26bcc925bb6e655380ede468b6b9a7d67c6589
parentf16c558fc3c3b57c4f2a93a80a778746ddd2f8ef (diff)
downloadnumpy-5d7680896dd1d4a562be8897f08cee528a5a6c42.tar.gz
TEST: add duration report to tests
-rwxr-xr-x[-rw-r--r--]tools/test-installed-numpy.py4
-rwxr-xr-xtools/travis-test.sh4
2 files changed, 6 insertions, 2 deletions
diff --git a/tools/test-installed-numpy.py b/tools/test-installed-numpy.py
index 14f11b7ed..5240253b6 100644..100755
--- a/tools/test-installed-numpy.py
+++ b/tools/test-installed-numpy.py
@@ -32,6 +32,9 @@ parser.add_option("-m", "--mode",
action="store", dest="mode", default="fast",
help="'fast', 'full', or something that could be "
"passed to pytest [default: %default]")
+parser.add_option("-n", "--durations",
+ dest="durations", default=-1,
+ help="show time to run slowest N tests [default: -1]")
(options, args) = parser.parse_args()
import numpy
@@ -54,6 +57,7 @@ result = numpy.test(options.mode,
verbose=options.verbose,
extra_argv=args,
doctests=options.doctests,
+ durations=int(options.durations),
coverage=options.coverage)
if result:
diff --git a/tools/travis-test.sh b/tools/travis-test.sh
index 5860deea6..8df33e943 100755
--- a/tools/travis-test.sh
+++ b/tools/travis-test.sh
@@ -83,9 +83,9 @@ run_test()
export PYTHONWARNINGS=default
if [ -n "$RUN_FULL_TESTS" ]; then
export PYTHONWARNINGS="ignore::DeprecationWarning:virtualenv"
- $PYTHON ../tools/test-installed-numpy.py -v --mode=full $COVERAGE_FLAG
+ $PYTHON ../tools/test-installed-numpy.py -v --durations 10 --mode=full $COVERAGE_FLAG
else
- $PYTHON ../tools/test-installed-numpy.py -v
+ $PYTHON ../tools/test-installed-numpy.py -v --durations 10
fi
if [ -n "$RUN_COVERAGE" ]; then