Commit af593e0f authored by René Fritze's avatar René Fritze Committed by René Fritze

[ci] remove obsolete test_timings plugin

The functionality has since been made obsolete by switching to the newer
junit output format.
parent 2513caf0
......@@ -37,7 +37,7 @@ if [ "${PYMOR_PYTEST_MARKER}" == "None" ] ; then
TARGET_DIR=${LOGS_DIR}/${BRANCH}/${PY_VER}/${PYMOR_VERSION}/
[[ -d "${TARGET_DIR}" ]] || mkdir -p ${TARGET_DIR}
cp ${PYMOR_ROOT}/${RESULT_FN} ${PYMOR_ROOT}/test_timings.csv ${TARGET_DIR}/
cp ${PYMOR_ROOT}/${RESULT_FN} ${TARGET_DIR}/
printenv | \grep -v encrypted | \grep -v TOKEN | sort > ${TARGET_DIR}/env
git add ${TARGET_DIR}/*
......
......@@ -64,7 +64,6 @@ htmlcov/
coverage.xml
libpeerconnection.log
.cache
test_timings.csv
# pycharm
.idea/
......
......@@ -2,10 +2,7 @@
# Copyright 2013-2020 pyMOR developers and contributors. All rights reserved.
# License: BSD 2-Clause License (http://opensource.org/licenses/BSD-2-Clause)
import pytest
import time
import os
from csv import DictWriter
from hypothesis import settings, Verbosity, HealthCheck
_common_settings = {"print_blob": True, "suppress_health_check": (HealthCheck.too_slow, HealthCheck.data_too_large,),
......@@ -17,41 +14,3 @@ settings.register_profile("dev", max_examples=10, **_common_settings)
settings.register_profile("debug", max_examples=10, **_common_settings)
settings.load_profile(os.getenv(u'PYMOR_HYPOTHESIS_PROFILE', 'dev'))
class ExecutionTimeCSV:
def __init__(self):
import pymor
self._elapsed_times = {'version': pymor.__version__}
@pytest.hookimpl()
def pytest_addoption(self, parser):
# this doesn't actually work atm
parser.addoption('--timings-file', type=str, dest='timings-file', default='test_timings.csv')
@pytest.hookimpl()
def pytest_configure(self, config):
self._filename = config.getoption('timings-file')
@pytest.hookimpl(hookwrapper=True)
def pytest_runtest_setup(self, item):
started = time.process_time()
yield
self._elapsed_times[item.name] = started
@pytest.hookimpl(hookwrapper=True)
def pytest_runtest_teardown(self, item):
stopped = time.process_time()
yield
self._elapsed_times[item.name] = str(stopped - self._elapsed_times[item.name])
@pytest.hookimpl()
def pytest_terminal_summary(self, *args, **kwargs):
with open(self._filename, 'w') as csvfile:
writer = DictWriter(csvfile, fieldnames=self._elapsed_times.keys())
writer.writeheader()
writer.writerow(self._elapsed_times)
def pytest_configure(config):
config.pluginmanager.register(ExecutionTimeCSV(), 'ExecutionTimeCSV')
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment