Commit 8aaba9ec authored by Grégory Wisniewski's avatar Grégory Wisniewski

Define main() function in test scripts to be egg aware.

git-svn-id: https://svn.erp5.org/repos/neo/trunk@2606 71dcc9de-d417-0410-9af5-da40c76e7ee4
parent 396f4796
......@@ -131,6 +131,9 @@ class MatrixImportBenchmark(BenchmarkRunner):
summary = 'Matrix : %s ' % (info, )
return (summary, report)
if __name__ == "__main__":
def main(args=None):
MatrixImportBenchmark().run()
if __name__ == "__main__":
main()
......@@ -127,8 +127,10 @@ class ImportBenchmark(BenchmarkRunner):
summary = 'Perf : %.1f KB/s (%.1f MB)' % (speed, size)
return (summary, report)
if __name__ == "__main__":
def main(args=None):
ImportBenchmark().run()
if PROFILING_ENABLED:
print profiler_report()
if __name__ == "__main__":
main()
......@@ -178,6 +178,9 @@ class ReplicationBenchmark(BenchmarkRunner):
assert cut_at == 100
neo.getStorageProcessList()[-1].stop()
if __name__ == "__main__":
def main(args=None):
ReplicationBenchmark().run()
if __name__ == "__main__":
main()
......@@ -300,9 +300,12 @@ class TestRunner(BenchmarkRunner):
self._successful = runner.wasSuccessful()
return runner.buildReport(self.add_status)
if __name__ == "__main__":
def main(args=None):
runner = TestRunner()
runner.run()
if not runner.was_successful():
sys.exit(1)
sys.exit(0)
if __name__ == "__main__":
main()
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