diff options
Diffstat (limited to 'lldb/test/benchmarks')
11 files changed, 22 insertions, 87 deletions
diff --git a/lldb/test/benchmarks/continue/TestBenchmarkContinue.py b/lldb/test/benchmarks/continue/TestBenchmarkContinue.py index c4d0de34347..83674c6ff24 100644 --- a/lldb/test/benchmarks/continue/TestBenchmarkContinue.py +++ b/lldb/test/benchmarks/continue/TestBenchmarkContinue.py @@ -2,8 +2,9 @@ Test lldb data formatter subsystem. """ +import lldb_shared + import os, time -import unittest2 import lldb from lldbbench import * import lldbutil @@ -61,9 +62,3 @@ class TestBenchmarkContinue(BenchBase): lldbutil_sw.stop() print "runCmd: %s\nlldbutil: %s" % (runCmd_sw,lldbutil_sw) - -if __name__ == '__main__': - import atexit - lldb.SBDebugger.Initialize() - atexit.register(lambda: lldb.SBDebugger.Terminate()) - unittest2.main() diff --git a/lldb/test/benchmarks/disassembly/TestDisassembly.py b/lldb/test/benchmarks/disassembly/TestDisassembly.py index 83ed72ea3c9..b5148192b62 100644 --- a/lldb/test/benchmarks/disassembly/TestDisassembly.py +++ b/lldb/test/benchmarks/disassembly/TestDisassembly.py @@ -1,7 +1,8 @@ """Disassemble lldb's Driver::MainLoop() functions comparing lldb against gdb.""" +import lldb_shared + import os, sys -import unittest2 import lldb from lldbbench import * @@ -151,10 +152,3 @@ class DisassembleDriverMainLoop(BenchBase): if self.TraceOn(): print "gdb disassembly benchmark:", str(self.stopwatch) self.child = None - - -if __name__ == '__main__': - import atexit - lldb.SBDebugger.Initialize() - atexit.register(lambda: lldb.SBDebugger.Terminate()) - unittest2.main() diff --git a/lldb/test/benchmarks/disassembly/TestDoAttachThenDisassembly.py b/lldb/test/benchmarks/disassembly/TestDoAttachThenDisassembly.py index 0f06497023e..a93a406f90f 100644 --- a/lldb/test/benchmarks/disassembly/TestDoAttachThenDisassembly.py +++ b/lldb/test/benchmarks/disassembly/TestDoAttachThenDisassembly.py @@ -2,8 +2,9 @@ inferior and traverses the stack for thread0 to arrive at frame with function 'MainLoop'. It is important to specify an lldb executable as the inferior.""" +import lldb_shared + import os, sys -import unittest2 import lldb from lldbbench import * @@ -66,10 +67,3 @@ class AttachThenDisassemblyBench(BenchBase): with self.stopwatch: # Disassemble the function. self.runCmd("disassemble -f") - - -if __name__ == '__main__': - import atexit - lldb.SBDebugger.Initialize() - atexit.register(lambda: lldb.SBDebugger.Terminate()) - unittest2.main() diff --git a/lldb/test/benchmarks/disassembly/TestXcode41Vs42GDBDisassembly.py b/lldb/test/benchmarks/disassembly/TestXcode41Vs42GDBDisassembly.py index ff79866de12..393119e1d84 100644 --- a/lldb/test/benchmarks/disassembly/TestXcode41Vs42GDBDisassembly.py +++ b/lldb/test/benchmarks/disassembly/TestXcode41Vs42GDBDisassembly.py @@ -1,7 +1,8 @@ """Disassemble lldb's Driver::MainLoop() functions comparing Xcode 4.1 vs. 4.2's gdb.""" +import lldb_shared + import os, sys -import unittest2 import lldb from lldbbench import * @@ -90,10 +91,3 @@ class XCode41Vs42GDBDisassembly(BenchBase): if self.TraceOn(): print "gdb disassembly benchmark:", str(self.stopwatch) self.child = None - - -if __name__ == '__main__': - import atexit - lldb.SBDebugger.Initialize() - atexit.register(lambda: lldb.SBDebugger.Terminate()) - unittest2.main() diff --git a/lldb/test/benchmarks/expression/TestExpressionCmd.py b/lldb/test/benchmarks/expression/TestExpressionCmd.py index a9d26499eb2..aa7b03f2ffb 100644 --- a/lldb/test/benchmarks/expression/TestExpressionCmd.py +++ b/lldb/test/benchmarks/expression/TestExpressionCmd.py @@ -1,7 +1,8 @@ """Test lldb's expression evaluations and collect statistics.""" +import lldb_shared + import os, sys -import unittest2 import lldb from lldbbench import * @@ -68,10 +69,3 @@ class ExpressionEvaluationCase(BenchBase): pass self.child = None - - -if __name__ == '__main__': - import atexit - lldb.SBDebugger.Initialize() - atexit.register(lambda: lldb.SBDebugger.Terminate()) - unittest2.main() diff --git a/lldb/test/benchmarks/expression/TestRepeatedExprs.py b/lldb/test/benchmarks/expression/TestRepeatedExprs.py index ad8f963ba9e..9efbec6c859 100644 --- a/lldb/test/benchmarks/expression/TestRepeatedExprs.py +++ b/lldb/test/benchmarks/expression/TestRepeatedExprs.py @@ -1,7 +1,8 @@ """Test evaluating expressions repeatedly comparing lldb against gdb.""" +import lldb_shared + import os, sys -import unittest2 import lldb from lldbbench import * @@ -126,10 +127,3 @@ class RepeatedExprsCase(BenchBase): if self.TraceOn(): print "gdb expression benchmark:", str(self.stopwatch) self.child = None - - -if __name__ == '__main__': - import atexit - lldb.SBDebugger.Initialize() - atexit.register(lambda: lldb.SBDebugger.Terminate()) - unittest2.main() diff --git a/lldb/test/benchmarks/frame_variable/TestFrameVariableResponse.py b/lldb/test/benchmarks/frame_variable/TestFrameVariableResponse.py index b3eb7b651f5..ff55ecda989 100644 --- a/lldb/test/benchmarks/frame_variable/TestFrameVariableResponse.py +++ b/lldb/test/benchmarks/frame_variable/TestFrameVariableResponse.py @@ -1,7 +1,8 @@ """Test lldb's response time for 'frame variable' command.""" +import lldb_shared + import os, sys -import unittest2 import lldb from lldbbench import * @@ -72,10 +73,3 @@ class FrameVariableResponseBench(BenchBase): # The test is about to end and if we come to here, the child process has # been terminated. Mark it so. self.child = None - - -if __name__ == '__main__': - import atexit - lldb.SBDebugger.Initialize() - atexit.register(lambda: lldb.SBDebugger.Terminate()) - unittest2.main() diff --git a/lldb/test/benchmarks/startup/TestStartupDelays.py b/lldb/test/benchmarks/startup/TestStartupDelays.py index 802a8858673..b921906ce31 100644 --- a/lldb/test/benchmarks/startup/TestStartupDelays.py +++ b/lldb/test/benchmarks/startup/TestStartupDelays.py @@ -1,7 +1,8 @@ """Test lldb's startup delays creating a target, setting a breakpoint, and run to breakpoint stop.""" +import lldb_shared + import os, sys -import unittest2 import lldb from lldbbench import * @@ -82,10 +83,3 @@ class StartupDelaysBench(BenchBase): # The test is about to end and if we come to here, the child process has # been terminated. Mark it so. self.child = None - - -if __name__ == '__main__': - import atexit - lldb.SBDebugger.Initialize() - atexit.register(lambda: lldb.SBDebugger.Terminate()) - unittest2.main() diff --git a/lldb/test/benchmarks/stepping/TestRunHooksThenSteppings.py b/lldb/test/benchmarks/stepping/TestRunHooksThenSteppings.py index 623e2c081b3..71017eb3e34 100644 --- a/lldb/test/benchmarks/stepping/TestRunHooksThenSteppings.py +++ b/lldb/test/benchmarks/stepping/TestRunHooksThenSteppings.py @@ -1,7 +1,8 @@ """Test lldb's stepping speed.""" +import lldb_shared + import os, sys -import unittest2 import lldb from lldbbench import * @@ -59,10 +60,3 @@ class RunHooksThenSteppingsBench(BenchBase): pass self.child = None - - -if __name__ == '__main__': - import atexit - lldb.SBDebugger.Initialize() - atexit.register(lambda: lldb.SBDebugger.Terminate()) - unittest2.main() diff --git a/lldb/test/benchmarks/stepping/TestSteppingSpeed.py b/lldb/test/benchmarks/stepping/TestSteppingSpeed.py index 7aa84c6fe5d..553933f1ee6 100644 --- a/lldb/test/benchmarks/stepping/TestSteppingSpeed.py +++ b/lldb/test/benchmarks/stepping/TestSteppingSpeed.py @@ -1,7 +1,8 @@ """Test lldb's stepping speed.""" +import lldb_shared + import os, sys -import unittest2 import lldb from lldbbench import * @@ -71,10 +72,3 @@ class SteppingSpeedBench(BenchBase): pass self.child = None - - -if __name__ == '__main__': - import atexit - lldb.SBDebugger.Initialize() - atexit.register(lambda: lldb.SBDebugger.Terminate()) - unittest2.main() diff --git a/lldb/test/benchmarks/turnaround/TestCompileRunToBreakpointTurnaround.py b/lldb/test/benchmarks/turnaround/TestCompileRunToBreakpointTurnaround.py index ab57a704022..c359ab256e2 100644 --- a/lldb/test/benchmarks/turnaround/TestCompileRunToBreakpointTurnaround.py +++ b/lldb/test/benchmarks/turnaround/TestCompileRunToBreakpointTurnaround.py @@ -1,7 +1,8 @@ """Benchmark the turnaround time starting a debugger and run to the breakpont with lldb vs. gdb.""" +import lldb_shared + import os, sys -import unittest2 import lldb from lldbbench import * @@ -116,10 +117,3 @@ class CompileRunToBreakpointBench(BenchBase): self.gdb_avg = self.stopwatch.avg() self.child = None - - -if __name__ == '__main__': - import atexit - lldb.SBDebugger.Initialize() - atexit.register(lambda: lldb.SBDebugger.Terminate()) - unittest2.main() |