[Neo-report] r2782 jm - in /trunk: neo/scripts/ neo/tests/ tools/
nobody at svn.erp5.org
nobody at svn.erp5.org
Tue Jun 14 19:29:40 CEST 2011
Author: jm
Date: Tue Jun 14 19:29:40 2011
New Revision: 2782
Log:
Re-setup matrix tests
Modified:
trunk/neo/scripts/runner.py
trunk/neo/tests/benchmark.py
trunk/tools/matrix
trunk/tools/test_bot
Modified: trunk/neo/scripts/runner.py
==============================================================================
--- trunk/neo/scripts/runner.py [iso-8859-1] (original)
+++ trunk/neo/scripts/runner.py [iso-8859-1] Tue Jun 14 19:29:40 2011
@@ -287,12 +287,7 @@ class TestRunner(BenchmarkRunner):
if config.functional:
runner.run('Functional tests', FUNC_TEST_MODULES)
if config.zodb:
- try:
- from ZODB.interfaces import ReadVerifyingStorage
- except ImportError:
- logging.warn(" ZODB tests disabled on ZODB 3.9")
- else:
- runner.run('ZODB tests', ZODB_TEST_MODULES)
+ runner.run('ZODB tests', ZODB_TEST_MODULES)
except KeyboardInterrupt:
config['mail_to'] = None
traceback.print_exc()
Modified: trunk/neo/tests/benchmark.py
==============================================================================
--- trunk/neo/tests/benchmark.py [iso-8859-1] (original)
+++ trunk/neo/tests/benchmark.py [iso-8859-1] Tue Jun 14 19:29:40 2011
@@ -32,7 +32,7 @@ class BenchmarkRunner(object):
parser.add_option('', '--mail-to', action='append')
parser.add_option('', '--mail-from')
parser.add_option('', '--mail-server')
- parser.add_option('-r', '--repeat', default=1)
+ parser.add_option('-r', '--repeat', type='int', default=1)
self.add_options(parser)
# check common arguments
options, self._args = parser.parse_args()
Modified: trunk/tools/matrix
==============================================================================
--- trunk/tools/matrix [iso-8859-1] (original)
+++ trunk/tools/matrix [iso-8859-1] Tue Jun 14 19:29:40 2011
@@ -9,21 +9,16 @@ from time import time
from neo.tests.benchmark import BenchmarkRunner
from ZODB.FileStorage import FileStorage
-MIN_STORAGES = 1
-MAX_STORAGES = 2
-MIN_REPLICAS = 0
-MAX_REPLICAS = 1
-
class MatrixImportBenchmark(BenchmarkRunner):
error_log = ''
def add_options(self, parser):
parser.add_option('-d', '--datafs')
- parser.add_option('', '--min-storages')
- parser.add_option('', '--max-storages')
- parser.add_option('', '--min-replicas')
- parser.add_option('', '--max-replicas')
+ parser.add_option('', '--min-storages', type='int', default=1)
+ parser.add_option('', '--max-storages', type='int', default=2)
+ parser.add_option('', '--min-replicas', type='int', default=0)
+ parser.add_option('', '--max-replicas', type='int', default=1)
parser.add_option('', '--threaded', action="store_true")
def load_options(self, options, args):
@@ -31,10 +26,10 @@ class MatrixImportBenchmark(BenchmarkRun
sys.exit('Missing or wrong data.fs argument')
return dict(
datafs = options.datafs,
- min_s = int(options.min_storages or MIN_STORAGES),
- max_s = int(options.max_storages or MAX_STORAGES),
- min_r = int(options.min_replicas or MIN_REPLICAS),
- max_r = int(options.max_replicas or MAX_REPLICAS),
+ min_s = options.min_storages,
+ max_s = options.max_storages,
+ min_r = options.min_replicas,
+ max_r = options.max_replicas,
threaded = options.threaded,
)
@@ -155,11 +150,8 @@ class MatrixImportBenchmark(BenchmarkRun
report += sep
report += self.error_log
if failures:
- info = '%d failures' % (failures, )
- else:
- info = '%.1f KB/s' % (sum(speedlist) / len(speedlist))
- summary = 'Matrix : %s ' % (info, )
- return (summary, report)
+ return '%d failures' % (failures, )
+ return '%.1f KB/s' % (sum(speedlist) / len(speedlist))
def main(args=None):
MatrixImportBenchmark().run()
Modified: trunk/tools/test_bot
==============================================================================
--- trunk/tools/test_bot [iso-8859-1] (original)
+++ trunk/tools/test_bot [iso-8859-1] Tue Jun 14 19:29:40 2011
@@ -44,13 +44,24 @@ def main():
os.execvp(sys.argv[0], sys.argv)
delay = None
for test_home in sys.argv[arg_count:]:
+ test_home, tasks = test_home.rsplit('=', 1)
+ tests = ''.join(x for x in tasks if x in 'fuz')
bin = os.path.join(test_home, 'bin')
if not subprocess.call((os.path.join(bin, 'buildout'), '-v'),
cwd=test_home):
- subprocess.call([os.path.join(bin, 'neotestrunner'), '-fuz',
- '--title', 'NEO tests (r%u-%s)'
- % (revision, os.path.basename(test_home)),
- ] + sys.argv[1:arg_count])
+ title = '(r%u-%s)' % (revision, os.path.basename(test_home))
+ if tests:
+ subprocess.call([os.path.join(bin, 'neotestrunner'),
+ '-' + tests, '--title',
+ 'NEO tests ' + title,
+ ] + sys.argv[1:arg_count])
+ if 'm' in tasks:
+ subprocess.call([os.path.join(bin, 'python'),
+ 'tools/matrix', '--repeat=3',
+ '--min-storages=1', '--max-storages=24',
+ '--min-replicas=0', '--max-replicas=3',
+ '--title', 'Matrix ' + title,
+ ] + sys.argv[1:arg_count])
clean()
if __name__ == '__main__':
More information about the Neo-report
mailing list