[Lldb-commits] [lldb] r251055 - Update every test to import `lldb_shared`.

Zachary Turner via lldb-commits lldb-commits at lists.llvm.org
Thu Oct 22 13:06:25 PDT 2015


Author: zturner
Date: Thu Oct 22 15:06:20 2015
New Revision: 251055

URL: http://llvm.org/viewvc/llvm-project?rev=251055&view=rev
Log:
Update every test to import `lldb_shared`.

This is necessary in order to allow third party modules to be
located under lldb/third_party rather than under the test
folder directly.

Since we're already touching every test file anyway, we also
go ahead and delete the unittest2 import and main block wherever
possible.  The ability to run a test as a standalone file has
already been broken for some time, and if we decide we want this
back, we should use unittest instead of unittest2.

A few places could not have the import of unittest2 removed,because
they depend on the unittest2.expectedFailure or skip decorators.
Removing all those was orthogonal in spirit to the purpose of this
CL, so the import of unittest2 remains in those files that were
using it for its test decorators.  Those can be addressed
separately.

Modified:
    lldb/trunk/test/android/platform/TestDefaultCacheLineSize.py
    lldb/trunk/test/api/check_public_api_headers/TestPublicAPIHeaders.py
    lldb/trunk/test/api/multiple-debuggers/TestMultipleDebuggers.py
    lldb/trunk/test/api/multithreaded/TestMultithreaded.py
    lldb/trunk/test/arm_emulation/TestEmulations.py
    lldb/trunk/test/benchmarks/continue/TestBenchmarkContinue.py
    lldb/trunk/test/benchmarks/disassembly/TestDisassembly.py
    lldb/trunk/test/benchmarks/disassembly/TestDoAttachThenDisassembly.py
    lldb/trunk/test/benchmarks/disassembly/TestXcode41Vs42GDBDisassembly.py
    lldb/trunk/test/benchmarks/expression/TestExpressionCmd.py
    lldb/trunk/test/benchmarks/expression/TestRepeatedExprs.py
    lldb/trunk/test/benchmarks/frame_variable/TestFrameVariableResponse.py
    lldb/trunk/test/benchmarks/startup/TestStartupDelays.py
    lldb/trunk/test/benchmarks/stepping/TestRunHooksThenSteppings.py
    lldb/trunk/test/benchmarks/stepping/TestSteppingSpeed.py
    lldb/trunk/test/benchmarks/turnaround/TestCompileRunToBreakpointTurnaround.py
    lldb/trunk/test/driver/batch_mode/TestBatchMode.py
    lldb/trunk/test/expression_command/call-function/TestCallStdStringFunction.py
    lldb/trunk/test/expression_command/call-function/TestCallStopAndContinue.py
    lldb/trunk/test/expression_command/call-function/TestCallUserDefinedFunction.py
    lldb/trunk/test/expression_command/call-restarts/TestCallThatRestarts.py
    lldb/trunk/test/expression_command/call-throws/TestCallThatThrows.py
    lldb/trunk/test/expression_command/char/TestExprsChar.py
    lldb/trunk/test/expression_command/expr-in-syscall/TestExpressionInSyscall.py
    lldb/trunk/test/expression_command/formatters/TestFormatters.py
    lldb/trunk/test/expression_command/issue_11588/Test11588.py
    lldb/trunk/test/expression_command/options/TestExprOptions.py
    lldb/trunk/test/expression_command/persist_objc_pointeetype/TestPersistObjCPointeeType.py
    lldb/trunk/test/expression_command/persistent_ptr_update/TestPersistentPtrUpdate.py
    lldb/trunk/test/expression_command/persistent_types/TestNestedPersistentTypes.py
    lldb/trunk/test/expression_command/persistent_types/TestPersistentTypes.py
    lldb/trunk/test/expression_command/persistent_variables/TestPersistentVariables.py
    lldb/trunk/test/expression_command/po_verbosity/TestPoVerbosity.py
    lldb/trunk/test/expression_command/radar_8638051/Test8638051.py
    lldb/trunk/test/expression_command/radar_9531204/TestPrintfAfterUp.py
    lldb/trunk/test/expression_command/radar_9673664/TestExprHelpExamples.py
    lldb/trunk/test/expression_command/test/TestExprs.py
    lldb/trunk/test/expression_command/test/TestExprs2.py
    lldb/trunk/test/expression_command/timeout/TestCallWithTimeout.py
    lldb/trunk/test/expression_command/two-files/TestObjCTypeQueryFromOtherCompileUnit.py
    lldb/trunk/test/functionalities/abbreviation/TestAbbreviations.py
    lldb/trunk/test/functionalities/abbreviation/TestCommonShortSpellings.py
    lldb/trunk/test/functionalities/archives/TestBSDArchives.py
    lldb/trunk/test/functionalities/asan/TestMemoryHistory.py
    lldb/trunk/test/functionalities/asan/TestReportData.py
    lldb/trunk/test/functionalities/attach_resume/TestAttachResume.py
    lldb/trunk/test/functionalities/avoids-fd-leak/TestFdLeak.py
    lldb/trunk/test/functionalities/backticks/TestBackticksWithoutATarget.py
    lldb/trunk/test/functionalities/breakpoint/breakpoint_command/TestBreakpointCommand.py
    lldb/trunk/test/functionalities/breakpoint/breakpoint_command/TestBreakpointCommandsFromPython.py
    lldb/trunk/test/functionalities/breakpoint/breakpoint_command/TestRegexpBreakCommand.py
    lldb/trunk/test/functionalities/breakpoint/breakpoint_conditions/TestBreakpointConditions.py
    lldb/trunk/test/functionalities/breakpoint/breakpoint_ids/TestBreakpointIDs.py
    lldb/trunk/test/functionalities/breakpoint/breakpoint_ignore_count/TestBreakpointIgnoreCount.py
    lldb/trunk/test/functionalities/breakpoint/breakpoint_locations/TestBreakpointLocations.py
    lldb/trunk/test/functionalities/breakpoint/breakpoint_options/TestBreakpointOptions.py
    lldb/trunk/test/functionalities/breakpoint/comp_dir_symlink/TestCompDirSymLink.py
    lldb/trunk/test/functionalities/breakpoint/consecutive_breakpoins/TestConsecutiveBreakpoints.py
    lldb/trunk/test/functionalities/breakpoint/cpp/TestCPPBreakpointLocations.py
    lldb/trunk/test/functionalities/breakpoint/cpp_exception/TestCPPExceptionBreakpoint.py
    lldb/trunk/test/functionalities/breakpoint/dummy_target_breakpoints/TestBreakpointsWithNoTargets.py
    lldb/trunk/test/functionalities/breakpoint/inlined_breakpoints/TestInlinedBreakpoints.py
    lldb/trunk/test/functionalities/breakpoint/objc/TestObjCBreakpoints.py
    lldb/trunk/test/functionalities/command_history/TestCommandHistory.py
    lldb/trunk/test/functionalities/command_regex/TestCommandRegex.py
    lldb/trunk/test/functionalities/command_script/TestCommandScript.py
    lldb/trunk/test/functionalities/command_script/import/TestImport.py
    lldb/trunk/test/functionalities/command_script/import/rdar-12586188/TestRdar12586188.py
    lldb/trunk/test/functionalities/command_source/TestCommandSource.py
    lldb/trunk/test/functionalities/completion/TestCompletion.py
    lldb/trunk/test/functionalities/conditional_break/TestConditionalBreak.py
    lldb/trunk/test/functionalities/data-formatter/boolreference/TestFormattersBoolRefPtr.py
    lldb/trunk/test/functionalities/data-formatter/compactvectors/TestCompactVectors.py
    lldb/trunk/test/functionalities/data-formatter/data-formatter-advanced/TestDataFormatterAdv.py
    lldb/trunk/test/functionalities/data-formatter/data-formatter-categories/TestDataFormatterCategories.py
    lldb/trunk/test/functionalities/data-formatter/data-formatter-cpp/TestDataFormatterCpp.py
    lldb/trunk/test/functionalities/data-formatter/data-formatter-disabling/TestDataFormatterDisabling.py
    lldb/trunk/test/functionalities/data-formatter/data-formatter-enum-format/TestDataFormatterEnumFormat.py
    lldb/trunk/test/functionalities/data-formatter/data-formatter-globals/TestDataFormatterGlobals.py
    lldb/trunk/test/functionalities/data-formatter/data-formatter-named-summaries/TestDataFormatterNamedSummaries.py
    lldb/trunk/test/functionalities/data-formatter/data-formatter-objc/TestDataFormatterObjC.py
    lldb/trunk/test/functionalities/data-formatter/data-formatter-objc/nsstring/TestDataFormatterNSString.py
    lldb/trunk/test/functionalities/data-formatter/data-formatter-proper-plurals/TestFormattersOneIsSingular.py
    lldb/trunk/test/functionalities/data-formatter/data-formatter-ptr-to-array/TestPtrToArrayFormatting.py
    lldb/trunk/test/functionalities/data-formatter/data-formatter-python-synth/TestDataFormatterPythonSynth.py
    lldb/trunk/test/functionalities/data-formatter/data-formatter-script/TestDataFormatterScript.py
    lldb/trunk/test/functionalities/data-formatter/data-formatter-skip-summary/TestDataFormatterSkipSummary.py
    lldb/trunk/test/functionalities/data-formatter/data-formatter-smart-array/TestDataFormatterSmartArray.py
    lldb/trunk/test/functionalities/data-formatter/data-formatter-stl/libcxx/initializerlist/TestInitializerList.py
    lldb/trunk/test/functionalities/data-formatter/data-formatter-stl/libcxx/iterator/TestDataFormatterLibccIterator.py
    lldb/trunk/test/functionalities/data-formatter/data-formatter-stl/libcxx/list/TestDataFormatterLibcxxList.py
    lldb/trunk/test/functionalities/data-formatter/data-formatter-stl/libcxx/list/loop/TestDataFormatterLibcxxListLoop.py
    lldb/trunk/test/functionalities/data-formatter/data-formatter-stl/libcxx/map/TestDataFormatterLibccMap.py
    lldb/trunk/test/functionalities/data-formatter/data-formatter-stl/libcxx/multimap/TestDataFormatterLibccMultiMap.py
    lldb/trunk/test/functionalities/data-formatter/data-formatter-stl/libcxx/multiset/TestDataFormatterLibcxxMultiSet.py
    lldb/trunk/test/functionalities/data-formatter/data-formatter-stl/libcxx/set/TestDataFormatterLibcxxSet.py
    lldb/trunk/test/functionalities/data-formatter/data-formatter-stl/libcxx/string/TestDataFormatterLibcxxString.py
    lldb/trunk/test/functionalities/data-formatter/data-formatter-stl/libcxx/unordered/TestDataFormatterUnordered.py
    lldb/trunk/test/functionalities/data-formatter/data-formatter-stl/libcxx/vbool/TestDataFormatterLibcxxVBool.py
    lldb/trunk/test/functionalities/data-formatter/data-formatter-stl/libcxx/vector/TestDataFormatterLibcxxVector.py
    lldb/trunk/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/iterator/TestDataFormatterStdIterator.py
    lldb/trunk/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/list/TestDataFormatterStdList.py
    lldb/trunk/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/map/TestDataFormatterStdMap.py
    lldb/trunk/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/string/TestDataFormatterStdString.py
    lldb/trunk/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/vbool/TestDataFormatterStdVBool.py
    lldb/trunk/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/vector/TestDataFormatterStdVector.py
    lldb/trunk/test/functionalities/data-formatter/data-formatter-synth/TestDataFormatterSynth.py
    lldb/trunk/test/functionalities/data-formatter/data-formatter-synthval/TestDataFormatterSynthVal.py
    lldb/trunk/test/functionalities/data-formatter/format-propagation/TestFormatPropagation.py
    lldb/trunk/test/functionalities/data-formatter/frameformat_smallstruct/TestFrameFormatSmallStruct.py
    lldb/trunk/test/functionalities/data-formatter/hexcaps/TestDataFormatterHexCaps.py
    lldb/trunk/test/functionalities/data-formatter/nsarraysynth/TestNSArraySynthetic.py
    lldb/trunk/test/functionalities/data-formatter/nsdictionarysynth/TestNSDictionarySynthetic.py
    lldb/trunk/test/functionalities/data-formatter/nssetsynth/TestNSSetSynthetic.py
    lldb/trunk/test/functionalities/data-formatter/ostypeformatting/TestFormattersOsType.py
    lldb/trunk/test/functionalities/data-formatter/ptr_ref_typedef/TestPtrRef2Typedef.py
    lldb/trunk/test/functionalities/data-formatter/refpointer-recursion/TestDataFormatterRefPtrRecursion.py
    lldb/trunk/test/functionalities/data-formatter/summary-string-onfail/Test-rdar-9974002.py
    lldb/trunk/test/functionalities/data-formatter/synthcapping/TestSyntheticCapping.py
    lldb/trunk/test/functionalities/data-formatter/synthupdate/TestSyntheticFilterRecompute.py
    lldb/trunk/test/functionalities/data-formatter/user-format-vs-summary/TestUserFormatVsSummary.py
    lldb/trunk/test/functionalities/data-formatter/var-in-aggregate-misuse/TestVarInAggregateMisuse.py
    lldb/trunk/test/functionalities/data-formatter/varscript_formatting/TestDataFormatterVarScriptFormatting.py
    lldb/trunk/test/functionalities/data-formatter/vector-types/TestVectorTypesFormatting.py
    lldb/trunk/test/functionalities/dead-strip/TestDeadStrip.py
    lldb/trunk/test/functionalities/disassembly/TestDisassembleBreakpoint.py
    lldb/trunk/test/functionalities/dynamic_value_child_count/TestDynamicValueChildCount.py
    lldb/trunk/test/functionalities/embedded_interpreter/TestConvenienceVariables.py
    lldb/trunk/test/functionalities/exec/TestExec.py
    lldb/trunk/test/functionalities/expr-doesnt-deadlock/TestExprDoesntBlock.py
    lldb/trunk/test/functionalities/fat_archives/TestFatArchives.py
    lldb/trunk/test/functionalities/format/TestFormats.py
    lldb/trunk/test/functionalities/inferior-assert/TestInferiorAssert.py
    lldb/trunk/test/functionalities/inferior-changed/TestInferiorChanged.py
    lldb/trunk/test/functionalities/inferior-crashing/TestInferiorCrashing.py
    lldb/trunk/test/functionalities/inferior-crashing/recursive-inferior/TestRecursiveInferior.py
    lldb/trunk/test/functionalities/inline-stepping/TestInlineStepping.py
    lldb/trunk/test/functionalities/jitloader_gdb/TestJITLoaderGDB.py
    lldb/trunk/test/functionalities/launch_with_shellexpand/TestLaunchWithShellExpand.py
    lldb/trunk/test/functionalities/load_unload/TestLoadUnload.py
    lldb/trunk/test/functionalities/longjmp/TestLongjmp.py
    lldb/trunk/test/functionalities/memory/read/TestMemoryRead.py
    lldb/trunk/test/functionalities/non-overlapping-index-variable-i/TestIndexVariable.py
    lldb/trunk/test/functionalities/nosucharch/TestNoSuchArch.py
    lldb/trunk/test/functionalities/object-file/TestImageListMultiArchitecture.py
    lldb/trunk/test/functionalities/paths/TestPaths.py
    lldb/trunk/test/functionalities/platform/TestPlatformCommand.py
    lldb/trunk/test/functionalities/plugins/commands/TestPluginCommands.py
    lldb/trunk/test/functionalities/plugins/python_os_plugin/TestPythonOSPlugin.py
    lldb/trunk/test/functionalities/postmortem/minidump/TestMiniDump.py
    lldb/trunk/test/functionalities/process_attach/TestProcessAttach.py
    lldb/trunk/test/functionalities/process_attach/attach_denied/TestAttachDenied.py
    lldb/trunk/test/functionalities/process_group/TestChangeProcessGroup.py
    lldb/trunk/test/functionalities/process_launch/TestProcessLaunch.py
    lldb/trunk/test/functionalities/recursion/TestValueObjectRecursion.py
    lldb/trunk/test/functionalities/register/TestRegisters.py
    lldb/trunk/test/functionalities/rerun/TestRerun.py
    lldb/trunk/test/functionalities/return-value/TestReturnValue.py
    lldb/trunk/test/functionalities/set-data/TestSetData.py
    lldb/trunk/test/functionalities/signal/TestSendSignal.py
    lldb/trunk/test/functionalities/signal/handle-segv/TestHandleSegv.py
    lldb/trunk/test/functionalities/signal/raise/TestRaise.py
    lldb/trunk/test/functionalities/single-quote-in-filename-to-lldb/TestSingleQuoteInFilename.py
    lldb/trunk/test/functionalities/step-avoids-no-debug/TestStepNoDebug.py
    lldb/trunk/test/functionalities/stop-hook/TestStopHookCmd.py
    lldb/trunk/test/functionalities/stop-hook/TestStopHookMechanism.py
    lldb/trunk/test/functionalities/stop-hook/multiple_threads/TestStopHookMultipleThreads.py
    lldb/trunk/test/functionalities/target_command/TestTargetCommand.py
    lldb/trunk/test/functionalities/thread/TestNumThreads.py
    lldb/trunk/test/functionalities/thread/break_after_join/TestBreakAfterJoin.py
    lldb/trunk/test/functionalities/thread/concurrent_events/TestConcurrentEvents.py
    lldb/trunk/test/functionalities/thread/crash_during_step/TestCrashDuringStep.py
    lldb/trunk/test/functionalities/thread/create_after_attach/TestCreateAfterAttach.py
    lldb/trunk/test/functionalities/thread/create_during_step/TestCreateDuringStep.py
    lldb/trunk/test/functionalities/thread/exit_during_break/TestExitDuringBreak.py
    lldb/trunk/test/functionalities/thread/exit_during_step/TestExitDuringStep.py
    lldb/trunk/test/functionalities/thread/jump/TestThreadJump.py
    lldb/trunk/test/functionalities/thread/multi_break/TestMultipleBreakpoints.py
    lldb/trunk/test/functionalities/thread/state/TestThreadStates.py
    lldb/trunk/test/functionalities/thread/step_out/TestThreadStepOut.py
    lldb/trunk/test/functionalities/thread/thread_exit/TestThreadExit.py
    lldb/trunk/test/functionalities/thread/thread_specific_break/TestThreadSpecificBreakpoint.py
    lldb/trunk/test/functionalities/tty/TestTerminal.py
    lldb/trunk/test/functionalities/type_completion/TestTypeCompletion.py
    lldb/trunk/test/functionalities/type_lookup/TestTypeLookup.py
    lldb/trunk/test/functionalities/unwind/noreturn/TestNoreturnUnwind.py
    lldb/trunk/test/functionalities/unwind/sigtramp/TestSigtrampUnwind.py
    lldb/trunk/test/functionalities/unwind/standard/TestStandardUnwind.py
    lldb/trunk/test/functionalities/value_md5_crash/TestValueMD5Crash.py
    lldb/trunk/test/functionalities/watchpoint/hello_watchlocation/TestWatchLocation.py
    lldb/trunk/test/functionalities/watchpoint/hello_watchpoint/TestMyFirstWatchpoint.py
    lldb/trunk/test/functionalities/watchpoint/multiple_threads/TestWatchpointMultipleThreads.py
    lldb/trunk/test/functionalities/watchpoint/step_over_watchpoint/TestStepOverWatchpoint.py
    lldb/trunk/test/functionalities/watchpoint/variable_out_of_scope/TestWatchedVarHitWhenInScope.py
    lldb/trunk/test/functionalities/watchpoint/watchpoint_commands/TestWatchpointCommands.py
    lldb/trunk/test/functionalities/watchpoint/watchpoint_commands/command/TestWatchpointCommandLLDB.py
    lldb/trunk/test/functionalities/watchpoint/watchpoint_commands/command/TestWatchpointCommandPython.py
    lldb/trunk/test/functionalities/watchpoint/watchpoint_commands/condition/TestWatchpointConditionCmd.py
    lldb/trunk/test/functionalities/watchpoint/watchpoint_events/TestWatchpointEvents.py
    lldb/trunk/test/functionalities/watchpoint/watchpoint_on_vectors/TestValueOfVectorVariable.py
    lldb/trunk/test/functionalities/watchpoint/watchpoint_set_command/TestWatchLocationWithWatchSet.py
    lldb/trunk/test/functionalities/watchpoint/watchpoint_set_command/TestWatchpointSetErrorCases.py
    lldb/trunk/test/help/TestHelp.py
    lldb/trunk/test/lang/c/anonymous/TestAnonymous.py
    lldb/trunk/test/lang/c/array_types/TestArrayTypes.py
    lldb/trunk/test/lang/c/bitfields/TestBitfields.py
    lldb/trunk/test/lang/c/blocks/TestBlocks.py
    lldb/trunk/test/lang/c/const_variables/TestConstVariables.py
    lldb/trunk/test/lang/c/enum_types/TestEnumTypes.py
    lldb/trunk/test/lang/c/forward/TestForwardDeclaration.py
    lldb/trunk/test/lang/c/function_types/TestFunctionTypes.py
    lldb/trunk/test/lang/c/global_variables/TestGlobalVariables.py
    lldb/trunk/test/lang/c/modules/TestCModules.py
    lldb/trunk/test/lang/c/register_variables/TestRegisterVariables.py
    lldb/trunk/test/lang/c/set_values/TestSetValues.py
    lldb/trunk/test/lang/c/shared_lib/TestSharedLib.py
    lldb/trunk/test/lang/c/shared_lib_stripped_symbols/TestSharedLibStrippedSymbols.py
    lldb/trunk/test/lang/c/stepping/TestStepAndBreakpoints.py
    lldb/trunk/test/lang/c/stepping/TestThreadStepping.py
    lldb/trunk/test/lang/c/strings/TestCStrings.py
    lldb/trunk/test/lang/c/tls_globals/TestTlsGlobals.py
    lldb/trunk/test/lang/c/typedef/Testtypedef.py
    lldb/trunk/test/lang/cpp/bool/TestCPPBool.py
    lldb/trunk/test/lang/cpp/breakpoint-commands/TestCPPBreakpointCommands.py
    lldb/trunk/test/lang/cpp/call-function/TestCallCPPFunction.py
    lldb/trunk/test/lang/cpp/chained-calls/TestCppChainedCalls.py
    lldb/trunk/test/lang/cpp/char1632_t/TestChar1632T.py
    lldb/trunk/test/lang/cpp/class_static/TestStaticVariables.py
    lldb/trunk/test/lang/cpp/class_types/TestClassTypes.py
    lldb/trunk/test/lang/cpp/class_types/TestClassTypesDisassembly.py
    lldb/trunk/test/lang/cpp/diamond/TestDiamond.py
    lldb/trunk/test/lang/cpp/dynamic-value/TestCppValueCast.py
    lldb/trunk/test/lang/cpp/dynamic-value/TestDynamicValue.py
    lldb/trunk/test/lang/cpp/enum_types/TestCPP11EnumTypes.py
    lldb/trunk/test/lang/cpp/exceptions/TestCPPExceptionBreakpoints.py
    lldb/trunk/test/lang/cpp/global_operators/TestCppGlobalOperators.py
    lldb/trunk/test/lang/cpp/incomplete-types/TestCppIncompleteTypes.py
    lldb/trunk/test/lang/cpp/namespace/TestNamespace.py
    lldb/trunk/test/lang/cpp/nsimport/TestCppNsImport.py
    lldb/trunk/test/lang/cpp/overloaded-functions/TestOverloadedFunctions.py
    lldb/trunk/test/lang/cpp/rdar12991846/TestRdar12991846.py
    lldb/trunk/test/lang/cpp/rvalue-references/TestRvalueReferences.py
    lldb/trunk/test/lang/cpp/scope/TestCppScope.py
    lldb/trunk/test/lang/cpp/signed_types/TestSignedTypes.py
    lldb/trunk/test/lang/cpp/static_members/TestCPPStaticMembers.py
    lldb/trunk/test/lang/cpp/static_methods/TestCPPStaticMethods.py
    lldb/trunk/test/lang/cpp/stl/TestSTL.py
    lldb/trunk/test/lang/cpp/stl/TestStdCXXDisassembly.py
    lldb/trunk/test/lang/cpp/this/TestCPPThis.py
    lldb/trunk/test/lang/cpp/unique-types/TestUniqueTypes.py
    lldb/trunk/test/lang/cpp/unsigned_types/TestUnsignedTypes.py
    lldb/trunk/test/lang/cpp/wchar_t/TestCxxWCharT.py
    lldb/trunk/test/lang/go/goroutines/TestGoroutines.py
    lldb/trunk/test/lang/go/types/TestGoASTContext.py
    lldb/trunk/test/lang/mixed/TestMixedLanguages.py
    lldb/trunk/test/lang/objc/blocks/TestObjCIvarsInBlocks.py
    lldb/trunk/test/lang/objc/forward-decl/TestForwardDecl.py
    lldb/trunk/test/lang/objc/foundation/TestConstStrings.py
    lldb/trunk/test/lang/objc/foundation/TestFoundationDisassembly.py
    lldb/trunk/test/lang/objc/foundation/TestObjCMethods.py
    lldb/trunk/test/lang/objc/foundation/TestObjCMethods2.py
    lldb/trunk/test/lang/objc/foundation/TestObjectDescriptionAPI.py
    lldb/trunk/test/lang/objc/foundation/TestRuntimeTypes.py
    lldb/trunk/test/lang/objc/foundation/TestSymbolTable.py
    lldb/trunk/test/lang/objc/hidden-ivars/TestHiddenIvars.py
    lldb/trunk/test/lang/objc/ivar-IMP/TestObjCiVarIMP.py
    lldb/trunk/test/lang/objc/modules-auto-import/TestModulesAutoImport.py
    lldb/trunk/test/lang/objc/modules-incomplete/TestIncompleteModules.py
    lldb/trunk/test/lang/objc/modules-inline-functions/TestModulesInlineFunctions.py
    lldb/trunk/test/lang/objc/modules/TestObjCModules.py
    lldb/trunk/test/lang/objc/objc++/TestObjCXX.py
    lldb/trunk/test/lang/objc/objc-baseclass-sbtype/TestObjCBaseClassSBType.py
    lldb/trunk/test/lang/objc/objc-builtin-types/TestObjCBuiltinTypes.py
    lldb/trunk/test/lang/objc/objc-checker/TestObjCCheckers.py
    lldb/trunk/test/lang/objc/objc-class-method/TestObjCClassMethod.py
    lldb/trunk/test/lang/objc/objc-dyn-sbtype/TestObjCDynamicSBType.py
    lldb/trunk/test/lang/objc/objc-dynamic-value/TestObjCDynamicValue.py
    lldb/trunk/test/lang/objc/objc-ivar-offsets/TestObjCIvarOffsets.py
    lldb/trunk/test/lang/objc/objc-ivar-stripped/TestObjCIvarStripped.py
    lldb/trunk/test/lang/objc/objc-new-syntax/TestObjCNewSyntax.py
    lldb/trunk/test/lang/objc/objc-optimized/TestObjcOptimized.py
    lldb/trunk/test/lang/objc/objc-property/TestObjCProperty.py
    lldb/trunk/test/lang/objc/objc-static-method-stripped/TestObjCStaticMethodStripped.py
    lldb/trunk/test/lang/objc/objc-static-method/TestObjCStaticMethod.py
    lldb/trunk/test/lang/objc/objc-stepping/TestObjCStepping.py
    lldb/trunk/test/lang/objc/objc-struct-argument/TestObjCStructArgument.py
    lldb/trunk/test/lang/objc/objc-struct-return/TestObjCStructReturn.py
    lldb/trunk/test/lang/objc/objc-super/TestObjCSuper.py
    lldb/trunk/test/lang/objc/print-obj/TestPrintObj.py
    lldb/trunk/test/lang/objc/radar-9691614/TestObjCMethodReturningBOOL.py
    lldb/trunk/test/lang/objc/rdar-10967107/TestRdar10967107.py
    lldb/trunk/test/lang/objc/rdar-11355592/TestRdar11355592.py
    lldb/trunk/test/lang/objc/rdar-12408181/TestRdar12408181.py
    lldb/trunk/test/lang/objc/real-definition/TestRealDefinition.py
    lldb/trunk/test/lang/objc/self/TestObjCSelf.py
    lldb/trunk/test/linux/builtin_trap/TestBuiltinTrap.py
    lldb/trunk/test/linux/thread/create_during_instruction_step/TestCreateDuringInstructionStep.py
    lldb/trunk/test/lldbinline.py
    lldb/trunk/test/lldbpexpect.py
    lldb/trunk/test/logging/TestLogging.py
    lldb/trunk/test/macosx/add-dsym/TestAddDsymMidExecutionCommand.py
    lldb/trunk/test/macosx/debug-info/apple_types/TestAppleTypesIsProduced.py
    lldb/trunk/test/macosx/indirect_symbol/TestIndirectSymbols.py
    lldb/trunk/test/macosx/order/TestOrderFile.py
    lldb/trunk/test/macosx/queues/TestQueues.py
    lldb/trunk/test/macosx/safe-to-func-call/TestSafeFuncCalls.py
    lldb/trunk/test/macosx/universal/TestUniversal.py
    lldb/trunk/test/python_api/breakpoint/TestBreakpointAPI.py
    lldb/trunk/test/python_api/class_members/TestSBTypeClassMembers.py
    lldb/trunk/test/python_api/default-constructor/TestDefaultConstructorForAPIObjects.py
    lldb/trunk/test/python_api/disassemble-raw-data/TestDisassembleRawData.py
    lldb/trunk/test/python_api/disassemble-raw-data/TestDisassemble_VST1_64.py
    lldb/trunk/test/python_api/event/TestEvents.py
    lldb/trunk/test/python_api/findvalue_duplist/TestSBFrameFindValue.py
    lldb/trunk/test/python_api/formatters/TestFormattersSBAPI.py
    lldb/trunk/test/python_api/frame/TestFrames.py
    lldb/trunk/test/python_api/frame/inlines/TestInlinedFrame.py
    lldb/trunk/test/python_api/function_symbol/TestDisasmAPI.py
    lldb/trunk/test/python_api/function_symbol/TestSymbolAPI.py
    lldb/trunk/test/python_api/hello_world/TestHelloWorld.py
    lldb/trunk/test/python_api/interpreter/TestCommandInterpreterAPI.py
    lldb/trunk/test/python_api/lldbutil/frame/TestFrameUtils.py
    lldb/trunk/test/python_api/lldbutil/iter/TestLLDBIterator.py
    lldb/trunk/test/python_api/lldbutil/iter/TestRegistersIterator.py
    lldb/trunk/test/python_api/lldbutil/process/TestPrintStackTraces.py
    lldb/trunk/test/python_api/module_section/TestModuleAndSection.py
    lldb/trunk/test/python_api/objc_type/TestObjCType.py
    lldb/trunk/test/python_api/process/TestProcessAPI.py
    lldb/trunk/test/python_api/process/io/TestProcessIO.py
    lldb/trunk/test/python_api/rdar-12481949/Test-rdar-12481949.py
    lldb/trunk/test/python_api/sbdata/TestSBData.py
    lldb/trunk/test/python_api/sbvalue_persist/TestSBValuePersist.py
    lldb/trunk/test/python_api/section/TestSectionAPI.py
    lldb/trunk/test/python_api/signals/TestSignalsAPI.py
    lldb/trunk/test/python_api/symbol-context/TestSymbolContext.py
    lldb/trunk/test/python_api/target/TestTargetAPI.py
    lldb/trunk/test/python_api/thread/TestThreadAPI.py
    lldb/trunk/test/python_api/type/TestTypeList.py
    lldb/trunk/test/python_api/value/TestValueAPI.py
    lldb/trunk/test/python_api/value/change_values/TestChangeValueAPI.py
    lldb/trunk/test/python_api/value/linked_list/TestValueAPILinkedList.py
    lldb/trunk/test/python_api/value_var_update/TestValueVarUpdate.py
    lldb/trunk/test/python_api/watchpoint/TestSetWatchpoint.py
    lldb/trunk/test/python_api/watchpoint/TestWatchpointIgnoreCount.py
    lldb/trunk/test/python_api/watchpoint/TestWatchpointIter.py
    lldb/trunk/test/python_api/watchpoint/condition/TestWatchpointConditionAPI.py
    lldb/trunk/test/python_api/watchpoint/watchlocation/TestSetWatchlocation.py
    lldb/trunk/test/python_api/watchpoint/watchlocation/TestTargetWatchAddress.py
    lldb/trunk/test/settings/TestSettings.py
    lldb/trunk/test/settings/quoting/TestQuoting.py
    lldb/trunk/test/source-manager/TestSourceManager.py
    lldb/trunk/test/terminal/TestSTTYBeforeAndAfter.py
    lldb/trunk/test/tools/lldb-mi/TestMiExit.py
    lldb/trunk/test/tools/lldb-mi/TestMiFile.py
    lldb/trunk/test/tools/lldb-mi/TestMiGdbSetShow.py
    lldb/trunk/test/tools/lldb-mi/TestMiLibraryLoaded.py
    lldb/trunk/test/tools/lldb-mi/TestMiPrompt.py
    lldb/trunk/test/tools/lldb-mi/breakpoint/TestMiBreak.py
    lldb/trunk/test/tools/lldb-mi/control/TestMiExec.py
    lldb/trunk/test/tools/lldb-mi/data/TestMiData.py
    lldb/trunk/test/tools/lldb-mi/interpreter/TestMiCliSupport.py
    lldb/trunk/test/tools/lldb-mi/interpreter/TestMiInterpreterExec.py
    lldb/trunk/test/tools/lldb-mi/lldbmi_testcase.py
    lldb/trunk/test/tools/lldb-mi/signal/TestMiSignal.py
    lldb/trunk/test/tools/lldb-mi/stack/TestMiStack.py
    lldb/trunk/test/tools/lldb-mi/startup_options/TestMiStartupOptions.py
    lldb/trunk/test/tools/lldb-mi/symbol/TestMiSymbol.py
    lldb/trunk/test/tools/lldb-mi/syntax/TestMiSyntax.py
    lldb/trunk/test/tools/lldb-mi/target/TestMiTarget.py
    lldb/trunk/test/tools/lldb-mi/variable/TestMiGdbSetShowPrint.py
    lldb/trunk/test/tools/lldb-mi/variable/TestMiVar.py
    lldb/trunk/test/tools/lldb-server/TestGDBRemoteMemoryRead.py
    lldb/trunk/test/tools/lldb-server/TestGdbRemoteAttach.py
    lldb/trunk/test/tools/lldb-server/TestGdbRemoteAuxvSupport.py
    lldb/trunk/test/tools/lldb-server/TestGdbRemoteExpeditedRegisters.py
    lldb/trunk/test/tools/lldb-server/TestGdbRemoteKill.py
    lldb/trunk/test/tools/lldb-server/TestGdbRemoteProcessInfo.py
    lldb/trunk/test/tools/lldb-server/TestGdbRemoteRegisterState.py
    lldb/trunk/test/tools/lldb-server/TestGdbRemoteSingleStep.py
    lldb/trunk/test/tools/lldb-server/TestGdbRemoteThreadsInStopReply.py
    lldb/trunk/test/tools/lldb-server/TestGdbRemote_qThreadStopInfo.py
    lldb/trunk/test/tools/lldb-server/TestGdbRemote_vCont.py
    lldb/trunk/test/tools/lldb-server/TestLldbGdbServer.py
    lldb/trunk/test/tools/lldb-server/commandline/TestStubReverseConnect.py
    lldb/trunk/test/tools/lldb-server/commandline/TestStubSetSID.py
    lldb/trunk/test/tools/lldb-server/gdbremote_testcase.py
    lldb/trunk/test/tools/lldb-server/inferior-crash/TestGdbRemoteAbort.py
    lldb/trunk/test/tools/lldb-server/inferior-crash/TestGdbRemoteSegFault.py
    lldb/trunk/test/tools/lldb-server/test/test_lldbgdbserverutils.py
    lldb/trunk/test/types/HideTestFailures.py
    lldb/trunk/test/types/TestFloatTypes.py
    lldb/trunk/test/types/TestFloatTypesExpr.py
    lldb/trunk/test/types/TestIntegerTypes.py
    lldb/trunk/test/types/TestIntegerTypesExpr.py
    lldb/trunk/test/types/TestRecursiveTypes.py
    lldb/trunk/test/warnings/uuid/TestAddDsymCommand.py

Modified: lldb/trunk/test/android/platform/TestDefaultCacheLineSize.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/android/platform/TestDefaultCacheLineSize.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/android/platform/TestDefaultCacheLineSize.py (original)
+++ lldb/trunk/test/android/platform/TestDefaultCacheLineSize.py Thu Oct 22 15:06:20 2015
@@ -2,8 +2,9 @@
 Verify the default cache line size for android targets
 """
 
+import lldb_shared
+
 import os
-import unittest2
 import lldb
 from lldbtest import *
 import lldbutil
@@ -33,9 +34,3 @@ class DefaultCacheLineSizeTestCase(TestB
         # Run to completion.
         process.Continue()
         self.assertEqual(process.GetState(), lldb.eStateExited, PROCESS_EXITED)
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/api/check_public_api_headers/TestPublicAPIHeaders.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/api/check_public_api_headers/TestPublicAPIHeaders.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/api/check_public_api_headers/TestPublicAPIHeaders.py (original)
+++ lldb/trunk/test/api/check_public_api_headers/TestPublicAPIHeaders.py Thu Oct 22 15:06:20 2015
@@ -6,7 +6,6 @@ should compile and link with the LLDB fr
 import lldb_shared
 
 import os, re
-import unittest2
 from lldbtest import *
 import lldbutil
 
@@ -87,9 +86,3 @@ class SBDirCheckerCase(TestBase):
                        'stop reason = breakpoint'])
 
         self.runCmd('frame variable')
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/api/multiple-debuggers/TestMultipleDebuggers.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/api/multiple-debuggers/TestMultipleDebuggers.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/api/multiple-debuggers/TestMultipleDebuggers.py (original)
+++ lldb/trunk/test/api/multiple-debuggers/TestMultipleDebuggers.py Thu Oct 22 15:06:20 2015
@@ -3,7 +3,6 @@
 import lldb_shared
 
 import os, re
-import unittest2
 from lldbtest import *
 import lldbutil
 import lldb
@@ -46,9 +45,3 @@ class TestMultipleSimultaneousDebuggers(
         else:
             with open(os.devnull, 'w') as fnull:
                 check_call([self.driver_exe, self.inferior_exe], env=env, stdout=fnull, stderr=fnull)
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/api/multithreaded/TestMultithreaded.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/api/multithreaded/TestMultithreaded.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/api/multithreaded/TestMultithreaded.py (original)
+++ lldb/trunk/test/api/multithreaded/TestMultithreaded.py Thu Oct 22 15:06:20 2015
@@ -3,7 +3,6 @@
 import lldb_shared
 
 import os, re
-import unittest2
 from lldbtest import *
 import lldbutil
 import subprocess
@@ -91,9 +90,3 @@ class SBBreakpointCallbackCase(TestBase)
 
     def build_program(self, sources, program):
         return self.buildDriver(sources, program)
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/arm_emulation/TestEmulations.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/arm_emulation/TestEmulations.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/arm_emulation/TestEmulations.py (original)
+++ lldb/trunk/test/arm_emulation/TestEmulations.py Thu Oct 22 15:06:20 2015
@@ -2,8 +2,9 @@
 Test some ARM instruction emulation.
 """
 
+import lldb_shared
+
 import os, time
-import unittest2
 import lldb
 from lldbtest import *
 
@@ -49,10 +50,3 @@ class ARMEmulationTestCase(TestBase):
             print output
 
         self.assertTrue (success, 'Emulation test succeeded.')
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()
-

Modified: lldb/trunk/test/benchmarks/continue/TestBenchmarkContinue.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/benchmarks/continue/TestBenchmarkContinue.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/benchmarks/continue/TestBenchmarkContinue.py (original)
+++ lldb/trunk/test/benchmarks/continue/TestBenchmarkContinue.py Thu Oct 22 15:06:20 2015
@@ -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()

Modified: lldb/trunk/test/benchmarks/disassembly/TestDisassembly.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/benchmarks/disassembly/TestDisassembly.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/benchmarks/disassembly/TestDisassembly.py (original)
+++ lldb/trunk/test/benchmarks/disassembly/TestDisassembly.py Thu Oct 22 15:06:20 2015
@@ -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(BenchBas
         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()

Modified: lldb/trunk/test/benchmarks/disassembly/TestDoAttachThenDisassembly.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/benchmarks/disassembly/TestDoAttachThenDisassembly.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/benchmarks/disassembly/TestDoAttachThenDisassembly.py (original)
+++ lldb/trunk/test/benchmarks/disassembly/TestDoAttachThenDisassembly.py Thu Oct 22 15:06:20 2015
@@ -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(BenchBa
             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()

Modified: lldb/trunk/test/benchmarks/disassembly/TestXcode41Vs42GDBDisassembly.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/benchmarks/disassembly/TestXcode41Vs42GDBDisassembly.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/benchmarks/disassembly/TestXcode41Vs42GDBDisassembly.py (original)
+++ lldb/trunk/test/benchmarks/disassembly/TestXcode41Vs42GDBDisassembly.py Thu Oct 22 15:06:20 2015
@@ -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(BenchBas
         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()

Modified: lldb/trunk/test/benchmarks/expression/TestExpressionCmd.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/benchmarks/expression/TestExpressionCmd.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/benchmarks/expression/TestExpressionCmd.py (original)
+++ lldb/trunk/test/benchmarks/expression/TestExpressionCmd.py Thu Oct 22 15:06:20 2015
@@ -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()

Modified: lldb/trunk/test/benchmarks/expression/TestRepeatedExprs.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/benchmarks/expression/TestRepeatedExprs.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/benchmarks/expression/TestRepeatedExprs.py (original)
+++ lldb/trunk/test/benchmarks/expression/TestRepeatedExprs.py Thu Oct 22 15:06:20 2015
@@ -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()

Modified: lldb/trunk/test/benchmarks/frame_variable/TestFrameVariableResponse.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/benchmarks/frame_variable/TestFrameVariableResponse.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/benchmarks/frame_variable/TestFrameVariableResponse.py (original)
+++ lldb/trunk/test/benchmarks/frame_variable/TestFrameVariableResponse.py Thu Oct 22 15:06:20 2015
@@ -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(BenchBa
         # 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()

Modified: lldb/trunk/test/benchmarks/startup/TestStartupDelays.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/benchmarks/startup/TestStartupDelays.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/benchmarks/startup/TestStartupDelays.py (original)
+++ lldb/trunk/test/benchmarks/startup/TestStartupDelays.py Thu Oct 22 15:06:20 2015
@@ -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()

Modified: lldb/trunk/test/benchmarks/stepping/TestRunHooksThenSteppings.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/benchmarks/stepping/TestRunHooksThenSteppings.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/benchmarks/stepping/TestRunHooksThenSteppings.py (original)
+++ lldb/trunk/test/benchmarks/stepping/TestRunHooksThenSteppings.py Thu Oct 22 15:06:20 2015
@@ -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(BenchBa
             pass
 
         self.child = None
-
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/benchmarks/stepping/TestSteppingSpeed.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/benchmarks/stepping/TestSteppingSpeed.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/benchmarks/stepping/TestSteppingSpeed.py (original)
+++ lldb/trunk/test/benchmarks/stepping/TestSteppingSpeed.py Thu Oct 22 15:06:20 2015
@@ -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()

Modified: lldb/trunk/test/benchmarks/turnaround/TestCompileRunToBreakpointTurnaround.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/benchmarks/turnaround/TestCompileRunToBreakpointTurnaround.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/benchmarks/turnaround/TestCompileRunToBreakpointTurnaround.py (original)
+++ lldb/trunk/test/benchmarks/turnaround/TestCompileRunToBreakpointTurnaround.py Thu Oct 22 15:06:20 2015
@@ -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(BenchB
 
         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()

Modified: lldb/trunk/test/driver/batch_mode/TestBatchMode.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/driver/batch_mode/TestBatchMode.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/driver/batch_mode/TestBatchMode.py (original)
+++ lldb/trunk/test/driver/batch_mode/TestBatchMode.py Thu Oct 22 15:06:20 2015
@@ -2,13 +2,10 @@
 Test that the lldb driver's batch mode works correctly.
 """
 
+import lldb_shared
+
 import os, time
-import unittest2
 import lldb
-try:
-    import pexpect
-except:
-    pexpect = None
 from lldbtest import *
 
 class DriverBatchModeTest (TestBase):
@@ -31,6 +28,7 @@ class DriverBatchModeTest (TestBase):
         self.source = 'main.c'
 
     def expect_string (self, string):
+        import pexpect
         """This expects for "string", with timeout & EOF being test fails."""
         try:
             self.child.expect_exact(string)
@@ -40,6 +38,7 @@ class DriverBatchModeTest (TestBase):
             self.fail ("Timed out waiting for '%s'"%(string))
 
     def batch_mode (self):
+        import pexpect
         exe = os.path.join(os.getcwd(), "a.out")
         prompt = "(lldb) "
 

Modified: lldb/trunk/test/expression_command/call-function/TestCallStdStringFunction.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/expression_command/call-function/TestCallStdStringFunction.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/expression_command/call-function/TestCallStdStringFunction.py (original)
+++ lldb/trunk/test/expression_command/call-function/TestCallStdStringFunction.py Thu Oct 22 15:06:20 2015
@@ -2,7 +2,8 @@
 Test calling std::String member functions.
 """
 
-import unittest2
+import lldb_shared
+
 import lldb
 import lldbutil
 from lldbtest import *
@@ -38,9 +39,3 @@ class ExprCommandCallFunctionTestCase(Te
         # const char *, and thus don't invoke the Summary formatter.
         self.expect("print str.c_str()",
             substrs = ['Hello world'])
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/expression_command/call-function/TestCallStopAndContinue.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/expression_command/call-function/TestCallStopAndContinue.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/expression_command/call-function/TestCallStopAndContinue.py (original)
+++ lldb/trunk/test/expression_command/call-function/TestCallStopAndContinue.py Thu Oct 22 15:06:20 2015
@@ -2,7 +2,8 @@
 Test calling a function, stopping in the call, continue and gather the result on stop.
 """
 
-import unittest2
+import lldb_shared
+
 import lldb
 import lldbutil
 from lldbtest import *
@@ -41,9 +42,3 @@ class ExprCommandCallStopContinueTestCas
         self.expect ("thread list",
                      substrs = ['stop reason = User Expression thread plan',
                                 r'Completed expression: (Five) $0 = (number = 5, name = "five")'])
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/expression_command/call-function/TestCallUserDefinedFunction.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/expression_command/call-function/TestCallUserDefinedFunction.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/expression_command/call-function/TestCallUserDefinedFunction.py (original)
+++ lldb/trunk/test/expression_command/call-function/TestCallUserDefinedFunction.py Thu Oct 22 15:06:20 2015
@@ -7,7 +7,8 @@ Note:
 
 """
 
-import unittest2
+import lldb_shared
+
 import lldb
 import lldbutil
 from lldbtest import *
@@ -47,10 +48,3 @@ class ExprCommandCallUserDefinedFunction
         # Test function with pointer paramter
         self.expect("exp stringCompare((const char*) \"Hello world\")", substrs = ['$4 = true'])
         self.expect("exp stringCompare((const char*) \"Hellworld\")", substrs = ['$5 = false'])
-
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/expression_command/call-restarts/TestCallThatRestarts.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/expression_command/call-restarts/TestCallThatRestarts.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/expression_command/call-restarts/TestCallThatRestarts.py (original)
+++ lldb/trunk/test/expression_command/call-restarts/TestCallThatRestarts.py Thu Oct 22 15:06:20 2015
@@ -2,7 +2,8 @@
 Test calling a function that hits a signal set to auto-restart, make sure the call completes.
 """
 
-import unittest2
+import lldb_shared
+
 import lldb
 import lldbutil
 from lldbtest import *
@@ -134,9 +135,3 @@ class ExprCommandThatRestartsTestCase(Te
         
         frame = self.thread.GetFrameAtIndex(0)
         self.assertTrue (frame.GetPC() == self.orig_frame_pc, "Continuing returned to the place we started.")
-        
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/expression_command/call-throws/TestCallThatThrows.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/expression_command/call-throws/TestCallThatThrows.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/expression_command/call-throws/TestCallThatThrows.py (original)
+++ lldb/trunk/test/expression_command/call-throws/TestCallThatThrows.py Thu Oct 22 15:06:20 2015
@@ -2,7 +2,8 @@
 Test calling a function that throws an ObjC exception, make sure that it doesn't propagate the exception.
 """
 
-import unittest2
+import lldb_shared
+
 import lldb
 import lldbutil
 from lldbtest import *
@@ -107,9 +108,3 @@ class ExprCommandWithThrowTestCase(TestB
 
         self.assertTrue (value.IsValid() and value.GetError().Success() == False)
         self.check_after_call()
-        
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/expression_command/char/TestExprsChar.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/expression_command/char/TestExprsChar.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/expression_command/char/TestExprsChar.py (original)
+++ lldb/trunk/test/expression_command/char/TestExprsChar.py Thu Oct 22 15:06:20 2015
@@ -1,4 +1,5 @@
-import unittest2
+import lldb_shared
+
 import lldb
 import lldbutil
 from lldbtest import *
@@ -64,9 +65,3 @@ class ExprCharTestCase(TestBase):
     @expectedFailureWindows("llvm.org/pr21765")
     def test_unsigned_char(self):
         self.do_test(dictionary={'CFLAGS_EXTRAS': '-funsigned-char'})
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/expression_command/expr-in-syscall/TestExpressionInSyscall.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/expression_command/expr-in-syscall/TestExpressionInSyscall.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/expression_command/expr-in-syscall/TestExpressionInSyscall.py (original)
+++ lldb/trunk/test/expression_command/expr-in-syscall/TestExpressionInSyscall.py Thu Oct 22 15:06:20 2015
@@ -1,7 +1,8 @@
 """Test that we are able to evaluate expressions when the inferior is blocked in a syscall"""
 
+import lldb_shared
+
 import os
-import unittest2
 import lldb
 from lldbtest import *
 import lldbutil
@@ -77,9 +78,3 @@ class ExprSyscallTestCase(TestBase):
 
         self.assertEqual(process.GetState(), lldb.eStateExited)
         self.assertEqual(process.GetExitStatus(), 0)
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/expression_command/formatters/TestFormatters.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/expression_command/formatters/TestFormatters.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/expression_command/formatters/TestFormatters.py (original)
+++ lldb/trunk/test/expression_command/formatters/TestFormatters.py Thu Oct 22 15:06:20 2015
@@ -2,7 +2,8 @@
 Test using LLDB data formatters with frozen objects coming from the expression parser.
 """
 
-import unittest2
+import lldb_shared
+
 import lldb
 import lldbutil
 from lldbtest import *
@@ -162,9 +163,3 @@ class ExprFormattersTestCase(TestBase):
         self.assertTrue(a_data.GetUnsignedInt32(error, 8) == 3, 'numbers[2] == 3')
         self.assertTrue(a_data.GetUnsignedInt32(error, 12) == 4, 'numbers[3] == 4')
         self.assertTrue(a_data.GetUnsignedInt32(error, 16) == 5, 'numbers[4] == 5')
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/expression_command/issue_11588/Test11588.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/expression_command/issue_11588/Test11588.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/expression_command/issue_11588/Test11588.py (original)
+++ lldb/trunk/test/expression_command/issue_11588/Test11588.py Thu Oct 22 15:06:20 2015
@@ -4,8 +4,9 @@ valobj.AddressOf() returns None when an
 expected in a SyntheticChildrenProvider
 """
 
+import lldb_shared
+
 import os, time
-import unittest2
 import lldb
 import lldbutil
 from lldbtest import *
@@ -72,10 +73,3 @@ class Issue11581TestCase(TestBase):
                     "load_address = ",
                     hex(addr)[2:].rstrip("L"),
                     str(addr)])
-
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/expression_command/options/TestExprOptions.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/expression_command/options/TestExprOptions.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/expression_command/options/TestExprOptions.py (original)
+++ lldb/trunk/test/expression_command/options/TestExprOptions.py Thu Oct 22 15:06:20 2015
@@ -7,8 +7,9 @@ o test_expr_options:
   Test expression command options.
 """
 
+import lldb_shared
+
 import os, time
-import unittest2
 import lldb
 import lldbutil
 from lldbtest import *
@@ -71,9 +72,3 @@ class ExprOptionsTestCase(TestBase):
         val = frame.EvaluateExpression('foo != nullptr', options)
         self.assertTrue(val.IsValid())
         self.assertFalse(val.GetError().Success())
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/expression_command/persist_objc_pointeetype/TestPersistObjCPointeeType.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/expression_command/persist_objc_pointeetype/TestPersistObjCPointeeType.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/expression_command/persist_objc_pointeetype/TestPersistObjCPointeeType.py (original)
+++ lldb/trunk/test/expression_command/persist_objc_pointeetype/TestPersistObjCPointeeType.py Thu Oct 22 15:06:20 2015
@@ -2,7 +2,8 @@
 Test that we can p *objcObject
 """
 
-import unittest2
+import lldb_shared
+
 import lldb
 import lldbutil
 from lldbtest import *
@@ -45,9 +46,3 @@ class PersistObjCPointeeType(TestBase):
         '_sc_name6 = nil',
         '_sc_name7 = nil',
         '_sc_name8 = nil'])
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/expression_command/persistent_ptr_update/TestPersistentPtrUpdate.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/expression_command/persistent_ptr_update/TestPersistentPtrUpdate.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/expression_command/persistent_ptr_update/TestPersistentPtrUpdate.py (original)
+++ lldb/trunk/test/expression_command/persistent_ptr_update/TestPersistentPtrUpdate.py Thu Oct 22 15:06:20 2015
@@ -2,7 +2,8 @@
 Test that we can have persistent pointer variables
 """
 
-import unittest2
+import lldb_shared
+
 import lldb
 import lldbutil
 from lldbtest import *
@@ -36,9 +37,3 @@ class PersistentPtrUpdateTestCase(TestBa
         self.runCmd("continue")
         
         self.expect("expr $foo", substrs=['$foo','0x0'])
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/expression_command/persistent_types/TestNestedPersistentTypes.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/expression_command/persistent_types/TestNestedPersistentTypes.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/expression_command/persistent_types/TestNestedPersistentTypes.py (original)
+++ lldb/trunk/test/expression_command/persistent_types/TestNestedPersistentTypes.py Thu Oct 22 15:06:20 2015
@@ -2,8 +2,9 @@
 Test that nested persistent types work.
 """
 
+import lldb_shared
+
 import os, time
-import unittest2
 import lldb
 from lldbtest import *
 
@@ -36,9 +37,3 @@ class NestedPersistentTypesTestCase(Test
 
         self.expect("expression $my_bar.end.b",
                     substrs = ['(int)', '5'])
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/expression_command/persistent_types/TestPersistentTypes.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/expression_command/persistent_types/TestPersistentTypes.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/expression_command/persistent_types/TestPersistentTypes.py (original)
+++ lldb/trunk/test/expression_command/persistent_types/TestPersistentTypes.py Thu Oct 22 15:06:20 2015
@@ -2,8 +2,9 @@
 Test that lldb persistent types works correctly.
 """
 
+import lldb_shared
+
 import os, time
-import unittest2
 import lldb
 from lldbtest import *
 
@@ -52,10 +53,3 @@ class PersistenttypesTestCase(TestBase):
 
         self.expect("expression struct A { int x; int y; }; struct { struct A a; int z; } object; object.a.y = 1; object.z = 3; object.a.x = 2; object",
                     substrs = ['x = 2', 'y = 1', 'z = 3'])
-
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/expression_command/persistent_variables/TestPersistentVariables.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/expression_command/persistent_variables/TestPersistentVariables.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/expression_command/persistent_variables/TestPersistentVariables.py (original)
+++ lldb/trunk/test/expression_command/persistent_variables/TestPersistentVariables.py Thu Oct 22 15:06:20 2015
@@ -2,8 +2,9 @@
 Test that lldb persistent variables works correctly.
 """
 
+import lldb_shared
+
 import os, time
-import unittest2
 import lldb
 from lldbtest import *
 
@@ -49,9 +50,3 @@ class PersistentVariablesTestCase(TestBa
 
         self.expect("expression (long)$4",
             startstr = "(long) $6 = -2")
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/expression_command/po_verbosity/TestPoVerbosity.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/expression_command/po_verbosity/TestPoVerbosity.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/expression_command/po_verbosity/TestPoVerbosity.py (original)
+++ lldb/trunk/test/expression_command/po_verbosity/TestPoVerbosity.py Thu Oct 22 15:06:20 2015
@@ -2,7 +2,8 @@
 Test that the po command acts correctly.
 """
 
-import unittest2
+import lldb_shared
+
 import lldb
 import lldbutil
 from lldbtest import *
@@ -56,10 +57,3 @@ class PoVerbosityTestCase(TestBase):
 
         self.expect("expr -O -v -- 22",
             substrs = ['(int) $', ' = 22'])
-
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/expression_command/radar_8638051/Test8638051.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/expression_command/radar_8638051/Test8638051.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/expression_command/radar_8638051/Test8638051.py (original)
+++ lldb/trunk/test/expression_command/radar_8638051/Test8638051.py Thu Oct 22 15:06:20 2015
@@ -2,8 +2,9 @@
 Test the robustness of lldb expression parser.
 """
 
+import lldb_shared
+
 import os, time
-import unittest2
 import lldb
 from lldbtest import *
 
@@ -34,10 +35,3 @@ class Radar8638051TestCase(TestBase):
         self.expect("expression &val",
             startstr = "(int *) $2 = ")
         # (int *) $2 = 0x....
-
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/expression_command/radar_9531204/TestPrintfAfterUp.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/expression_command/radar_9531204/TestPrintfAfterUp.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/expression_command/radar_9531204/TestPrintfAfterUp.py (original)
+++ lldb/trunk/test/expression_command/radar_9531204/TestPrintfAfterUp.py Thu Oct 22 15:06:20 2015
@@ -2,8 +2,9 @@
 The evaluating printf(...) after break stop and then up a stack frame.
 """
 
+import lldb_shared
+
 import os, time
-import unittest2
 import lldb
 from lldbtest import *
 import lldbutil
@@ -37,10 +38,3 @@ class Radar9531204TestCase(TestBase):
 
         # This does not currently.
         self.runCmd('expression (int)printf("argc is: %d.\\n", argc)')
-
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/expression_command/radar_9673664/TestExprHelpExamples.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/expression_command/radar_9673664/TestExprHelpExamples.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/expression_command/radar_9673664/TestExprHelpExamples.py (original)
+++ lldb/trunk/test/expression_command/radar_9673664/TestExprHelpExamples.py Thu Oct 22 15:06:20 2015
@@ -2,8 +2,9 @@
 Test example snippets from the lldb 'help expression' output.
 """
 
+import lldb_shared
+
 import os, time
-import unittest2
 import lldb
 from lldbtest import *
 import lldbutil
@@ -36,10 +37,3 @@ class Radar9673644TestCase(TestBase):
             substrs = ["'f'"])
         # runCmd: expr char c[] = "foo"; c[0]
         # output: (char) $0 = 'f'
-
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/expression_command/test/TestExprs.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/expression_command/test/TestExprs.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/expression_command/test/TestExprs.py (original)
+++ lldb/trunk/test/expression_command/test/TestExprs.py Thu Oct 22 15:06:20 2015
@@ -11,8 +11,11 @@ o test_expr_commands_can_handle_quotes:
   Throw some expression commands with quotes at lldb.
 """
 
-import os, time
+import lldb_shared
+
 import unittest2
+
+import os, time
 import lldb
 import lldbutil
 from lldbtest import *
@@ -243,9 +246,3 @@ class BasicExprCommandsTestCase(TestBase
         self.expect('print_hi',
             substrs = ['(int) $',
                        '6'])
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/expression_command/test/TestExprs2.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/expression_command/test/TestExprs2.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/expression_command/test/TestExprs2.py (original)
+++ lldb/trunk/test/expression_command/test/TestExprs2.py Thu Oct 22 15:06:20 2015
@@ -2,8 +2,9 @@
 Test some more expression commands.
 """
 
+import lldb_shared
+
 import os
-import unittest2
 import lldb
 import lldbutil
 from lldbtest import *
@@ -55,10 +56,3 @@ class ExprCommands2TestCase(TestBase):
         self.expect("expression $4 + 1",
             startstr = "(int) $5 = 24")
         # (int) $5 = 6
-
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/expression_command/timeout/TestCallWithTimeout.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/expression_command/timeout/TestCallWithTimeout.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/expression_command/timeout/TestCallWithTimeout.py (original)
+++ lldb/trunk/test/expression_command/timeout/TestCallWithTimeout.py Thu Oct 22 15:06:20 2015
@@ -2,7 +2,8 @@
 Test calling a function that waits a while, and make sure the timeout option to expr works.
 """
 
-import unittest2
+import lldb_shared
+
 import lldb
 import lldbutil
 from lldbtest import *
@@ -87,10 +88,3 @@ class ExprCommandWithTimeoutsTestCase(Te
         value = frame.EvaluateExpression ("wait_a_while (1000)", options)
         self.assertTrue(value.IsValid())
         self.assertTrue (value.GetError().Success() == True)
-        
-        
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/expression_command/two-files/TestObjCTypeQueryFromOtherCompileUnit.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/expression_command/two-files/TestObjCTypeQueryFromOtherCompileUnit.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/expression_command/two-files/TestObjCTypeQueryFromOtherCompileUnit.py (original)
+++ lldb/trunk/test/expression_command/two-files/TestObjCTypeQueryFromOtherCompileUnit.py Thu Oct 22 15:06:20 2015
@@ -4,7 +4,8 @@ Regression test for <rdar://problem/8981
 The expression parser's type search only looks in the current compilation unit for types.
 """
 
-import unittest2
+import lldb_shared
+
 import lldb
 from lldbtest import *
 import lldbutil
@@ -34,10 +35,3 @@ class ObjCTypeQueryTestCase(TestBase):
         self.expect("expression (NSArray*)array_token",
             substrs = ['(NSArray *) $0 = 0x'])
         # (NSArray *) $0 = 0x00007fff70118398
-
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/functionalities/abbreviation/TestAbbreviations.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/abbreviation/TestAbbreviations.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/functionalities/abbreviation/TestAbbreviations.py (original)
+++ lldb/trunk/test/functionalities/abbreviation/TestAbbreviations.py Thu Oct 22 15:06:20 2015
@@ -2,8 +2,9 @@
 Test some lldb command abbreviations and aliases for proper resolution.
 """
 
+import lldb_shared
+
 import os, time
-import unittest2
 import lldb
 from lldbtest import *
 import lldbutil
@@ -96,11 +97,3 @@ class AbbreviationsTestCase(TestBase):
         #self.runCmd("se cl prompt")
         #self.expect("set sh prompt",
         #            startstr = 'prompt (string) = "(lldb) "')
-
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()
-

Modified: lldb/trunk/test/functionalities/abbreviation/TestCommonShortSpellings.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/abbreviation/TestCommonShortSpellings.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/functionalities/abbreviation/TestCommonShortSpellings.py (original)
+++ lldb/trunk/test/functionalities/abbreviation/TestCommonShortSpellings.py Thu Oct 22 15:06:20 2015
@@ -3,8 +3,9 @@ Test some lldb command abbreviations to
 many commands remain available even after we add/delete commands in the future.
 """
 
+import lldb_shared
+
 import os, time
-import unittest2
 import lldb
 from lldbtest import *
 import lldbutil
@@ -33,11 +34,3 @@ class CommonShortSpellingsTestCase(TestB
             command_interpreter.ResolveCommand(short, result)
             self.assertTrue(result.Succeeded())
             self.assertEqual(long, result.GetOutput())
-
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()
-

Modified: lldb/trunk/test/functionalities/archives/TestBSDArchives.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/archives/TestBSDArchives.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/functionalities/archives/TestBSDArchives.py (original)
+++ lldb/trunk/test/functionalities/archives/TestBSDArchives.py Thu Oct 22 15:06:20 2015
@@ -1,7 +1,8 @@
 """Test breaking inside functions defined within a BSD archive file libfoo.a."""
 
+import lldb_shared
+
 import os, time
-import unittest2
 import lldb
 from lldbtest import *
 import lldbutil
@@ -52,10 +53,3 @@ class BSDArchivesTestCase(TestBase):
             substrs = ['(int) arg = 2'])
         self.expect("frame variable __b_global", VARIABLES_DISPLAYED_CORRECTLY,
             substrs = ['(int) __b_global = 2'])
-
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/functionalities/asan/TestMemoryHistory.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/asan/TestMemoryHistory.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/functionalities/asan/TestMemoryHistory.py (original)
+++ lldb/trunk/test/functionalities/asan/TestMemoryHistory.py Thu Oct 22 15:06:20 2015
@@ -2,8 +2,9 @@
 Test that ASan memory history provider returns correct stack traces
 """
 
+import lldb_shared
+
 import os, time
-import unittest2
 import lldb
 from lldbtest import *
 import lldbutil
@@ -102,9 +103,3 @@ class AsanTestCase(TestBase):
         self.expect("memory history 'another_pointer'",
             substrs = [
                 'Memory allocated at', 'a.out`f1', 'main.c:%d' % self.line_malloc2])
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/functionalities/asan/TestReportData.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/asan/TestReportData.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/functionalities/asan/TestReportData.py (original)
+++ lldb/trunk/test/functionalities/asan/TestReportData.py Thu Oct 22 15:06:20 2015
@@ -2,8 +2,9 @@
 Test the AddressSanitizer runtime support for report breakpoint and data extraction.
 """
 
+import lldb_shared
+
 import os, time
-import unittest2
 import lldb
 from lldbtest import *
 import lldbutil
@@ -78,9 +79,3 @@ class AsanTestReportDataCase(TestBase):
         s = s.GetData()
         data2 = json.loads(s)
         self.assertEqual(data, data2)
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/functionalities/attach_resume/TestAttachResume.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/attach_resume/TestAttachResume.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/functionalities/attach_resume/TestAttachResume.py (original)
+++ lldb/trunk/test/functionalities/attach_resume/TestAttachResume.py Thu Oct 22 15:06:20 2015
@@ -2,8 +2,9 @@
 Test process attach/resume.
 """
 
+import lldb_shared
+
 import os, time
-import unittest2
 import lldb
 from lldbtest import *
 import lldbutil
@@ -66,9 +67,3 @@ class AttachResumeTestCase(TestBase):
         # make sure to detach while in running state (r204759)
         self.runCmd("detach")
         lldbutil.expect_state_changes(self, listener, [lldb.eStateDetached])
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/functionalities/avoids-fd-leak/TestFdLeak.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/avoids-fd-leak/TestFdLeak.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/functionalities/avoids-fd-leak/TestFdLeak.py (original)
+++ lldb/trunk/test/functionalities/avoids-fd-leak/TestFdLeak.py Thu Oct 22 15:06:20 2015
@@ -2,8 +2,9 @@
 Test whether a process started by lldb has no extra file descriptors open.
 """
 
+import lldb_shared
+
 import os
-import unittest2
 import lldb
 from lldbtest import *
 import lldbutil
@@ -70,10 +71,3 @@ class AvoidsFdLeakTestCase(TestBase):
         self.assertTrue(process2.GetState() == lldb.eStateExited, "Process should have exited.")
         self.assertTrue(process2.GetExitStatus() == 0,
                 "Process returned non-zero status. Were incorrect file descriptors passed?")
-
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/functionalities/backticks/TestBackticksWithoutATarget.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/backticks/TestBackticksWithoutATarget.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/functionalities/backticks/TestBackticksWithoutATarget.py (original)
+++ lldb/trunk/test/functionalities/backticks/TestBackticksWithoutATarget.py Thu Oct 22 15:06:20 2015
@@ -2,8 +2,9 @@
 Test that backticks without a target should work (not infinite looping).
 """
 
+import lldb_shared
+
 import os, time
-import unittest2
 import lldb
 from lldbtest import *
 
@@ -16,9 +17,3 @@ class BackticksWithNoTargetTestCase(Test
         """A simple test of backticks without a target."""
         self.expect("print `1+2-3`",
             substrs = [' = 0'])
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/functionalities/breakpoint/breakpoint_command/TestBreakpointCommand.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/breakpoint/breakpoint_command/TestBreakpointCommand.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/functionalities/breakpoint/breakpoint_command/TestBreakpointCommand.py (original)
+++ lldb/trunk/test/functionalities/breakpoint/breakpoint_command/TestBreakpointCommand.py Thu Oct 22 15:06:20 2015
@@ -2,8 +2,9 @@
 Test lldb breakpoint command add/list/delete.
 """
 
+import lldb_shared
+
 import os, time
-import unittest2
 import lldb
 from lldbtest import *
 import lldbutil
@@ -201,9 +202,3 @@ class BreakpointCommandTestCase(TestBase
 
         # Now remove 'output-2.txt'
         os.remove ('output-2.txt')
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/functionalities/breakpoint/breakpoint_command/TestBreakpointCommandsFromPython.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/breakpoint/breakpoint_command/TestBreakpointCommandsFromPython.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/functionalities/breakpoint/breakpoint_command/TestBreakpointCommandsFromPython.py (original)
+++ lldb/trunk/test/functionalities/breakpoint/breakpoint_command/TestBreakpointCommandsFromPython.py Thu Oct 22 15:06:20 2015
@@ -2,9 +2,10 @@
 Test that you can set breakpoint commands successfully with the Python API's:
 """
 
+import lldb_shared
+
 import os
 import re
-import unittest2
 import lldb, lldbutil
 import sys
 from lldbtest import *
@@ -89,10 +90,3 @@ print 'Hit breakpoint'")
         self.assertTrue(os.path.isfile("output2.txt"),
                         "'output2.txt' exists due to breakpoint command for breakpoint function.")
         self.RemoveTempFile("output2.txt")
-
-        
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/functionalities/breakpoint/breakpoint_command/TestRegexpBreakCommand.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/breakpoint/breakpoint_command/TestRegexpBreakCommand.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/functionalities/breakpoint/breakpoint_command/TestRegexpBreakCommand.py (original)
+++ lldb/trunk/test/functionalities/breakpoint/breakpoint_command/TestRegexpBreakCommand.py Thu Oct 22 15:06:20 2015
@@ -2,8 +2,9 @@
 Test _regexp-break command which uses regular expression matching to dispatch to other built in breakpoint commands.
 """
 
+import lldb_shared
+
 import os, time
-import unittest2
 import lldb
 from lldbtest import *
 import lldbutil
@@ -46,10 +47,3 @@ class RegexpBreakCommandTestCase(TestBas
         self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
             substrs = ['stopped',
                        'stop reason = breakpoint'])
-
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/functionalities/breakpoint/breakpoint_conditions/TestBreakpointConditions.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/breakpoint/breakpoint_conditions/TestBreakpointConditions.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/functionalities/breakpoint/breakpoint_conditions/TestBreakpointConditions.py (original)
+++ lldb/trunk/test/functionalities/breakpoint/breakpoint_conditions/TestBreakpointConditions.py Thu Oct 22 15:06:20 2015
@@ -2,9 +2,10 @@
 Test breakpoint conditions with 'breakpoint modify -c <expr> id'.
 """
 
+import lldb_shared
+
 import os, time
 import re
-import unittest2
 import lldb, lldbutil
 from lldbtest import *
 
@@ -172,10 +173,3 @@ class BreakpointConditionsTestCase(TestB
         self.assertTrue(breakpoint.GetHitCount() == 1)
 
         process.Continue()
-
-        
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/functionalities/breakpoint/breakpoint_ids/TestBreakpointIDs.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/breakpoint/breakpoint_ids/TestBreakpointIDs.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/functionalities/breakpoint/breakpoint_ids/TestBreakpointIDs.py (original)
+++ lldb/trunk/test/functionalities/breakpoint/breakpoint_ids/TestBreakpointIDs.py Thu Oct 22 15:06:20 2015
@@ -2,8 +2,9 @@
 Test lldb breakpoint ids.
 """
 
+import lldb_shared
+
 import os, time
-import unittest2
 import lldb
 from lldbtest import *
 import lldbutil
@@ -46,10 +47,3 @@ class BreakpointIDTestCase(TestBase):
 
         self.expect ("breakpoint enable 2.*",
                      patterns = [ ".* breakpoints enabled."] )
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()
-

Modified: lldb/trunk/test/functionalities/breakpoint/breakpoint_ignore_count/TestBreakpointIgnoreCount.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/breakpoint/breakpoint_ignore_count/TestBreakpointIgnoreCount.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/functionalities/breakpoint/breakpoint_ignore_count/TestBreakpointIgnoreCount.py (original)
+++ lldb/trunk/test/functionalities/breakpoint/breakpoint_ignore_count/TestBreakpointIgnoreCount.py Thu Oct 22 15:06:20 2015
@@ -2,9 +2,10 @@
 Test breakpoint ignore count features.
 """
 
+import lldb_shared
+
 import os, time
 import re
-import unittest2
 import lldb, lldbutil
 from lldbtest import *
 
@@ -130,10 +131,3 @@ class BreakpointIgnoreCountTestCase(Test
         self.assertTrue(breakpoint.GetHitCount() == 3)
 
         process.Continue()
-
-        
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/functionalities/breakpoint/breakpoint_locations/TestBreakpointLocations.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/breakpoint/breakpoint_locations/TestBreakpointLocations.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/functionalities/breakpoint/breakpoint_locations/TestBreakpointLocations.py (original)
+++ lldb/trunk/test/functionalities/breakpoint/breakpoint_locations/TestBreakpointLocations.py Thu Oct 22 15:06:20 2015
@@ -2,8 +2,9 @@
 Test breakpoint commands for a breakpoint ID with multiple locations.
 """
 
+import lldb_shared
+
 import os, time
-import unittest2
 import lldb
 from lldbtest import *
 import lldbutil
@@ -83,10 +84,3 @@ class BreakpointLocationsTestCase(TestBa
             patterns = ["1\.1: .+ unresolved, hit count = 0 +Options: disabled",
                         "1\.2: .+ resolved, hit count = 1",
                         "1\.3: .+ resolved, hit count = 1"])
-
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/functionalities/breakpoint/breakpoint_options/TestBreakpointOptions.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/breakpoint/breakpoint_options/TestBreakpointOptions.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/functionalities/breakpoint/breakpoint_options/TestBreakpointOptions.py (original)
+++ lldb/trunk/test/functionalities/breakpoint/breakpoint_options/TestBreakpointOptions.py Thu Oct 22 15:06:20 2015
@@ -2,8 +2,9 @@
 Test breakpoint command for different options.
 """
 
+import lldb_shared
+
 import os
-import unittest2
 import lldb
 from lldbtest import *
 import lldbutil
@@ -88,9 +89,3 @@ class BreakpointOptionsTestCase(TestBase
         # We should exit.
         self.expect("process status", "Process exited successfully",
             patterns = ["^Process [0-9]+ exited with status = 0"])
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/functionalities/breakpoint/comp_dir_symlink/TestCompDirSymLink.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/breakpoint/comp_dir_symlink/TestCompDirSymLink.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/functionalities/breakpoint/comp_dir_symlink/TestCompDirSymLink.py (original)
+++ lldb/trunk/test/functionalities/breakpoint/comp_dir_symlink/TestCompDirSymLink.py Thu Oct 22 15:06:20 2015
@@ -1,8 +1,9 @@
 """
 Test breakpoint command with AT_comp_dir set to symbolic link.
 """
+import lldb_shared
+
 import os
-import unittest2
 import lldb
 from lldbtest import *
 import lldbutil
@@ -58,10 +59,3 @@ class CompDirSymLinkTestCase(TestBase):
 
         exe = os.path.join(os.getcwd(), _EXE_NAME)
         self.runCmd('file ' + exe, CURRENT_EXECUTABLE_SET)
-
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/functionalities/breakpoint/consecutive_breakpoins/TestConsecutiveBreakpoints.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/breakpoint/consecutive_breakpoins/TestConsecutiveBreakpoints.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/functionalities/breakpoint/consecutive_breakpoins/TestConsecutiveBreakpoints.py (original)
+++ lldb/trunk/test/functionalities/breakpoint/consecutive_breakpoins/TestConsecutiveBreakpoints.py Thu Oct 22 15:06:20 2015
@@ -2,6 +2,8 @@
 Test continue from a breakpoint when there is a breakpoint on the next instruction also.
 """
 
+import lldb_shared
+
 import unittest2
 import lldb, lldbutil
 from lldbtest import *
@@ -61,10 +63,3 @@ class ConsecutiveBreakpoitsTestCase(Test
 
         # Run the process until termination
         process.Continue()
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()
-

Modified: lldb/trunk/test/functionalities/breakpoint/cpp/TestCPPBreakpointLocations.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/breakpoint/cpp/TestCPPBreakpointLocations.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/functionalities/breakpoint/cpp/TestCPPBreakpointLocations.py (original)
+++ lldb/trunk/test/functionalities/breakpoint/cpp/TestCPPBreakpointLocations.py Thu Oct 22 15:06:20 2015
@@ -2,8 +2,9 @@
 Test lldb breakpoint ids.
 """
 
+import lldb_shared
+
 import os, time
-import unittest2
 import lldb
 from lldbtest import *
 import lldbutil
@@ -57,11 +58,3 @@ class TestCPPBreakpointLocations(TestBas
         
         for bp_dict in bp_dicts:
             self.verify_breakpoint_locations(target, bp_dict)
-
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()
-

Modified: lldb/trunk/test/functionalities/breakpoint/cpp_exception/TestCPPExceptionBreakpoint.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/breakpoint/cpp_exception/TestCPPExceptionBreakpoint.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/functionalities/breakpoint/cpp_exception/TestCPPExceptionBreakpoint.py (original)
+++ lldb/trunk/test/functionalities/breakpoint/cpp_exception/TestCPPExceptionBreakpoint.py Thu Oct 22 15:06:20 2015
@@ -2,9 +2,10 @@
 Test that you can set breakpoint and hit the C++ language exception breakpoint
 """
 
+import lldb_shared
+
 import os
 import re
-import unittest2
 import lldb, lldbutil
 import sys
 from lldbtest import *
@@ -42,9 +43,3 @@ class TestCPPExceptionBreakpoint (TestBa
         
         thread_list = lldbutil.get_threads_stopped_at_breakpoint (process, exception_bkpt)
         self.assertTrue (len(thread_list) == 1, "One thread stopped at the exception breakpoint.")
-        
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/functionalities/breakpoint/dummy_target_breakpoints/TestBreakpointsWithNoTargets.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/breakpoint/dummy_target_breakpoints/TestBreakpointsWithNoTargets.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/functionalities/breakpoint/dummy_target_breakpoints/TestBreakpointsWithNoTargets.py (original)
+++ lldb/trunk/test/functionalities/breakpoint/dummy_target_breakpoints/TestBreakpointsWithNoTargets.py Thu Oct 22 15:06:20 2015
@@ -2,8 +2,9 @@
 Test breakpoint commands set before we have a target
 """
 
+import lldb_shared
+
 import os, time
-import unittest2
 import lldb
 from lldbtest import *
 import lldbutil
@@ -62,9 +63,3 @@ class BreakpointInDummyTarget (TestBase)
         # Stopped again.
         self.expect("thread backtrace", STOPPED_DUE_TO_BREAKPOINT,
             substrs = ["stop reason = breakpoint 2."])
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/functionalities/breakpoint/inlined_breakpoints/TestInlinedBreakpoints.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/breakpoint/inlined_breakpoints/TestInlinedBreakpoints.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/functionalities/breakpoint/inlined_breakpoints/TestInlinedBreakpoints.py (original)
+++ lldb/trunk/test/functionalities/breakpoint/inlined_breakpoints/TestInlinedBreakpoints.py Thu Oct 22 15:06:20 2015
@@ -3,8 +3,9 @@ Test that inlined breakpoints (breakpoin
 another source file) works correctly.
 """
 
+import lldb_shared
+
 import os, time
-import unittest2
 import lldb
 from lldbtest import *
 import lldbutil
@@ -52,10 +53,3 @@ class InlinedBreakpointsTestCase(TestBas
             substrs = ['stopped',
                        'stop reason = breakpoint',
                        'basic_type.cpp:%d' % self.line])
-
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/functionalities/breakpoint/objc/TestObjCBreakpoints.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/breakpoint/objc/TestObjCBreakpoints.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/functionalities/breakpoint/objc/TestObjCBreakpoints.py (original)
+++ lldb/trunk/test/functionalities/breakpoint/objc/TestObjCBreakpoints.py Thu Oct 22 15:06:20 2015
@@ -3,8 +3,9 @@ Test that objective-c constant strings a
 parser.
 """
 
+import lldb_shared
+
 import os, time
-import unittest2
 import lldb
 from lldbtest import *
 import lldbutil
@@ -89,9 +90,3 @@ class TestObjCBreakpoints(TestBase):
         
         # Check breakpoints again, this time using the symbol table only
         self.check_category_breakpoints()
-        
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/functionalities/command_history/TestCommandHistory.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/command_history/TestCommandHistory.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/functionalities/command_history/TestCommandHistory.py (original)
+++ lldb/trunk/test/functionalities/command_history/TestCommandHistory.py Thu Oct 22 15:06:20 2015
@@ -2,8 +2,9 @@
 Test the command history mechanism
 """
 
+import lldb_shared
+
 import os
-import unittest2
 import lldb
 from lldbtest import *
 
@@ -63,10 +64,3 @@ class CommandHistoryTestCase(TestBase):
 
         self.expect ("command history -c 1 -e 3 -s 5",error=True, inHistory=True,
                      substrs = ['error: --count, --start-index and --end-index cannot be all specified in the same invocation'])
-
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/functionalities/command_regex/TestCommandRegex.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/command_regex/TestCommandRegex.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/functionalities/command_regex/TestCommandRegex.py (original)
+++ lldb/trunk/test/functionalities/command_regex/TestCommandRegex.py Thu Oct 22 15:06:20 2015
@@ -2,8 +2,9 @@
 Test lldb 'commands regex' command which allows the user to create a regular expression command.
 """
 
+import lldb_shared
+
 import os
-import unittest2
 import lldb
 from lldbtest import *
 
@@ -51,9 +52,3 @@ class CommandRegexTestCase(TestBase):
         child.sendline('Help__')
         child.expect_exact("error: 'Help__' is not a valid command")
         child.expect_exact(prompt)
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/functionalities/command_script/TestCommandScript.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/command_script/TestCommandScript.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/functionalities/command_script/TestCommandScript.py (original)
+++ lldb/trunk/test/functionalities/command_script/TestCommandScript.py Thu Oct 22 15:06:20 2015
@@ -2,8 +2,9 @@
 Test lldb Python commands.
 """
 
+import lldb_shared
+
 import os, time
-import unittest2
 import lldb
 from lldbtest import *
 
@@ -137,10 +138,3 @@ class CmdPythonTestCase(TestBase):
         self.runCmd('command script add -f bug11569 bug11569')
         # This should not crash.
         self.runCmd('bug11569', check=False)
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()
-

Modified: lldb/trunk/test/functionalities/command_script/import/TestImport.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/command_script/import/TestImport.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/functionalities/command_script/import/TestImport.py (original)
+++ lldb/trunk/test/functionalities/command_script/import/TestImport.py Thu Oct 22 15:06:20 2015
@@ -1,7 +1,8 @@
 """Test custom import command to import files by path."""
 
+import lldb_shared
+
 import os, sys, time
-import unittest2
 import lldb
 from lldbtest import *
 
@@ -68,10 +69,3 @@ class ImportTestCase(TestBase):
                 substrs = ['barutil says', 'bar told me', 'hello'])
         self.expect("foobarcmd hello",
                 substrs = ['foobar says', 'hello'])
-
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/functionalities/command_script/import/rdar-12586188/TestRdar12586188.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/command_script/import/rdar-12586188/TestRdar12586188.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/functionalities/command_script/import/rdar-12586188/TestRdar12586188.py (original)
+++ lldb/trunk/test/functionalities/command_script/import/rdar-12586188/TestRdar12586188.py Thu Oct 22 15:06:20 2015
@@ -1,7 +1,8 @@
 """Check that we handle an ImportError in a special way when command script importing files."""
 
+import lldb_shared
+
 import os, sys, time
-import unittest2
 import lldb
 from lldbtest import *
 
@@ -26,9 +27,3 @@ class Rdar12586188TestCase(TestBase):
                 error=True, substrs = ['raise ImportError("I do not want to be imported")'])
         self.expect("command script import ./fail212586188.py --allow-reload",
                 error=True, substrs = ['raise ValueError("I do not want to be imported")'])
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/functionalities/command_source/TestCommandSource.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/command_source/TestCommandSource.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/functionalities/command_source/TestCommandSource.py (original)
+++ lldb/trunk/test/functionalities/command_source/TestCommandSource.py Thu Oct 22 15:06:20 2015
@@ -4,8 +4,9 @@ Test that lldb command "command source"
 See also http://llvm.org/viewvc/llvm-project?view=rev&revision=109673.
 """
 
+import lldb_shared
+
 import os, sys
-import unittest2
 import lldb
 from lldbtest import *
 
@@ -31,10 +32,3 @@ class CommandSourceTestCase(TestBase):
         self.expect(result.GetOutput(), "script my.date() runs successfully",
                     exe=False,
             substrs = [str(datetime.date.today())])
-
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/functionalities/completion/TestCompletion.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/completion/TestCompletion.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/functionalities/completion/TestCompletion.py (original)
+++ lldb/trunk/test/functionalities/completion/TestCompletion.py Thu Oct 22 15:06:20 2015
@@ -2,8 +2,9 @@
 Test the lldb command line completion mechanism.
 """
 
+import lldb_shared
+
 import os
-import unittest2
 import lldb
 from lldbtest import *
 
@@ -318,10 +319,3 @@ class CommandLineCompletionTestCase(Test
                 else:
                     self.expect(from_child, msg=COMPLETION_MSG(str_input, p), exe=False,
                         patterns = [p])
-
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/functionalities/conditional_break/TestConditionalBreak.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/conditional_break/TestConditionalBreak.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/functionalities/conditional_break/TestConditionalBreak.py (original)
+++ lldb/trunk/test/functionalities/conditional_break/TestConditionalBreak.py Thu Oct 22 15:06:20 2015
@@ -2,9 +2,10 @@
 Test conditionally break on a function and inspect its variables.
 """
 
+import lldb_shared
+
 import os, time
 import re
-import unittest2
 import lldb, lldbutil
 from lldbtest import *
 
@@ -128,11 +129,3 @@ class ConditionalBreakTestCase(TestBase)
         self.runCmd("frame select 1")
         self.expect("frame info", "The immediate caller should be a()",
             substrs = ["a.out`a"])
-
-
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/functionalities/data-formatter/boolreference/TestFormattersBoolRefPtr.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/data-formatter/boolreference/TestFormattersBoolRefPtr.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/functionalities/data-formatter/boolreference/TestFormattersBoolRefPtr.py (original)
+++ lldb/trunk/test/functionalities/data-formatter/boolreference/TestFormattersBoolRefPtr.py Thu Oct 22 15:06:20 2015
@@ -2,8 +2,9 @@
 Test lldb data formatter subsystem.
 """
 
+import lldb_shared
+
 import os, time
-import unittest2
 import lldb
 from lldbtest import *
 import datetime
@@ -67,10 +68,3 @@ class DataFormatterBoolRefPtr(TestBase):
                     substrs = ['YES'])
         self.expect('frame variable no',
                     substrs = ['NO'])
-
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/functionalities/data-formatter/compactvectors/TestCompactVectors.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/data-formatter/compactvectors/TestCompactVectors.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/functionalities/data-formatter/compactvectors/TestCompactVectors.py (original)
+++ lldb/trunk/test/functionalities/data-formatter/compactvectors/TestCompactVectors.py Thu Oct 22 15:06:20 2015
@@ -2,8 +2,9 @@
 Test lldb data formatter subsystem.
 """
 
+import lldb_shared
+
 import os, time
-import unittest2
 import lldb
 from lldbtest import *
 import lldbutil
@@ -53,9 +54,3 @@ class CompactVectorsFormattingTestCase(T
                        '(vSInt16) valueS16 = (1, 0, 4, 0, 0, 1, 0, 4)',
                        '(vSInt32) valueS32 = (4, 3, 2, 1)',
                        '(vBool32) valueBool32 = (0, 1, 0, 1)'])
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/functionalities/data-formatter/data-formatter-advanced/TestDataFormatterAdv.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/data-formatter/data-formatter-advanced/TestDataFormatterAdv.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/functionalities/data-formatter/data-formatter-advanced/TestDataFormatterAdv.py (original)
+++ lldb/trunk/test/functionalities/data-formatter/data-formatter-advanced/TestDataFormatterAdv.py Thu Oct 22 15:06:20 2015
@@ -2,8 +2,9 @@
 Test lldb data formatter subsystem.
 """
 
+import lldb_shared
+
 import os, time
-import unittest2
 import lldb
 from lldbtest import *
 import lldbutil
@@ -280,10 +281,3 @@ class AdvDataFormatterTestCase(TestBase)
                                'o_2'])
         self.expect('frame variable a_long_guy --show-all-children', matching=False,
                     substrs = ['...'])
-
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/functionalities/data-formatter/data-formatter-categories/TestDataFormatterCategories.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/data-formatter/data-formatter-categories/TestDataFormatterCategories.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/functionalities/data-formatter/data-formatter-categories/TestDataFormatterCategories.py (original)
+++ lldb/trunk/test/functionalities/data-formatter/data-formatter-categories/TestDataFormatterCategories.py Thu Oct 22 15:06:20 2015
@@ -2,8 +2,9 @@
 Test lldb data formatter subsystem.
 """
 
+import lldb_shared
+
 import os, time
-import unittest2
 import lldb
 from lldbtest import *
 import lldbutil
@@ -321,9 +322,3 @@ class CategoriesDataFormatterTestCase(Te
         self.expect('frame variable r2',
                     substrs = ['w = 9',
                                'h = 16'])
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/functionalities/data-formatter/data-formatter-cpp/TestDataFormatterCpp.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/data-formatter/data-formatter-cpp/TestDataFormatterCpp.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/functionalities/data-formatter/data-formatter-cpp/TestDataFormatterCpp.py (original)
+++ lldb/trunk/test/functionalities/data-formatter/data-formatter-cpp/TestDataFormatterCpp.py Thu Oct 22 15:06:20 2015
@@ -2,8 +2,9 @@
 Test lldb data formatter subsystem.
 """
 
+import lldb_shared
+
 import os, time
-import unittest2
 import lldb
 from lldbtest import *
 import lldbutil
@@ -260,9 +261,3 @@ class CppDataFormatterTestCase(TestBase)
         self.expect("frame variable iAmInt --format hex", substrs = ['(int) iAmInt = 0x00000001'])
         self.expect("frame variable iAmInt", matching=False, substrs = ['(int) iAmInt = 0x00000001'])
         self.expect("frame variable iAmInt", substrs = ['(int) iAmInt = 1'])
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/functionalities/data-formatter/data-formatter-disabling/TestDataFormatterDisabling.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/data-formatter/data-formatter-disabling/TestDataFormatterDisabling.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/functionalities/data-formatter/data-formatter-disabling/TestDataFormatterDisabling.py (original)
+++ lldb/trunk/test/functionalities/data-formatter/data-formatter-disabling/TestDataFormatterDisabling.py Thu Oct 22 15:06:20 2015
@@ -2,8 +2,9 @@
 Test lldb data formatter subsystem.
 """
 
+import lldb_shared
+
 import os, time
-import unittest2
 import lldb
 from lldbtest import *
 import lldbutil
@@ -75,10 +76,3 @@ class DataFormatterDisablingTestCase(Tes
         # last check - our cleanup will re-enable everything
         self.runCmd('type category disable *')
         self.expect('type category list', substrs = ['system','disabled'])
-
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/functionalities/data-formatter/data-formatter-enum-format/TestDataFormatterEnumFormat.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/data-formatter/data-formatter-enum-format/TestDataFormatterEnumFormat.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/functionalities/data-formatter/data-formatter-enum-format/TestDataFormatterEnumFormat.py (original)
+++ lldb/trunk/test/functionalities/data-formatter/data-formatter-enum-format/TestDataFormatterEnumFormat.py Thu Oct 22 15:06:20 2015
@@ -2,8 +2,9 @@
 Test lldb data formatter subsystem.
 """
 
+import lldb_shared
+
 import os, time
-import unittest2
 import lldb
 from lldbtest import *
 import lldbutil
@@ -60,9 +61,3 @@ class EnumFormatTestCase(TestBase):
             '(int) y = Case45',
             '(int) z = 43'
 	                        ]);
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/functionalities/data-formatter/data-formatter-globals/TestDataFormatterGlobals.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/data-formatter/data-formatter-globals/TestDataFormatterGlobals.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/functionalities/data-formatter/data-formatter-globals/TestDataFormatterGlobals.py (original)
+++ lldb/trunk/test/functionalities/data-formatter/data-formatter-globals/TestDataFormatterGlobals.py Thu Oct 22 15:06:20 2015
@@ -2,8 +2,9 @@
 Test lldb data formatter subsystem.
 """
 
+import lldb_shared
+
 import os, time
-import unittest2
 import lldb
 from lldbtest import *
 import lldbutil
@@ -62,10 +63,3 @@ class GlobalsDataFormatterTestCase(TestB
         
         self.expect("target variable g_point_pointer",
                     substrs = ['(Point *) g_point_pointer ='])
-
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/functionalities/data-formatter/data-formatter-named-summaries/TestDataFormatterNamedSummaries.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/data-formatter/data-formatter-named-summaries/TestDataFormatterNamedSummaries.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/functionalities/data-formatter/data-formatter-named-summaries/TestDataFormatterNamedSummaries.py (original)
+++ lldb/trunk/test/functionalities/data-formatter/data-formatter-named-summaries/TestDataFormatterNamedSummaries.py Thu Oct 22 15:06:20 2015
@@ -2,8 +2,9 @@
 Test lldb data formatter subsystem.
 """
 
+import lldb_shared
+
 import os, time
-import unittest2
 import lldb
 from lldbtest import *
 import lldbutil
@@ -117,10 +118,3 @@ class NamedSummariesDataFormatterTestCas
         self.expect("frame variable first",matching=False,
             substrs = ['FirstAndFriends: x=12',
                        'y=34'])
-
-                    
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/functionalities/data-formatter/data-formatter-objc/TestDataFormatterObjC.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/data-formatter/data-formatter-objc/TestDataFormatterObjC.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/functionalities/data-formatter/data-formatter-objc/TestDataFormatterObjC.py (original)
+++ lldb/trunk/test/functionalities/data-formatter/data-formatter-objc/TestDataFormatterObjC.py Thu Oct 22 15:06:20 2015
@@ -3,8 +3,9 @@
 Test lldb data formatter subsystem.
 """
 
+import lldb_shared
+
 import os, time
-import unittest2
 import lldb
 from lldbtest import *
 import datetime
@@ -459,9 +460,3 @@ class ObjCDataFormatterTestCase(TestBase
 
         self.runCmd("continue")
         self.expect("frame variable _cmd",substrs = ['setAtoms:'])
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/functionalities/data-formatter/data-formatter-objc/nsstring/TestDataFormatterNSString.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/data-formatter/data-formatter-objc/nsstring/TestDataFormatterNSString.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/functionalities/data-formatter/data-formatter-objc/nsstring/TestDataFormatterNSString.py (original)
+++ lldb/trunk/test/functionalities/data-formatter/data-formatter-objc/nsstring/TestDataFormatterNSString.py Thu Oct 22 15:06:20 2015
@@ -3,8 +3,9 @@
 Test lldb data formatter subsystem.
 """
 
+import lldb_shared
+
 import os, time
-import unittest2
 import lldb
 from lldbtest import *
 import datetime
@@ -102,10 +103,3 @@ class NSStringDataFormatterTestCase(Test
         self.expect('po strwithNULs2', substrs=['a very much boring task to write'])
         self.expect('expr [strwithNULs2 length]', substrs=['52'])
         self.expect('frame variable strwithNULs2', substrs=['@"a very much boring task to write\\0a string this way!!'])
-
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/functionalities/data-formatter/data-formatter-proper-plurals/TestFormattersOneIsSingular.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/data-formatter/data-formatter-proper-plurals/TestFormattersOneIsSingular.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/functionalities/data-formatter/data-formatter-proper-plurals/TestFormattersOneIsSingular.py (original)
+++ lldb/trunk/test/functionalities/data-formatter/data-formatter-proper-plurals/TestFormattersOneIsSingular.py Thu Oct 22 15:06:20 2015
@@ -2,8 +2,9 @@
 Test lldb data formatter subsystem.
 """
 
+import lldb_shared
+
 import os, time
-import unittest2
 import lldb
 from lldbtest import *
 import datetime
@@ -85,10 +86,3 @@ class DataFormatterOneIsSingularTestCase
                     substrs = ['1 byte'])
         self.expect('frame variable immutableData', matching=False,
                     substrs = ['1 bytes'])
-
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/functionalities/data-formatter/data-formatter-ptr-to-array/TestPtrToArrayFormatting.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/data-formatter/data-formatter-ptr-to-array/TestPtrToArrayFormatting.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/functionalities/data-formatter/data-formatter-ptr-to-array/TestPtrToArrayFormatting.py (original)
+++ lldb/trunk/test/functionalities/data-formatter/data-formatter-ptr-to-array/TestPtrToArrayFormatting.py Thu Oct 22 15:06:20 2015
@@ -2,8 +2,9 @@
 Test lldb data formatter subsystem.
 """
 
+import lldb_shared
+
 import os, time
-import unittest2
 import lldb
 from lldbtest import *
 import lldbutil
@@ -52,10 +53,3 @@ class PtrToArrayDataFormatterTestCase(Te
             substrs = ['01 00 00 00 02 00 00 00 03 00 00 00'])
         self.expect('p *(int (*)[3])foo', matching=False,
             substrs = ['0x000000030000000200000001'])
-
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/functionalities/data-formatter/data-formatter-python-synth/TestDataFormatterPythonSynth.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/data-formatter/data-formatter-python-synth/TestDataFormatterPythonSynth.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/functionalities/data-formatter/data-formatter-python-synth/TestDataFormatterPythonSynth.py (original)
+++ lldb/trunk/test/functionalities/data-formatter/data-formatter-python-synth/TestDataFormatterPythonSynth.py Thu Oct 22 15:06:20 2015
@@ -2,8 +2,9 @@
 Test lldb data formatter subsystem.
 """
 
+import lldb_shared
+
 import os, time
-import unittest2
 import lldb
 from lldbtest import *
 import lldbutil
@@ -247,10 +248,3 @@ class PythonSynthDataFormatterTestCase(T
         self.assertTrue(str_cast.find('T') != -1, 'could not find T in output')
         self.assertTrue(str_cast.find('F') != -1, 'could not find F in output')
         self.assertTrue(str_cast.find("4 = '\\0'") != -1, 'could not find item 4 == 0')
-
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/functionalities/data-formatter/data-formatter-script/TestDataFormatterScript.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/data-formatter/data-formatter-script/TestDataFormatterScript.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/functionalities/data-formatter/data-formatter-script/TestDataFormatterScript.py (original)
+++ lldb/trunk/test/functionalities/data-formatter/data-formatter-script/TestDataFormatterScript.py Thu Oct 22 15:06:20 2015
@@ -2,8 +2,9 @@
 Test lldb data formatter subsystem.
 """
 
+import lldb_shared
+
 import os, time
-import unittest2
 import lldb
 from lldbtest import *
 import lldbutil
@@ -165,10 +166,3 @@ class ScriptDataFormatterTestCase(TestBa
         
         self.expect("frame variable array",
                     substrs = ['Python summary'])
-
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/functionalities/data-formatter/data-formatter-skip-summary/TestDataFormatterSkipSummary.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/data-formatter/data-formatter-skip-summary/TestDataFormatterSkipSummary.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/functionalities/data-formatter/data-formatter-skip-summary/TestDataFormatterSkipSummary.py (original)
+++ lldb/trunk/test/functionalities/data-formatter/data-formatter-skip-summary/TestDataFormatterSkipSummary.py Thu Oct 22 15:06:20 2015
@@ -2,8 +2,9 @@
 Test lldb data formatter subsystem.
 """
 
+import lldb_shared
+
 import os, time
-import unittest2
 import lldb
 from lldbtest import *
 import lldbutil
@@ -170,10 +171,3 @@ class SkipSummaryDataFormatterTestCase(T
                     substrs = ['(DeepData_5) data2.m_child4.m_child2.m_child2 = {',
                                'm_some_text = "Just a test"',
                                '}'])
-
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/functionalities/data-formatter/data-formatter-smart-array/TestDataFormatterSmartArray.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/data-formatter/data-formatter-smart-array/TestDataFormatterSmartArray.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/functionalities/data-formatter/data-formatter-smart-array/TestDataFormatterSmartArray.py (original)
+++ lldb/trunk/test/functionalities/data-formatter/data-formatter-smart-array/TestDataFormatterSmartArray.py Thu Oct 22 15:06:20 2015
@@ -2,8 +2,9 @@
 Test lldb data formatter subsystem.
 """
 
+import lldb_shared
+
 import os, time
-import unittest2
 import lldb
 from lldbtest import *
 import lldbutil
@@ -343,10 +344,3 @@ class SmartArrayDataFormatterTestCase(Te
                     substrs = ['intarr = arr = ',
                                '09 00 00 00',
                                '....,07 00 00 00'])
-
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/functionalities/data-formatter/data-formatter-stl/libcxx/initializerlist/TestInitializerList.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/data-formatter/data-formatter-stl/libcxx/initializerlist/TestInitializerList.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/functionalities/data-formatter/data-formatter-stl/libcxx/initializerlist/TestInitializerList.py (original)
+++ lldb/trunk/test/functionalities/data-formatter/data-formatter-stl/libcxx/initializerlist/TestInitializerList.py Thu Oct 22 15:06:20 2015
@@ -2,8 +2,9 @@
 Test lldb data formatter subsystem.
 """
 
+import lldb_shared
+
 import os, time
-import unittest2
 import lldb
 from lldbtest import *
 import lldbutil
@@ -35,9 +36,3 @@ class InitializerListTestCase(TestBase):
         self.expect("frame variable ils", substrs = ['[4] = "surprise it is a long string!! yay!!"'])
 
         self.expect('image list', substrs = self.getLibcPlusPlusLibs())
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/functionalities/data-formatter/data-formatter-stl/libcxx/iterator/TestDataFormatterLibccIterator.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/data-formatter/data-formatter-stl/libcxx/iterator/TestDataFormatterLibccIterator.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/functionalities/data-formatter/data-formatter-stl/libcxx/iterator/TestDataFormatterLibccIterator.py (original)
+++ lldb/trunk/test/functionalities/data-formatter/data-formatter-stl/libcxx/iterator/TestDataFormatterLibccIterator.py Thu Oct 22 15:06:20 2015
@@ -2,8 +2,9 @@
 Test lldb data formatter subsystem.
 """
 
+import lldb_shared
+
 import os, time
-import unittest2
 import lldb
 from lldbtest import *
 import lldbutil
@@ -61,9 +62,3 @@ class LibcxxIteratorDataFormatterTestCas
 
         self.expect('frame variable svI', substrs = ['item = "hello"'])
         self.expect('expr svI', substrs = ['item = "hello"'])
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/functionalities/data-formatter/data-formatter-stl/libcxx/list/TestDataFormatterLibcxxList.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/data-formatter/data-formatter-stl/libcxx/list/TestDataFormatterLibcxxList.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/functionalities/data-formatter/data-formatter-stl/libcxx/list/TestDataFormatterLibcxxList.py (original)
+++ lldb/trunk/test/functionalities/data-formatter/data-formatter-stl/libcxx/list/TestDataFormatterLibcxxList.py Thu Oct 22 15:06:20 2015
@@ -2,8 +2,9 @@
 Test lldb data formatter subsystem.
 """
 
+import lldb_shared
+
 import os, time, re
-import unittest2
 import lldb
 from lldbtest import *
 import lldbutil
@@ -181,9 +182,3 @@ class LibcxxListDataFormatterTestCase(Te
 
         self.assertTrue(countingList.GetChildAtIndex(0).GetValueAsUnsigned(0) == 3141, "uniqued list[0] == 3141")
         self.assertTrue(countingList.GetChildAtIndex(1).GetValueAsUnsigned(0) == 3142, "uniqued list[1] == 3142")
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/functionalities/data-formatter/data-formatter-stl/libcxx/list/loop/TestDataFormatterLibcxxListLoop.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/data-formatter/data-formatter-stl/libcxx/list/loop/TestDataFormatterLibcxxListLoop.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/functionalities/data-formatter/data-formatter-stl/libcxx/list/loop/TestDataFormatterLibcxxListLoop.py (original)
+++ lldb/trunk/test/functionalities/data-formatter/data-formatter-stl/libcxx/list/loop/TestDataFormatterLibcxxListLoop.py Thu Oct 22 15:06:20 2015
@@ -3,8 +3,9 @@ Test that the debugger handles loops in
 corruption).
 """
 
+import lldb_shared
+
 import os, time, re
-import unittest2
 import lldb
 from lldbtest import *
 import lldbutil
@@ -48,9 +49,3 @@ class LibcxxListDataFormatterTestCase(Te
         # Run to completion.
         process.Continue()
         self.assertEqual(process.GetState(), lldb.eStateExited, PROCESS_EXITED)
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/functionalities/data-formatter/data-formatter-stl/libcxx/map/TestDataFormatterLibccMap.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/data-formatter/data-formatter-stl/libcxx/map/TestDataFormatterLibccMap.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/functionalities/data-formatter/data-formatter-stl/libcxx/map/TestDataFormatterLibccMap.py (original)
+++ lldb/trunk/test/functionalities/data-formatter/data-formatter-stl/libcxx/map/TestDataFormatterLibccMap.py Thu Oct 22 15:06:20 2015
@@ -2,8 +2,9 @@
 Test lldb data formatter subsystem.
 """
 
+import lldb_shared
+
 import os, time
-import unittest2
 import lldb
 from lldbtest import *
 import lldbutil
@@ -293,9 +294,3 @@ class LibcxxMapDataFormatterTestCase(Tes
         self.expect('frame variable ss',
                     substrs = ['size=0',
                                '{}'])
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/functionalities/data-formatter/data-formatter-stl/libcxx/multimap/TestDataFormatterLibccMultiMap.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/data-formatter/data-formatter-stl/libcxx/multimap/TestDataFormatterLibccMultiMap.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/functionalities/data-formatter/data-formatter-stl/libcxx/multimap/TestDataFormatterLibccMultiMap.py (original)
+++ lldb/trunk/test/functionalities/data-formatter/data-formatter-stl/libcxx/multimap/TestDataFormatterLibccMultiMap.py Thu Oct 22 15:06:20 2015
@@ -2,8 +2,9 @@
 Test lldb data formatter subsystem.
 """
 
+import lldb_shared
+
 import os, time
-import unittest2
 import lldb
 from lldbtest import *
 import lldbutil
@@ -293,9 +294,3 @@ class LibcxxMultiMapDataFormatterTestCas
         self.expect('frame variable ss',
                     substrs = ['size=0',
                                '{}'])
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/functionalities/data-formatter/data-formatter-stl/libcxx/multiset/TestDataFormatterLibcxxMultiSet.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/data-formatter/data-formatter-stl/libcxx/multiset/TestDataFormatterLibcxxMultiSet.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/functionalities/data-formatter/data-formatter-stl/libcxx/multiset/TestDataFormatterLibcxxMultiSet.py (original)
+++ lldb/trunk/test/functionalities/data-formatter/data-formatter-stl/libcxx/multiset/TestDataFormatterLibcxxMultiSet.py Thu Oct 22 15:06:20 2015
@@ -2,8 +2,9 @@
 Test lldb data formatter subsystem.
 """
 
+import lldb_shared
+
 import os, time
-import unittest2
 import lldb
 from lldbtest import *
 import lldbutil
@@ -64,9 +65,3 @@ class LibcxxMultiSetDataFormatterTestCas
         self.expect("frame variable ss[2]",substrs = [' = "b"'])
         lldbutil.continue_to_breakpoint(self.process(), bkpt)
         self.expect("frame variable ss",substrs = ["size=3",'[0] = "a"','[1] = "a very long string is right here"','[2] = "c"'])
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/functionalities/data-formatter/data-formatter-stl/libcxx/set/TestDataFormatterLibcxxSet.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/data-formatter/data-formatter-stl/libcxx/set/TestDataFormatterLibcxxSet.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/functionalities/data-formatter/data-formatter-stl/libcxx/set/TestDataFormatterLibcxxSet.py (original)
+++ lldb/trunk/test/functionalities/data-formatter/data-formatter-stl/libcxx/set/TestDataFormatterLibcxxSet.py Thu Oct 22 15:06:20 2015
@@ -2,8 +2,9 @@
 Test lldb data formatter subsystem.
 """
 
+import lldb_shared
+
 import os, time
-import unittest2
 import lldb
 from lldbtest import *
 import lldbutil
@@ -64,9 +65,3 @@ class LibcxxSetDataFormatterTestCase(Tes
         self.expect("frame variable ss[2]",substrs = [' = "b"'])
         lldbutil.continue_to_breakpoint(self.process(), bkpt)
         self.expect("frame variable ss",substrs = ["size=3",'[0] = "a"','[1] = "a very long string is right here"','[2] = "c"'])
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/functionalities/data-formatter/data-formatter-stl/libcxx/string/TestDataFormatterLibcxxString.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/data-formatter/data-formatter-stl/libcxx/string/TestDataFormatterLibcxxString.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/functionalities/data-formatter/data-formatter-stl/libcxx/string/TestDataFormatterLibcxxString.py (original)
+++ lldb/trunk/test/functionalities/data-formatter/data-formatter-stl/libcxx/string/TestDataFormatterLibcxxString.py Thu Oct 22 15:06:20 2015
@@ -3,8 +3,9 @@
 Test lldb data formatter subsystem.
 """
 
+import lldb_shared
+
 import os, time
-import unittest2
 import lldb
 from lldbtest import *
 import lldbutil
@@ -81,9 +82,3 @@ class LibcxxStringDataFormatterTestCase(
                     '(std::__1::string) Q = "quite a long std::strin with lots of info inside it"',
                     '(std::__1::string) IHaveEmbeddedZeros = "a\\0b\\0c\\0d"',
                     '(std::__1::wstring) IHaveEmbeddedZerosToo = L"hello world!\\0てざ ル゜䋨ミ㠧槊 きゅへ狦穤襩 じゃ馩リョ 䤦監"'])
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/functionalities/data-formatter/data-formatter-stl/libcxx/unordered/TestDataFormatterUnordered.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/data-formatter/data-formatter-stl/libcxx/unordered/TestDataFormatterUnordered.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/functionalities/data-formatter/data-formatter-stl/libcxx/unordered/TestDataFormatterUnordered.py (original)
+++ lldb/trunk/test/functionalities/data-formatter/data-formatter-stl/libcxx/unordered/TestDataFormatterUnordered.py Thu Oct 22 15:06:20 2015
@@ -2,8 +2,9 @@
 Test lldb data formatter subsystem.
 """
 
+import lldb_shared
+
 import os, time
-import unittest2
 import lldb
 from lldbtest import *
 import lldbutil
@@ -70,9 +71,3 @@ class LibcxxUnorderedDataFormatterTestCa
     def look_for_content_and_continue(self, var_name, patterns):
         self.expect( ("frame variable %s" % var_name), patterns=patterns)
         self.runCmd("continue")
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/functionalities/data-formatter/data-formatter-stl/libcxx/vbool/TestDataFormatterLibcxxVBool.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/data-formatter/data-formatter-stl/libcxx/vbool/TestDataFormatterLibcxxVBool.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/functionalities/data-formatter/data-formatter-stl/libcxx/vbool/TestDataFormatterLibcxxVBool.py (original)
+++ lldb/trunk/test/functionalities/data-formatter/data-formatter-stl/libcxx/vbool/TestDataFormatterLibcxxVBool.py Thu Oct 22 15:06:20 2015
@@ -2,8 +2,9 @@
 Test lldb data formatter subsystem.
 """
 
+import lldb_shared
+
 import os, time
-import unittest2
 import lldb
 from lldbtest import *
 import lldbutil
@@ -53,9 +54,3 @@ class LibcxxVBoolDataFormatterTestCase(T
 
         self.expect("expr vBool",
             substrs = ['size=49','[0] = false','[1] = true','[18] = false','[27] = true','[36] = false','[47] = true','[48] = true'])
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/functionalities/data-formatter/data-formatter-stl/libcxx/vector/TestDataFormatterLibcxxVector.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/data-formatter/data-formatter-stl/libcxx/vector/TestDataFormatterLibcxxVector.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/functionalities/data-formatter/data-formatter-stl/libcxx/vector/TestDataFormatterLibcxxVector.py (original)
+++ lldb/trunk/test/functionalities/data-formatter/data-formatter-stl/libcxx/vector/TestDataFormatterLibcxxVector.py Thu Oct 22 15:06:20 2015
@@ -2,8 +2,9 @@
 Test lldb data formatter subsystem.
 """
 
+import lldb_shared
+
 import os, time
-import unittest2
 import lldb
 from lldbtest import *
 import lldbutil
@@ -175,9 +176,3 @@ class LibcxxVectorDataFormatterTestCase(
 
         self.expect("frame variable strings",
             substrs = ['vector has 0 items'])
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/iterator/TestDataFormatterStdIterator.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/iterator/TestDataFormatterStdIterator.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/iterator/TestDataFormatterStdIterator.py (original)
+++ lldb/trunk/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/iterator/TestDataFormatterStdIterator.py Thu Oct 22 15:06:20 2015
@@ -2,8 +2,9 @@
 Test lldb data formatter subsystem.
 """
 
+import lldb_shared
+
 import os, time
-import unittest2
 import lldb
 from lldbtest import *
 import lldbutil
@@ -58,9 +59,3 @@ class StdIteratorDataFormatterTestCase(T
 
         self.expect('frame variable svI', substrs = ['item = "hello"'])
         self.expect('expr svI', substrs = ['item = "hello"'])
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/list/TestDataFormatterStdList.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/list/TestDataFormatterStdList.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/list/TestDataFormatterStdList.py (original)
+++ lldb/trunk/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/list/TestDataFormatterStdList.py Thu Oct 22 15:06:20 2015
@@ -2,8 +2,9 @@
 Test lldb data formatter subsystem.
 """
 
+import lldb_shared
+
 import os, time
-import unittest2
 import lldb
 from lldbtest import *
 import lldbutil
@@ -184,9 +185,3 @@ class StdListDataFormatterTestCase(TestB
 
         # check that MightHaveChildren() gets it right
         self.assertTrue(self.frame().FindVariable("text_list").MightHaveChildren(), "text_list.MightHaveChildren() says False for non empty!")
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/map/TestDataFormatterStdMap.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/map/TestDataFormatterStdMap.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/map/TestDataFormatterStdMap.py (original)
+++ lldb/trunk/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/map/TestDataFormatterStdMap.py Thu Oct 22 15:06:20 2015
@@ -2,8 +2,9 @@
 Test lldb data formatter subsystem.
 """
 
+import lldb_shared
+
 import os, time
-import unittest2
 import lldb
 from lldbtest import *
 import lldbutil
@@ -317,9 +318,3 @@ class StdMapDataFormatterTestCase(TestBa
         self.expect('frame variable ss',
                     substrs = ['map has 0 items',
                                '{}'])
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/string/TestDataFormatterStdString.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/string/TestDataFormatterStdString.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/string/TestDataFormatterStdString.py (original)
+++ lldb/trunk/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/string/TestDataFormatterStdString.py Thu Oct 22 15:06:20 2015
@@ -3,8 +3,9 @@
 Test lldb data formatter subsystem.
 """
 
+import lldb_shared
+
 import os, time
-import unittest2
 import lldb
 from lldbtest import *
 import lldbutil
@@ -62,9 +63,3 @@ class StdStringDataFormatterTestCase(Tes
         self.runCmd("next")
 
         self.assertTrue(var_S.GetSummary() == 'L"!!!!!"', "new S summary wrong")
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/vbool/TestDataFormatterStdVBool.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/vbool/TestDataFormatterStdVBool.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/vbool/TestDataFormatterStdVBool.py (original)
+++ lldb/trunk/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/vbool/TestDataFormatterStdVBool.py Thu Oct 22 15:06:20 2015
@@ -2,8 +2,9 @@
 Test lldb data formatter subsystem.
 """
 
+import lldb_shared
+
 import os, time
-import unittest2
 import lldb
 from lldbtest import *
 import lldbutil
@@ -53,9 +54,3 @@ class StdVBoolDataFormatterTestCase(Test
 
         self.expect("expr vBool",
             substrs = ['size=49','[0] = false','[1] = true','[18] = false','[27] = true','[36] = false','[47] = true','[48] = true'])
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/vector/TestDataFormatterStdVector.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/vector/TestDataFormatterStdVector.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/vector/TestDataFormatterStdVector.py (original)
+++ lldb/trunk/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/vector/TestDataFormatterStdVector.py Thu Oct 22 15:06:20 2015
@@ -2,8 +2,9 @@
 Test lldb data formatter subsystem.
 """
 
+import lldb_shared
+
 import os, time
-import unittest2
 import lldb
 from lldbtest import *
 import lldbutil
@@ -202,9 +203,3 @@ class StdVectorDataFormatterTestCase(Tes
 
         self.expect("frame variable strings",
             substrs = ['vector has 0 items'])
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/functionalities/data-formatter/data-formatter-synth/TestDataFormatterSynth.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/data-formatter/data-formatter-synth/TestDataFormatterSynth.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/functionalities/data-formatter/data-formatter-synth/TestDataFormatterSynth.py (original)
+++ lldb/trunk/test/functionalities/data-formatter/data-formatter-synth/TestDataFormatterSynth.py Thu Oct 22 15:06:20 2015
@@ -2,8 +2,9 @@
 Test lldb data formatter subsystem.
 """
 
+import lldb_shared
+
 import os, time
-import unittest2
 import lldb
 from lldbtest import *
 import lldbutil
@@ -201,10 +202,3 @@ class SynthDataFormatterTestCase(TestBas
         self.runCmd('type summary add -e -h -s "I am really empty" EmptyStruct')
         self.expect('frame variable es', substrs = ["I am really empty"])
         self.expect('frame variable es', substrs = ["I am really empty {}"], matching=False)
-
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/functionalities/data-formatter/data-formatter-synthval/TestDataFormatterSynthVal.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/data-formatter/data-formatter-synthval/TestDataFormatterSynthVal.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/functionalities/data-formatter/data-formatter-synthval/TestDataFormatterSynthVal.py (original)
+++ lldb/trunk/test/functionalities/data-formatter/data-formatter-synthval/TestDataFormatterSynthVal.py Thu Oct 22 15:06:20 2015
@@ -2,8 +2,9 @@
 Test lldb data formatter subsystem.
 """
 
+import lldb_shared
+
 import os, time
-import unittest2
 import lldb
 from lldbtest import *
 import lldbutil
@@ -91,9 +92,3 @@ class DataFormatterSynthValueTestCase(Te
         self.assertEqual(ma.GetNumChildren(15), 15)
         self.assertEqual(ma.GetNumChildren(16), 16)
         self.assertEqual(ma.GetNumChildren(17), 16)
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/functionalities/data-formatter/format-propagation/TestFormatPropagation.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/data-formatter/format-propagation/TestFormatPropagation.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/functionalities/data-formatter/format-propagation/TestFormatPropagation.py (original)
+++ lldb/trunk/test/functionalities/data-formatter/format-propagation/TestFormatPropagation.py Thu Oct 22 15:06:20 2015
@@ -2,8 +2,9 @@
 Check if changing Format on an SBValue correctly propagates that new format to children as it should
 """
 
+import lldb_shared
+
 import os, time
-import unittest2
 import lldb
 from lldbtest import *
 import lldbutil
@@ -70,9 +71,3 @@ class FormatPropagationTestCase(TestBase
         Y.SetFormat(lldb.eFormatDefault)
         self.assertTrue(X.GetValue() == "0x00000004", "X is not hex as it asked")
         self.assertTrue(Y.GetValue() == "2", "Y is not defaulted")
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/functionalities/data-formatter/frameformat_smallstruct/TestFrameFormatSmallStruct.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/data-formatter/frameformat_smallstruct/TestFrameFormatSmallStruct.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/functionalities/data-formatter/frameformat_smallstruct/TestFrameFormatSmallStruct.py (original)
+++ lldb/trunk/test/functionalities/data-formatter/frameformat_smallstruct/TestFrameFormatSmallStruct.py Thu Oct 22 15:06:20 2015
@@ -2,8 +2,9 @@
 Test that the user can input a format but it will not prevail over summary format's choices.
 """
 
+import lldb_shared
+
 import os, time
-import unittest2
 import lldb
 from lldbtest import *
 import lldbutil
@@ -33,9 +34,3 @@ class FrameFormatSmallStructTestCase(Tes
                        'stop reason = breakpoint'])
 
         self.expect("thread list", substrs = ['addPair(p=(x = 3, y = -3))'])
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/functionalities/data-formatter/hexcaps/TestDataFormatterHexCaps.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/data-formatter/hexcaps/TestDataFormatterHexCaps.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/functionalities/data-formatter/hexcaps/TestDataFormatterHexCaps.py (original)
+++ lldb/trunk/test/functionalities/data-formatter/hexcaps/TestDataFormatterHexCaps.py Thu Oct 22 15:06:20 2015
@@ -2,8 +2,9 @@
 Test lldb data formatter subsystem.
 """
 
+import lldb_shared
+
 import os, time
-import unittest2
 import lldb
 from lldbtest import *
 import lldbutil
@@ -77,10 +78,3 @@ class DataFormatterHexCapsTestCase(TestB
         self.runCmd("type summary add -s \"${var.first%X} and ${var.second%X}\" foo")
         self.expect('frame variable mine',
                     substrs = ['(foo) mine = 0xAABBCCDD and 0xFF00FF00'])
-
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/functionalities/data-formatter/nsarraysynth/TestNSArraySynthetic.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/data-formatter/nsarraysynth/TestNSArraySynthetic.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/functionalities/data-formatter/nsarraysynth/TestNSArraySynthetic.py (original)
+++ lldb/trunk/test/functionalities/data-formatter/nsarraysynth/TestNSArraySynthetic.py Thu Oct 22 15:06:20 2015
@@ -2,8 +2,9 @@
 Test lldb data formatter subsystem.
 """
 
+import lldb_shared
+
 import os, time
-import unittest2
 import lldb
 from lldbtest import *
 import datetime
@@ -62,10 +63,3 @@ class NSArraySyntheticTestCase(TestBase)
 
         self.assertTrue(self.frame().FindVariable("arr").MightHaveChildren(), "arr says it does not have children!")
         self.assertTrue(self.frame().FindVariable("other_arr").MightHaveChildren(), "arr says it does not have children!")
-
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/functionalities/data-formatter/nsdictionarysynth/TestNSDictionarySynthetic.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/data-formatter/nsdictionarysynth/TestNSDictionarySynthetic.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/functionalities/data-formatter/nsdictionarysynth/TestNSDictionarySynthetic.py (original)
+++ lldb/trunk/test/functionalities/data-formatter/nsdictionarysynth/TestNSDictionarySynthetic.py Thu Oct 22 15:06:20 2015
@@ -2,8 +2,9 @@
 Test lldb data formatter subsystem.
 """
 
+import lldb_shared
+
 import os, time
-import unittest2
 import lldb
 from lldbtest import *
 import datetime
@@ -64,10 +65,3 @@ class NSDictionarySyntheticTestCase(Test
 
         self.assertTrue(self.frame().FindVariable("dictionary").MightHaveChildren(), "dictionary says it does not have children!")
         self.assertTrue(self.frame().FindVariable("mutabledict").MightHaveChildren(), "mutable says it does not have children!")
-
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/functionalities/data-formatter/nssetsynth/TestNSSetSynthetic.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/data-formatter/nssetsynth/TestNSSetSynthetic.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/functionalities/data-formatter/nssetsynth/TestNSSetSynthetic.py (original)
+++ lldb/trunk/test/functionalities/data-formatter/nssetsynth/TestNSSetSynthetic.py Thu Oct 22 15:06:20 2015
@@ -2,8 +2,9 @@
 Test lldb data formatter subsystem.
 """
 
+import lldb_shared
+
 import os, time
-import unittest2
 import lldb
 from lldbtest import *
 import datetime
@@ -69,9 +70,3 @@ class NSSetSyntheticTestCase(TestBase):
                     substrs = ['4 elements'])
         self.expect('frame variable mutable --ptr-depth 1 -d run -T',
                     substrs = ['4 elements','[0]','[1]','[2]','[3]','hello','world','(int)1','(int)2'])
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/functionalities/data-formatter/ostypeformatting/TestFormattersOsType.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/data-formatter/ostypeformatting/TestFormattersOsType.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/functionalities/data-formatter/ostypeformatting/TestFormattersOsType.py (original)
+++ lldb/trunk/test/functionalities/data-formatter/ostypeformatting/TestFormattersOsType.py Thu Oct 22 15:06:20 2015
@@ -2,8 +2,9 @@
 Test lldb data formatter subsystem.
 """
 
+import lldb_shared
+
 import os, time
-import unittest2
 import lldb
 from lldbtest import *
 import datetime
@@ -47,10 +48,3 @@ class DataFormatterOSTypeTestCase(TestBa
         # Now check that we use the right summary for OSType
         self.expect('frame variable',
                     substrs = ["'test'","'best'"])
-
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/functionalities/data-formatter/ptr_ref_typedef/TestPtrRef2Typedef.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/data-formatter/ptr_ref_typedef/TestPtrRef2Typedef.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/functionalities/data-formatter/ptr_ref_typedef/TestPtrRef2Typedef.py (original)
+++ lldb/trunk/test/functionalities/data-formatter/ptr_ref_typedef/TestPtrRef2Typedef.py Thu Oct 22 15:06:20 2015
@@ -2,8 +2,9 @@
 Test lldb data formatter subsystem.
 """
 
+import lldb_shared
+
 import os, time
-import unittest2
 import lldb
 from lldbtest import *
 import lldbutil
@@ -52,9 +53,3 @@ class PtrRef2TypedefTestCase(TestBase):
         # the match.
         self.expect("frame variable y", substrs = ['(Foo &', ') y = 0x','IntLRef'])
         self.expect("frame variable z", substrs = ['(Foo &&', ') z = 0x','IntRRef'])
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/functionalities/data-formatter/refpointer-recursion/TestDataFormatterRefPtrRecursion.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/data-formatter/refpointer-recursion/TestDataFormatterRefPtrRecursion.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/functionalities/data-formatter/refpointer-recursion/TestDataFormatterRefPtrRecursion.py (original)
+++ lldb/trunk/test/functionalities/data-formatter/refpointer-recursion/TestDataFormatterRefPtrRecursion.py Thu Oct 22 15:06:20 2015
@@ -2,8 +2,9 @@
 Test that ValueObjectPrinter does not cause an infinite loop when a reference to a struct that contains a pointer to itself is printed.
 """
 
+import lldb_shared
+
 import os, time
-import unittest2
 import lldb
 from lldbtest import *
 import lldbutil
@@ -36,9 +37,3 @@ class DataFormatterRefPtrRecursionTestCa
         self.expect("frame variable foo --ptr-depth=1", substrs = ['ID = 1']);
         self.expect("frame variable foo --ptr-depth=2", substrs = ['ID = 1']);
         self.expect("frame variable foo --ptr-depth=3", substrs = ['ID = 1']);
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/functionalities/data-formatter/summary-string-onfail/Test-rdar-9974002.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/data-formatter/summary-string-onfail/Test-rdar-9974002.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/functionalities/data-formatter/summary-string-onfail/Test-rdar-9974002.py (original)
+++ lldb/trunk/test/functionalities/data-formatter/summary-string-onfail/Test-rdar-9974002.py Thu Oct 22 15:06:20 2015
@@ -2,8 +2,9 @@
 Test lldb data formatter subsystem.
 """
 
+import lldb_shared
+
 import os, time
-import unittest2
 import lldb
 from lldbtest import *
 import lldbutil
@@ -128,10 +129,3 @@ class Radar9974002DataFormatterTestCase(
         self.expect('frame variable mine',
                     substrs = ['mine = ',
                                '1', '<parent is NULL>'])
-
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/functionalities/data-formatter/synthcapping/TestSyntheticCapping.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/data-formatter/synthcapping/TestSyntheticCapping.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/functionalities/data-formatter/synthcapping/TestSyntheticCapping.py (original)
+++ lldb/trunk/test/functionalities/data-formatter/synthcapping/TestSyntheticCapping.py Thu Oct 22 15:06:20 2015
@@ -2,8 +2,9 @@
 Check for an issue where capping does not work because the Target pointer appears to be changing behind our backs
 """
 
+import lldb_shared
+
 import os, time
-import unittest2
 import lldb
 from lldbtest import *
 import lldbutil
@@ -70,9 +71,3 @@ class SyntheticCappingTestCase(TestBase)
 
         self.expect("frame variable f00_1", matching=True,
                     substrs = ['r = 33']);
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/functionalities/data-formatter/synthupdate/TestSyntheticFilterRecompute.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/data-formatter/synthupdate/TestSyntheticFilterRecompute.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/functionalities/data-formatter/synthupdate/TestSyntheticFilterRecompute.py (original)
+++ lldb/trunk/test/functionalities/data-formatter/synthupdate/TestSyntheticFilterRecompute.py Thu Oct 22 15:06:20 2015
@@ -2,8 +2,9 @@
 Test lldb data formatter subsystem.
 """
 
+import lldb_shared
+
 import os, time
-import unittest2
 import lldb
 from lldbtest import *
 import datetime
@@ -69,10 +70,3 @@ class SyntheticFilterRecomputingTestCase
         self.assertFalse(id_x.GetNumChildren() == 7, "dictionary still looks synthetic")
         id_x.SetPreferSyntheticValue(True)
         self.assertTrue(id_x.GetSummary() == "7 key/value pairs", "dictionary does not get correct summary")
-
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/functionalities/data-formatter/user-format-vs-summary/TestUserFormatVsSummary.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/data-formatter/user-format-vs-summary/TestUserFormatVsSummary.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/functionalities/data-formatter/user-format-vs-summary/TestUserFormatVsSummary.py (original)
+++ lldb/trunk/test/functionalities/data-formatter/user-format-vs-summary/TestUserFormatVsSummary.py Thu Oct 22 15:06:20 2015
@@ -2,8 +2,9 @@
 Test that the user can input a format but it will not prevail over summary format's choices.
 """
 
+import lldb_shared
+
 import os, time
-import unittest2
 import lldb
 from lldbtest import *
 import lldbutil
@@ -54,9 +55,3 @@ class UserFormatVSSummaryTestCase(TestBa
 
         self.expect("frame variable p1", substrs = ['(Pair) p1 = x=0x00000003,y=4294967293']);
         self.expect("frame variable -f d p1", substrs = ['(Pair) p1 = x=3,y=-3'],matching=False);
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/functionalities/data-formatter/var-in-aggregate-misuse/TestVarInAggregateMisuse.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/data-formatter/var-in-aggregate-misuse/TestVarInAggregateMisuse.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/functionalities/data-formatter/var-in-aggregate-misuse/TestVarInAggregateMisuse.py (original)
+++ lldb/trunk/test/functionalities/data-formatter/var-in-aggregate-misuse/TestVarInAggregateMisuse.py Thu Oct 22 15:06:20 2015
@@ -2,8 +2,9 @@
 Test lldb data formatter subsystem.
 """
 
+import lldb_shared
+
 import os, time
-import unittest2
 import lldb
 from lldbtest import *
 import lldbutil
@@ -69,9 +70,3 @@ class VarInAggregateMisuseTestCase(TestB
                     substrs = ['(TwoSummarizes) twos = TwoSummarizes @ ',
                                'first = SUMMARY SUCCESS 1',
                                'second = SUMMARY SUCCESS 3'])
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/functionalities/data-formatter/varscript_formatting/TestDataFormatterVarScriptFormatting.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/data-formatter/varscript_formatting/TestDataFormatterVarScriptFormatting.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/functionalities/data-formatter/varscript_formatting/TestDataFormatterVarScriptFormatting.py (original)
+++ lldb/trunk/test/functionalities/data-formatter/varscript_formatting/TestDataFormatterVarScriptFormatting.py Thu Oct 22 15:06:20 2015
@@ -2,8 +2,9 @@
 Test lldb data formatter subsystem.
 """
 
+import lldb_shared
+
 import os, time
-import unittest2
 import lldb
 from lldbtest import *
 import lldbutil
@@ -51,9 +52,3 @@ class PythonSynthDataFormatterTestCase(T
         self.expect("frame variable x", substrs = ['T is a non-pointer type']);
             
         self.expect("frame variable y", substrs = ['T is a pointer type']);
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/functionalities/data-formatter/vector-types/TestVectorTypesFormatting.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/data-formatter/vector-types/TestVectorTypesFormatting.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/functionalities/data-formatter/vector-types/TestVectorTypesFormatting.py (original)
+++ lldb/trunk/test/functionalities/data-formatter/vector-types/TestVectorTypesFormatting.py Thu Oct 22 15:06:20 2015
@@ -2,8 +2,9 @@
 Check that vector types format properly
 """
 
+import lldb_shared
+
 import os, time
-import unittest2
 import lldb
 from lldbtest import *
 import lldbutil
@@ -68,9 +69,3 @@ class VectorTypesFormattingTestCase(Test
         v.SetFormat(lldb.eFormatVectorOfFloat32)
         oldValueAgain = v.GetChildAtIndex(0).GetValue()
         self.assertTrue(oldValue == oldValueAgain, "same format but different values")
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/functionalities/dead-strip/TestDeadStrip.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/dead-strip/TestDeadStrip.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/functionalities/dead-strip/TestDeadStrip.py (original)
+++ lldb/trunk/test/functionalities/dead-strip/TestDeadStrip.py Thu Oct 22 15:06:20 2015
@@ -2,8 +2,9 @@
 Test that breakpoint works correctly in the presence of dead-code stripping.
 """
 
+import lldb_shared
+
 import os, time
-import unittest2
 import lldb
 from lldbtest import *
 import lldbutil
@@ -53,10 +54,3 @@ class DeadStripTestCase(TestBase):
         # The breakpoint should have a hit count of 1.
         self.expect("breakpoint list -f 3", BREAKPOINT_HIT_ONCE,
             substrs = [' resolved, hit count = 1'])
-
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/functionalities/disassembly/TestDisassembleBreakpoint.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/disassembly/TestDisassembleBreakpoint.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/functionalities/disassembly/TestDisassembleBreakpoint.py (original)
+++ lldb/trunk/test/functionalities/disassembly/TestDisassembleBreakpoint.py Thu Oct 22 15:06:20 2015
@@ -2,8 +2,9 @@
 Test some lldb command abbreviations.
 """
 
+import lldb_shared
+
 import os, time
-import unittest2
 import lldb
 from lldbtest import *
 import lldbutil
@@ -45,10 +46,3 @@ class DisassemblyTestCase(TestBase):
 
         # make sure a few reasonable assembly instructions are here
         self.expect(disassembly, exe=False, startstr = "a.out`sum", substrs = instructions)
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()
-

Modified: lldb/trunk/test/functionalities/dynamic_value_child_count/TestDynamicValueChildCount.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/dynamic_value_child_count/TestDynamicValueChildCount.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/functionalities/dynamic_value_child_count/TestDynamicValueChildCount.py (original)
+++ lldb/trunk/test/functionalities/dynamic_value_child_count/TestDynamicValueChildCount.py Thu Oct 22 15:06:20 2015
@@ -2,9 +2,10 @@
 Test that dynamic values update their child count correctly
 """
 
+import lldb_shared
+
 import os, time
 import re
-import unittest2
 import lldb, lldbutil
 from lldbtest import *
 
@@ -72,9 +73,3 @@ class DynamicValueChildCountTestCase(Tes
         self.assertTrue(b.GetNumChildren() != 0, "b now has 1 child")
         self.runCmd("continue")
         self.assertTrue(b.GetNumChildren() == 0, "b didn't go back to 0 children")
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/functionalities/embedded_interpreter/TestConvenienceVariables.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/embedded_interpreter/TestConvenienceVariables.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/functionalities/embedded_interpreter/TestConvenienceVariables.py (original)
+++ lldb/trunk/test/functionalities/embedded_interpreter/TestConvenienceVariables.py Thu Oct 22 15:06:20 2015
@@ -1,7 +1,8 @@
 """Test convenience variables when you drop in from lldb prompt into an embedded interpreter."""
 
+import lldb_shared
+
 import os
-import unittest2
 import lldb
 from lldbtest import *
 
@@ -74,10 +75,3 @@ class ConvenienceVariablesCase(TestBase)
         child.expect_exact(python_prompt)
         self.expect(child.before, exe=False,
             patterns = ['frame #0: 0x[0-9a-f]+ a\.out`main\(argc=1, argv=0x[0-9a-f]+\) \+ \d+ at main\.c:%d' % self.line])
-
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/functionalities/exec/TestExec.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/exec/TestExec.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/functionalities/exec/TestExec.py (original)
+++ lldb/trunk/test/functionalities/exec/TestExec.py Thu Oct 22 15:06:20 2015
@@ -1,11 +1,12 @@
 """
 Test some lldb command abbreviations.
 """
+import lldb_shared
+
 import commands
 import lldb
 import os
 import time
-import unittest2
 from lldbtest import *
 import lldbutil
 
@@ -80,10 +81,3 @@ class ExecTestCase(TestBase):
         
              # Run and we should stop at breakpoint in main after exec
             process.Continue()        
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()
-

Modified: lldb/trunk/test/functionalities/expr-doesnt-deadlock/TestExprDoesntBlock.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/expr-doesnt-deadlock/TestExprDoesntBlock.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/functionalities/expr-doesnt-deadlock/TestExprDoesntBlock.py (original)
+++ lldb/trunk/test/functionalities/expr-doesnt-deadlock/TestExprDoesntBlock.py Thu Oct 22 15:06:20 2015
@@ -2,9 +2,10 @@
 Test that expr will time out and allow other threads to run if it blocks.
 """
 
+import lldb_shared
+
 import os, time
 import re
-import unittest2
 import lldb, lldbutil
 from lldbtest import *
 
@@ -51,9 +52,3 @@ class ExprDoesntDeadlockTestCase(TestBas
         var = frame0.EvaluateExpression ("call_me_to_get_lock()")
         self.assertTrue (var.IsValid())
         self.assertTrue (var.GetValueAsSigned (0) == 567)
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/functionalities/fat_archives/TestFatArchives.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/fat_archives/TestFatArchives.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/functionalities/fat_archives/TestFatArchives.py (original)
+++ lldb/trunk/test/functionalities/fat_archives/TestFatArchives.py Thu Oct 22 15:06:20 2015
@@ -1,11 +1,12 @@
 """
 Test some lldb command abbreviations.
 """
+import lldb_shared
+
 import commands
 import lldb
 import os
 import time
-import unittest2
 from lldbtest import *
 import lldbutil
 
@@ -53,10 +54,3 @@ class FatArchiveTestCase(TestBase):
             self.assertTrue(function.IsValid(), "Verify breakpoint in fat BSD archive has valid function debug info")
             self.assertTrue(line_entry.GetFileSpec(), "Verify breakpoint in fat BSD archive has source file information")
             self.assertTrue(line_entry.GetLine() != 0, "Verify breakpoint in fat BSD archive has source line information")
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()
-

Modified: lldb/trunk/test/functionalities/format/TestFormats.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/format/TestFormats.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/functionalities/format/TestFormats.py (original)
+++ lldb/trunk/test/functionalities/format/TestFormats.py Thu Oct 22 15:06:20 2015
@@ -2,8 +2,9 @@
 Test the command history mechanism
 """
 
+import lldb_shared
+
 import os
-import unittest2
 import lldb
 from lldbtest import *
 
@@ -54,9 +55,3 @@ class TestFormats(TestBase):
         # child.sendline('Help__')
         # child.expect_exact("error: 'Help__' is not a valid command")
         # child.expect_exact(prompt)
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/functionalities/inferior-assert/TestInferiorAssert.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/inferior-assert/TestInferiorAssert.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/functionalities/inferior-assert/TestInferiorAssert.py (original)
+++ lldb/trunk/test/functionalities/inferior-assert/TestInferiorAssert.py Thu Oct 22 15:06:20 2015
@@ -1,7 +1,8 @@
 """Test that lldb functions correctly after the inferior has asserted."""
 
+import lldb_shared
+
 import os, time
-import unittest2
 import lldb, lldbutil, lldbplatformutil
 from lldbtest import *
 
@@ -237,9 +238,3 @@ class AssertingInferiorTestCase(TestBase
         self.expect("thread backtrace all",
             substrs = [stop_reason,
                        'main.c:%d' % self.line])
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/functionalities/inferior-changed/TestInferiorChanged.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/inferior-changed/TestInferiorChanged.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/functionalities/inferior-changed/TestInferiorChanged.py (original)
+++ lldb/trunk/test/functionalities/inferior-changed/TestInferiorChanged.py Thu Oct 22 15:06:20 2015
@@ -1,7 +1,8 @@
 """Test lldb reloads the inferior after it was changed during the session."""
 
+import lldb_shared
+
 import os, time
-import unittest2
 import lldb
 from lldbtest import *
 import lldbutil
@@ -77,10 +78,3 @@ class ChangedInferiorTestCase(TestBase):
             substrs = ['= 7'])
         self.expect("expression *int_ptr",
             substrs = ['= 7'])
-
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/functionalities/inferior-crashing/TestInferiorCrashing.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/inferior-crashing/TestInferiorCrashing.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/functionalities/inferior-crashing/TestInferiorCrashing.py (original)
+++ lldb/trunk/test/functionalities/inferior-crashing/TestInferiorCrashing.py Thu Oct 22 15:06:20 2015
@@ -1,7 +1,8 @@
 """Test that lldb functions correctly after the inferior has crashed."""
 
+import lldb_shared
+
 import os, time
-import unittest2
 import lldb, lldbutil, lldbplatformutil
 from lldbtest import *
 
@@ -214,10 +215,3 @@ class CrashingInferiorTestCase(TestBase)
         # The lldb expression interpreter should be able to read from addresses of the inferior after a crash.
         self.expect("p argv[0]",
             substrs = ['a.out'])
-
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/functionalities/inferior-crashing/recursive-inferior/TestRecursiveInferior.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/inferior-crashing/recursive-inferior/TestRecursiveInferior.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/functionalities/inferior-crashing/recursive-inferior/TestRecursiveInferior.py (original)
+++ lldb/trunk/test/functionalities/inferior-crashing/recursive-inferior/TestRecursiveInferior.py Thu Oct 22 15:06:20 2015
@@ -1,7 +1,8 @@
 """Test that lldb functions correctly after the inferior has crashed while in a recursive routine."""
 
+import lldb_shared
+
 import os, time
-import unittest2
 import lldb, lldbutil, lldbplatformutil
 import sys
 from lldbtest import *
@@ -214,9 +215,3 @@ class CrashingRecursiveInferiorTestCase(
             startstr = '(char *) $1 = 0x0')
 
         self.check_stop_reason()
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/functionalities/inline-stepping/TestInlineStepping.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/inline-stepping/TestInlineStepping.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/functionalities/inline-stepping/TestInlineStepping.py (original)
+++ lldb/trunk/test/functionalities/inline-stepping/TestInlineStepping.py Thu Oct 22 15:06:20 2015
@@ -1,7 +1,8 @@
 """Test stepping over and into inlined functions."""
 
+import lldb_shared
+
 import os, time, sys
-import unittest2
 import lldb
 import lldbutil
 from lldbtest import *
@@ -267,9 +268,3 @@ class TestInlineStepping(TestBase):
         
         step_sequence = [["// In max_value specialized", "into"]]
         self.run_step_sequence(step_sequence)
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/functionalities/jitloader_gdb/TestJITLoaderGDB.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/jitloader_gdb/TestJITLoaderGDB.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/functionalities/jitloader_gdb/TestJITLoaderGDB.py (original)
+++ lldb/trunk/test/functionalities/jitloader_gdb/TestJITLoaderGDB.py Thu Oct 22 15:06:20 2015
@@ -1,7 +1,9 @@
 """Test for the JITLoaderGDB interface"""
 
-import os
+import lldb_shared
+
 import unittest2
+import os
 import lldb
 from lldbtest import *
 import lldbutil
@@ -31,9 +33,3 @@ class JITLoaderGDBTestCase(TestBase):
 
         self.assertEqual(process.GetState(), lldb.eStateExited)
         self.assertEqual(process.GetExitStatus(), 0)
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/functionalities/launch_with_shellexpand/TestLaunchWithShellExpand.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/launch_with_shellexpand/TestLaunchWithShellExpand.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/functionalities/launch_with_shellexpand/TestLaunchWithShellExpand.py (original)
+++ lldb/trunk/test/functionalities/launch_with_shellexpand/TestLaunchWithShellExpand.py Thu Oct 22 15:06:20 2015
@@ -1,10 +1,11 @@
 """
 Test that argdumper is a viable launching strategy.
 """
+import lldb_shared
+
 import lldb
 import os
 import time
-import unittest2
 from lldbtest import *
 import lldbutil
 
@@ -92,10 +93,3 @@ class LaunchWithShellExpandTestCase(Test
                          "Thread in process stopped in 'main' should have a stop reason of eStopReasonBreakpoint");
         
         self.expect("frame variable argv[1]", substrs=['foo bar'])
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()
-

Modified: lldb/trunk/test/functionalities/load_unload/TestLoadUnload.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/load_unload/TestLoadUnload.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/functionalities/load_unload/TestLoadUnload.py (original)
+++ lldb/trunk/test/functionalities/load_unload/TestLoadUnload.py Thu Oct 22 15:06:20 2015
@@ -2,9 +2,10 @@
 Test that breakpoint by symbol name works correctly with dynamic libs.
 """
 
+import lldb_shared
+
 import os, time
 import re
-import unittest2
 import lldb
 from lldbtest import *
 import lldbutil
@@ -310,9 +311,3 @@ class LoadUnloadTestCase(TestBase):
         self.expect("thread list", "step over succeeded.", 
             substrs = ['stopped',
                       'stop reason = step over'])
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/functionalities/longjmp/TestLongjmp.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/longjmp/TestLongjmp.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/functionalities/longjmp/TestLongjmp.py (original)
+++ lldb/trunk/test/functionalities/longjmp/TestLongjmp.py Thu Oct 22 15:06:20 2015
@@ -2,8 +2,9 @@
 Test the use of setjmp/longjmp for non-local goto operations in a single-threaded inferior.
 """
 
+import lldb_shared
+
 import os
-import unittest2
 import lldb
 import lldbutil
 from lldbtest import *
@@ -80,9 +81,3 @@ class LongjmpTestCase(TestBase):
         self.runCmd("thread step-in", RUN_SUCCEEDED)
         self.runCmd("thread step-out", RUN_SUCCEEDED)
         self.check_status()
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/functionalities/memory/read/TestMemoryRead.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/memory/read/TestMemoryRead.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/functionalities/memory/read/TestMemoryRead.py (original)
+++ lldb/trunk/test/functionalities/memory/read/TestMemoryRead.py Thu Oct 22 15:06:20 2015
@@ -2,9 +2,10 @@
 Test the 'memory read' command.
 """
 
+import lldb_shared
+
 import os, time
 import re
-import unittest2
 import lldb
 from lldbtest import *
 import lldbutil
@@ -86,10 +87,3 @@ class MemoryReadTestCase(TestBase):
         # 0x7fff5fbff598: error: unsupported byte size (20) for float format
         self.expect("memory read --format 'float' --count 1 --size 20 `&my_double`",
             substrs = ['unsupported byte size (20) for float format'])
-
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/functionalities/non-overlapping-index-variable-i/TestIndexVariable.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/non-overlapping-index-variable-i/TestIndexVariable.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/functionalities/non-overlapping-index-variable-i/TestIndexVariable.py (original)
+++ lldb/trunk/test/functionalities/non-overlapping-index-variable-i/TestIndexVariable.py Thu Oct 22 15:06:20 2015
@@ -1,7 +1,8 @@
 """Test evaluating expressions which ref. index variable 'i' which just goes
 from out of scope to in scope when stopped at the breakpoint."""
 
-import unittest2
+import lldb_shared
+
 import lldb
 from lldbtest import *
 import lldbutil
@@ -38,9 +39,3 @@ class NonOverlappingIndexVariableCase(Te
         self.runCmd('expr ptr[0]->point.y')
         self.runCmd('expr ptr[i]->point.x')
         self.runCmd('expr ptr[i]->point.y')
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/functionalities/nosucharch/TestNoSuchArch.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/nosucharch/TestNoSuchArch.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/functionalities/nosucharch/TestNoSuchArch.py (original)
+++ lldb/trunk/test/functionalities/nosucharch/TestNoSuchArch.py Thu Oct 22 15:06:20 2015
@@ -1,8 +1,9 @@
 """
 Test that using a non-existent architecture name does not crash LLDB.
 """
+import lldb_shared
+
 import lldb
-import unittest2
 from lldbtest import *
 import lldbutil
 
@@ -24,10 +25,3 @@ class NoSuchArchTestCase(TestBase):
         # Now just create the target with the default arch and check it's fine
         target = self.dbg.CreateTarget(exe)
         self.assertTrue(target.IsValid(), "This target should now be valid")
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()
-

Modified: lldb/trunk/test/functionalities/object-file/TestImageListMultiArchitecture.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/object-file/TestImageListMultiArchitecture.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/functionalities/object-file/TestImageListMultiArchitecture.py (original)
+++ lldb/trunk/test/functionalities/object-file/TestImageListMultiArchitecture.py Thu Oct 22 15:06:20 2015
@@ -4,8 +4,9 @@ This exercises classes like ObjectFileEL
 foreign-architecture object files.
 """
 
+import lldb_shared
+
 import os.path
-import unittest2
 import lldb
 from lldbtest import *
 import lldbutil
@@ -36,9 +37,3 @@ class TestImageListMultiArchitecture(Tes
             self.match("image list -t -A", [expected_triple_and_arch_regex])
         # Revert to the host platform after all of this is done
         self.runCmd("platform select host")
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/functionalities/paths/TestPaths.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/paths/TestPaths.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/functionalities/paths/TestPaths.py (original)
+++ lldb/trunk/test/functionalities/paths/TestPaths.py Thu Oct 22 15:06:20 2015
@@ -1,10 +1,11 @@
 """
 Test some lldb command abbreviations.
 """
+import lldb_shared
+
 import lldb
 import os
 import time
-import unittest2
 from lldbtest import *
 import lldbutil
 
@@ -43,10 +44,3 @@ class TestPaths(TestBase):
         fspec = lldb.SBFileSpec("C:\\dummy1\\dummy2//unknown_file", True);
         self.assertEqual(os.path.normpath(fspec.GetDirectory()), os.path.normpath("C:/dummy1/dummy2"));
         self.assertEqual(fspec.GetFilename(), "unknown_file");
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()
-

Modified: lldb/trunk/test/functionalities/platform/TestPlatformCommand.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/platform/TestPlatformCommand.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/functionalities/platform/TestPlatformCommand.py (original)
+++ lldb/trunk/test/functionalities/platform/TestPlatformCommand.py Thu Oct 22 15:06:20 2015
@@ -2,8 +2,9 @@
 Test some lldb platform commands.
 """
 
+import lldb_shared
+
 import os, time
-import unittest2
 import lldb
 from lldbtest import *
 
@@ -60,10 +61,3 @@ class PlatformCommandTestCase(TestBase):
         self.skipTest("due to taking too long to complete.")
         self.expect("platform shell sleep 15", error=True,
                 substrs = ["error: timed out waiting for shell command to complete"])
-
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/functionalities/plugins/commands/TestPluginCommands.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/plugins/commands/TestPluginCommands.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/functionalities/plugins/commands/TestPluginCommands.py (original)
+++ lldb/trunk/test/functionalities/plugins/commands/TestPluginCommands.py Thu Oct 22 15:06:20 2015
@@ -2,9 +2,10 @@
 Test that plugins that load commands work correctly.
 """
 
+import lldb_shared
+
 import os, time
 import re
-import unittest2
 import lldb
 from lldbtest import *
 import lldbutil
@@ -59,10 +60,3 @@ class PluginCommandTestCase(TestBase):
             print retobj.GetOutput()
 
         self.expect(retobj,substrs = ['abc def ghi'], exe=False)
-
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/functionalities/plugins/python_os_plugin/TestPythonOSPlugin.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/plugins/python_os_plugin/TestPythonOSPlugin.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/functionalities/plugins/python_os_plugin/TestPythonOSPlugin.py (original)
+++ lldb/trunk/test/functionalities/plugins/python_os_plugin/TestPythonOSPlugin.py Thu Oct 22 15:06:20 2015
@@ -2,9 +2,10 @@
 Test that the Python operating system plugin works correctly
 """
 
+import lldb_shared
+
 import os, time
 import re
-import unittest2
 import lldb
 from lldbtest import *
 import lldbutil
@@ -145,10 +146,3 @@ class PluginPythonOSPlugin(TestBase):
         
         self.assertTrue(line_entry.GetFileSpec().GetFilename() == 'main.c', "Make sure we stepped from line 5 to line 6 in main.c")
         self.assertTrue(line_entry.GetLine() == 6, "Make sure we stepped from line 5 to line 6 in main.c")
-        
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/functionalities/postmortem/minidump/TestMiniDump.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/postmortem/minidump/TestMiniDump.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/functionalities/postmortem/minidump/TestMiniDump.py (original)
+++ lldb/trunk/test/functionalities/postmortem/minidump/TestMiniDump.py Thu Oct 22 15:06:20 2015
@@ -2,7 +2,8 @@
 Test basics of mini dump debugging.
 """
 
-import unittest2
+import lldb_shared
+
 import lldb
 from lldbtest import *
 import lldbutil
@@ -36,9 +37,3 @@ class MiniDumpTestCase(TestBase):
         self.dbg.CreateTarget("")
         self.target = self.dbg.GetSelectedTarget()
         self.process = self.target.LoadCore("fizzbuzz_no_heap.dmp")
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/functionalities/process_attach/TestProcessAttach.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/process_attach/TestProcessAttach.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/functionalities/process_attach/TestProcessAttach.py (original)
+++ lldb/trunk/test/functionalities/process_attach/TestProcessAttach.py Thu Oct 22 15:06:20 2015
@@ -2,8 +2,9 @@
 Test process attach.
 """
 
+import lldb_shared
+
 import os, time
-import unittest2
 import lldb
 from lldbtest import *
 import lldbutil
@@ -52,9 +53,3 @@ class ProcessAttachTestCase(TestBase):
 
         # Call super's tearDown().
         TestBase.tearDown(self)
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/functionalities/process_attach/attach_denied/TestAttachDenied.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/process_attach/attach_denied/TestAttachDenied.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/functionalities/process_attach/attach_denied/TestAttachDenied.py (original)
+++ lldb/trunk/test/functionalities/process_attach/attach_denied/TestAttachDenied.py Thu Oct 22 15:06:20 2015
@@ -2,9 +2,10 @@
 Test denied process attach.
 """
 
+import lldb_shared
+
 import os
 import time
-import unittest2
 import lldb
 from lldbtest import *
 
@@ -54,10 +55,3 @@ class AttachDeniedTestCase(TestBase):
         self.expect('process attach -p ' + pid,
                     startstr = 'error: attach failed:',
                     error = True)
-
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/functionalities/process_group/TestChangeProcessGroup.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/process_group/TestChangeProcessGroup.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/functionalities/process_group/TestChangeProcessGroup.py (original)
+++ lldb/trunk/test/functionalities/process_group/TestChangeProcessGroup.py Thu Oct 22 15:06:20 2015
@@ -1,7 +1,8 @@
 """Test that we handle inferiors which change their process group"""
 
+import lldb_shared
+
 import os
-import unittest2
 import lldb
 from lldbtest import *
 import lldbutil
@@ -97,9 +98,3 @@ class ChangeProcessGroupTestCase(TestBas
         shell_command = lldb.SBPlatformShellCommand(cmd)
         err = platform.Run(shell_command)
         return (err, shell_command.GetStatus(), shell_command.GetOutput())
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/functionalities/process_launch/TestProcessLaunch.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/process_launch/TestProcessLaunch.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/functionalities/process_launch/TestProcessLaunch.py (original)
+++ lldb/trunk/test/functionalities/process_launch/TestProcessLaunch.py Thu Oct 22 15:06:20 2015
@@ -2,8 +2,9 @@
 Test lldb process launch flags.
 """
 
+import lldb_shared
+
 import os, time
-import unittest2
 import lldb
 from lldbtest import *
 
@@ -175,11 +176,3 @@ class ProcessLaunchTestCase(TestBase):
 
         if not success:
             self.fail(err_msg)
-
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()
-

Modified: lldb/trunk/test/functionalities/recursion/TestValueObjectRecursion.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/recursion/TestValueObjectRecursion.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/functionalities/recursion/TestValueObjectRecursion.py (original)
+++ lldb/trunk/test/functionalities/recursion/TestValueObjectRecursion.py Thu Oct 22 15:06:20 2015
@@ -2,8 +2,9 @@
 Test lldb data formatter subsystem.
 """
 
+import lldb_shared
+
 import os, time
-import unittest2
 import lldb
 from lldbtest import *
 import lldbutil
@@ -54,9 +55,3 @@ class ValueObjectRecursionTestCase(TestB
         self.assertTrue(child.GetChildAtIndex(0).IsValid(),"the deep ValueObject has no value")
         self.assertTrue(child.GetChildAtIndex(0).GetValueAsUnsigned() != 0,"the deep ValueObject has a zero value")
         self.assertTrue(child.GetChildAtIndex(1).GetValueAsUnsigned() != 0, "the deep ValueObject has no next")
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/functionalities/register/TestRegisters.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/register/TestRegisters.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/functionalities/register/TestRegisters.py (original)
+++ lldb/trunk/test/functionalities/register/TestRegisters.py Thu Oct 22 15:06:20 2015
@@ -2,9 +2,10 @@
 Test the 'register' command.
 """
 
+import lldb_shared
+
 import os, sys, time
 import re
-import unittest2
 import lldb
 from lldbtest import *
 import lldbutil
@@ -352,9 +353,3 @@ class RegisterCommandsTestCase(TestBase)
         if test_16bit_regs:
             self.expect("expr -- $ax == (($ah << 8) | $al)",
                 substrs = ['true'])
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/functionalities/rerun/TestRerun.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/rerun/TestRerun.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/functionalities/rerun/TestRerun.py (original)
+++ lldb/trunk/test/functionalities/rerun/TestRerun.py Thu Oct 22 15:06:20 2015
@@ -1,10 +1,11 @@
 """
 Test that argdumper is a viable launching strategy.
 """
+import lldb_shared
+
 import lldb
 import os
 import time
-import unittest2
 from lldbtest import *
 import lldbutil
 
@@ -71,11 +72,3 @@ class TestRerun(TestBase):
         self.expect("frame variable argv[1]", substrs=['1'])
         self.expect("frame variable argv[2]", substrs=['2'])
         self.expect("frame variable argv[3]", substrs=['3'])
-        
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()
-

Modified: lldb/trunk/test/functionalities/return-value/TestReturnValue.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/return-value/TestReturnValue.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/functionalities/return-value/TestReturnValue.py (original)
+++ lldb/trunk/test/functionalities/return-value/TestReturnValue.py Thu Oct 22 15:06:20 2015
@@ -2,9 +2,10 @@
 Test getting return-values correctly when stepping out
 """
 
+import lldb_shared
+
 import os, time
 import re
-import unittest2
 import lldb, lldbutil
 from lldbtest import *
 
@@ -206,9 +207,3 @@ class ReturnValueTestCase(TestBase):
             ret_child_str = ret_child.GetValue()
 
             self.assertEqual(in_child_str, ret_child_str)
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/functionalities/set-data/TestSetData.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/set-data/TestSetData.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/functionalities/set-data/TestSetData.py (original)
+++ lldb/trunk/test/functionalities/set-data/TestSetData.py Thu Oct 22 15:06:20 2015
@@ -2,8 +2,9 @@
 Set the contents of variables and registers using raw data
 """
 
+import lldb_shared
+
 import os, time
-import unittest2
 import lldb
 from lldbtest import *
 import lldbutil
@@ -57,9 +58,3 @@ class SetDataTestCase(TestBase):
 
         self.expect("fr var -d run-target string", VARIABLES_DISPLAYED_CORRECTLY,
             substrs = ['NSString *', 'nil'])
-        
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/functionalities/signal/TestSendSignal.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/signal/TestSendSignal.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/functionalities/signal/TestSendSignal.py (original)
+++ lldb/trunk/test/functionalities/signal/TestSendSignal.py Thu Oct 22 15:06:20 2015
@@ -1,7 +1,8 @@
 """Test that lldb command 'process signal SIGUSR1' to send a signal to the inferior works."""
 
+import lldb_shared
+
 import os, time, signal
-import unittest2
 import lldb
 from lldbtest import *
 import lldbutil
@@ -100,9 +101,3 @@ class SendSignalTestCase(TestBase):
         self.assertTrue(state == expected_state,
                         "It was the %s state." %
                         lldb.SBDebugger_StateAsCString(expected_state))
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/functionalities/signal/handle-segv/TestHandleSegv.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/signal/handle-segv/TestHandleSegv.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/functionalities/signal/handle-segv/TestHandleSegv.py (original)
+++ lldb/trunk/test/functionalities/signal/handle-segv/TestHandleSegv.py Thu Oct 22 15:06:20 2015
@@ -1,7 +1,8 @@
 """Test that we can debug inferiors that handle SIGSEGV by themselves"""
 
+import lldb_shared
+
 import os
-import unittest2
 import lldb
 from lldbtest import *
 import lldbutil
@@ -38,9 +39,3 @@ class HandleSegvTestCase(TestBase):
         process.Continue()
         self.assertEqual(process.GetState(), lldb.eStateExited)
         self.assertEqual(process.GetExitStatus(), 0)
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/functionalities/signal/raise/TestRaise.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/signal/raise/TestRaise.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/functionalities/signal/raise/TestRaise.py (original)
+++ lldb/trunk/test/functionalities/signal/raise/TestRaise.py Thu Oct 22 15:06:20 2015
@@ -1,7 +1,8 @@
 """Test that we handle inferiors that send signals to themselves"""
 
+import lldb_shared
+
 import os
-import unittest2
 import lldb
 from lldbtest import *
 import lldbutil
@@ -216,9 +217,3 @@ class RaiseTestCase(TestBase):
 
         # We are done
         process.Kill()
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/functionalities/single-quote-in-filename-to-lldb/TestSingleQuoteInFilename.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/single-quote-in-filename-to-lldb/TestSingleQuoteInFilename.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/functionalities/single-quote-in-filename-to-lldb/TestSingleQuoteInFilename.py (original)
+++ lldb/trunk/test/functionalities/single-quote-in-filename-to-lldb/TestSingleQuoteInFilename.py Thu Oct 22 15:06:20 2015
@@ -2,8 +2,9 @@
 Test the lldb command line takes a filename with single quote chars.
 """
 
+import lldb_shared
+
 import os
-import unittest2
 import lldb
 from lldbtest import *
 
@@ -66,10 +67,3 @@ class SingleQuoteInCommandLineTestCase(T
 
             self.expect(from_child, exe=False,
                 substrs = ["Current executable set to"])
-
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/functionalities/step-avoids-no-debug/TestStepNoDebug.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/step-avoids-no-debug/TestStepNoDebug.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/functionalities/step-avoids-no-debug/TestStepNoDebug.py (original)
+++ lldb/trunk/test/functionalities/step-avoids-no-debug/TestStepNoDebug.py Thu Oct 22 15:06:20 2015
@@ -2,9 +2,10 @@
 Test thread step-in, step-over and step-out work with the "Avoid no debug" option.
 """
 
+import lldb_shared
+
 import os
 import re
-import unittest2
 import lldb, lldbutil
 import sys
 from lldbtest import *
@@ -107,10 +108,3 @@ class ReturnValueTestCase(TestBase):
         # frame.  In gdb, step-over/step-in move to the end of the line they stepped out to.
         # If we ever change this we will need to fix this test.
         self.hit_correct_line ("int return_value = no_debug_caller(5, called_from_nodebug)")
-
-        
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/functionalities/stop-hook/TestStopHookCmd.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/stop-hook/TestStopHookCmd.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/functionalities/stop-hook/TestStopHookCmd.py (original)
+++ lldb/trunk/test/functionalities/stop-hook/TestStopHookCmd.py Thu Oct 22 15:06:20 2015
@@ -5,7 +5,6 @@ Test lldb target stop-hook command.
 import lldb_shared
 
 import os
-import unittest2
 import lldb
 from lldbtest import *
 import lldbutil
@@ -62,10 +61,3 @@ class StopHookCmdTestCase(TestBase):
 
         self.expect('target stop-hook list', 'Stop Hook deleted successfully',
             substrs = ['No stop hooks.'])
-
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/functionalities/stop-hook/TestStopHookMechanism.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/stop-hook/TestStopHookMechanism.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/functionalities/stop-hook/TestStopHookMechanism.py (original)
+++ lldb/trunk/test/functionalities/stop-hook/TestStopHookMechanism.py Thu Oct 22 15:06:20 2015
@@ -2,8 +2,9 @@
 Test lldb target stop-hook mechanism to see whether it fires off correctly .
 """
 
+import lldb_shared
+
 import os
-import unittest2
 import lldb
 from lldbtest import *
 
@@ -95,10 +96,3 @@ class StopHookMechanismTestCase(TestBase
         # Verify that the 'Stop Hooks' mechanism is NOT BEING fired off.
         self.expect(child.before, exe=False, matching=False,
             substrs = ['(void *) $'])
-        
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/functionalities/stop-hook/multiple_threads/TestStopHookMultipleThreads.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/stop-hook/multiple_threads/TestStopHookMultipleThreads.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/functionalities/stop-hook/multiple_threads/TestStopHookMultipleThreads.py (original)
+++ lldb/trunk/test/functionalities/stop-hook/multiple_threads/TestStopHookMultipleThreads.py Thu Oct 22 15:06:20 2015
@@ -2,8 +2,9 @@
 Test that lldb stop-hook works for multiple threads.
 """
 
+import lldb_shared
+
 import os, time
-import unittest2
 import lldb
 from lldbtest import *
 
@@ -71,10 +72,3 @@ class StopHookForMultipleThreadsTestCase
         # Continue and expect to find the output emitted by the firing of our stop hook.
         child.sendline('continue')
         child.expect_exact('(uint32_t) ::g_val = ')
-
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/functionalities/target_command/TestTargetCommand.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/target_command/TestTargetCommand.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/functionalities/target_command/TestTargetCommand.py (original)
+++ lldb/trunk/test/functionalities/target_command/TestTargetCommand.py Thu Oct 22 15:06:20 2015
@@ -2,7 +2,8 @@
 Test some target commands: create, list, select, variable.
 """
 
-import unittest2
+import lldb_shared
+
 import lldb
 import sys
 from lldbtest import *
@@ -196,9 +197,3 @@ class targetCommandTestCase(TestBase):
                     substrs = ['a'])
         self.expect("target variable my_global_char", VARIABLES_DISPLAYED_CORRECTLY,
                     substrs = ["my_global_char", "'X'"])
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/functionalities/thread/TestNumThreads.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/thread/TestNumThreads.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/functionalities/thread/TestNumThreads.py (original)
+++ lldb/trunk/test/functionalities/thread/TestNumThreads.py Thu Oct 22 15:06:20 2015
@@ -2,8 +2,9 @@
 Test number of threads.
 """
 
+import lldb_shared
+
 import os, time
-import unittest2
 import lldb
 from lldbtest import *
 import lldbutil
@@ -48,9 +49,3 @@ class NumberOfThreadsTestCase(TestBase):
         # Using std::thread may involve extra threads, so we assert that there are
         # at least 4 rather than exactly 4.
         self.assertTrue(num_threads >= 4, 'Number of expected threads and actual threads do not match.')
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/functionalities/thread/break_after_join/TestBreakAfterJoin.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/thread/break_after_join/TestBreakAfterJoin.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/functionalities/thread/break_after_join/TestBreakAfterJoin.py (original)
+++ lldb/trunk/test/functionalities/thread/break_after_join/TestBreakAfterJoin.py Thu Oct 22 15:06:20 2015
@@ -2,8 +2,9 @@
 Test number of threads.
 """
 
+import lldb_shared
+
 import os, time
-import unittest2
 import lldb
 from lldbtest import *
 import lldbutil
@@ -72,9 +73,3 @@ class BreakpointAfterJoinTestCase(TestBa
 
         # At this point, the inferior process should have exited.
         self.assertTrue(process.GetState() == lldb.eStateExited, PROCESS_EXITED)
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/functionalities/thread/concurrent_events/TestConcurrentEvents.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/thread/concurrent_events/TestConcurrentEvents.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/functionalities/thread/concurrent_events/TestConcurrentEvents.py (original)
+++ lldb/trunk/test/functionalities/thread/concurrent_events/TestConcurrentEvents.py Thu Oct 22 15:06:20 2015
@@ -10,8 +10,10 @@ until exit or a crash takes place, and t
 verified to match the expected number of events.
 """
 
-import os, time
+import lldb_shared
+
 import unittest2
+import os, time
 import lldb
 from lldbtest import *
 import lldbutil
@@ -484,10 +486,3 @@ class ConcurrentEventsTestCase(TestBase)
             watchpoint_hit_count = self.thread_watchpoint.GetHitCount() if expected_watchpoint_threads > 0 else 0
             self.assertEqual(expected_watchpoint_threads, watchpoint_hit_count,
                 "Expected %d watchpoint hits, got %d" % (expected_watchpoint_threads, watchpoint_hit_count))
-
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/functionalities/thread/crash_during_step/TestCrashDuringStep.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/thread/crash_during_step/TestCrashDuringStep.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/functionalities/thread/crash_during_step/TestCrashDuringStep.py (original)
+++ lldb/trunk/test/functionalities/thread/crash_during_step/TestCrashDuringStep.py Thu Oct 22 15:06:20 2015
@@ -2,8 +2,9 @@
 Test that step-inst over a crash behaves correctly.
 """
 
+import lldb_shared
+
 import os
-import unittest2
 import lldb
 from lldbtest import *
 import lldbutil
@@ -47,10 +48,3 @@ class CreateDuringStepTestCase(TestBase)
         self.assertEqual(process.GetState(), lldb.eStateStopped, PROCESS_STOPPED)
         self.assertTrue(lldbutil.is_thread_crashed(self, thread), "Thread has crashed")
         process.Kill()
-
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/functionalities/thread/create_after_attach/TestCreateAfterAttach.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/thread/create_after_attach/TestCreateAfterAttach.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/functionalities/thread/create_after_attach/TestCreateAfterAttach.py (original)
+++ lldb/trunk/test/functionalities/thread/create_after_attach/TestCreateAfterAttach.py Thu Oct 22 15:06:20 2015
@@ -2,8 +2,9 @@
 Test thread creation after process attach.
 """
 
+import lldb_shared
+
 import os, time
-import unittest2
 import lldb
 from lldbtest import *
 import lldbutil
@@ -115,10 +116,3 @@ class CreateAfterAttachTestCase(TestBase
 
         # At this point, the inferior process should have exited.
         self.assertTrue(process.GetState() == lldb.eStateExited, PROCESS_EXITED)
-
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/functionalities/thread/create_during_step/TestCreateDuringStep.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/thread/create_during_step/TestCreateDuringStep.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/functionalities/thread/create_during_step/TestCreateDuringStep.py (original)
+++ lldb/trunk/test/functionalities/thread/create_during_step/TestCreateDuringStep.py Thu Oct 22 15:06:20 2015
@@ -2,8 +2,9 @@
 Test number of threads.
 """
 
+import lldb_shared
+
 import os, time
-import unittest2
 import lldb
 from lldbtest import *
 import lldbutil
@@ -122,9 +123,3 @@ class CreateDuringStepTestCase(TestBase)
 
         # At this point, the inferior process should have exited.
         self.assertTrue(process.GetState() == lldb.eStateExited, PROCESS_EXITED)
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/functionalities/thread/exit_during_break/TestExitDuringBreak.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/thread/exit_during_break/TestExitDuringBreak.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/functionalities/thread/exit_during_break/TestExitDuringBreak.py (original)
+++ lldb/trunk/test/functionalities/thread/exit_during_break/TestExitDuringBreak.py Thu Oct 22 15:06:20 2015
@@ -2,8 +2,9 @@
 Test number of threads.
 """
 
+import lldb_shared
+
 import os, time
-import unittest2
 import lldb
 from lldbtest import *
 import lldbutil
@@ -76,9 +77,3 @@ class ExitDuringBreakpointTestCase(TestB
 
         # At this point, the inferior process should have exited.
         self.assertTrue(process.GetState() == lldb.eStateExited, PROCESS_EXITED)
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/functionalities/thread/exit_during_step/TestExitDuringStep.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/thread/exit_during_step/TestExitDuringStep.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/functionalities/thread/exit_during_step/TestExitDuringStep.py (original)
+++ lldb/trunk/test/functionalities/thread/exit_during_step/TestExitDuringStep.py Thu Oct 22 15:06:20 2015
@@ -2,8 +2,9 @@
 Test number of threads.
 """
 
+import lldb_shared
+
 import os, time
-import unittest2
 import lldb
 from lldbtest import *
 import lldbutil
@@ -138,9 +139,3 @@ class ExitDuringStepTestCase(TestBase):
 
         # At this point, the inferior process should have exited.
         self.assertTrue(process.GetState() == lldb.eStateExited, PROCESS_EXITED)
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/functionalities/thread/jump/TestThreadJump.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/thread/jump/TestThreadJump.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/functionalities/thread/jump/TestThreadJump.py (original)
+++ lldb/trunk/test/functionalities/thread/jump/TestThreadJump.py Thu Oct 22 15:06:20 2015
@@ -2,8 +2,9 @@
 Test jumping to different places.
 """
 
+import lldb_shared
+
 import os, time
-import unittest2
 import lldb
 from lldbtest import *
 import lldbutil
@@ -55,9 +56,3 @@ class ThreadJumpTestCase(TestBase):
         self.runCmd("thread step-out")                  # return out
         self.runCmd("thread step-over")                 # assign to the global
         self.expect("expr %s" % var, substrs = [value]) # check it
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/functionalities/thread/multi_break/TestMultipleBreakpoints.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/thread/multi_break/TestMultipleBreakpoints.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/functionalities/thread/multi_break/TestMultipleBreakpoints.py (original)
+++ lldb/trunk/test/functionalities/thread/multi_break/TestMultipleBreakpoints.py Thu Oct 22 15:06:20 2015
@@ -2,8 +2,9 @@
 Test number of threads.
 """
 
+import lldb_shared
+
 import os, time
-import unittest2
 import lldb
 from lldbtest import *
 import lldbutil
@@ -72,9 +73,3 @@ class MultipleBreakpointTestCase(TestBas
 
         # At this point, the inferior process should have exited.
         self.assertTrue(process.GetState() == lldb.eStateExited, PROCESS_EXITED)
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/functionalities/thread/state/TestThreadStates.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/thread/state/TestThreadStates.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/functionalities/thread/state/TestThreadStates.py (original)
+++ lldb/trunk/test/functionalities/thread/state/TestThreadStates.py Thu Oct 22 15:06:20 2015
@@ -2,8 +2,10 @@
 Test thread states.
 """
 
-import os, time
+import lldb_shared
+
 import unittest2
+import os, time
 import lldb
 from lldbtest import *
 import lldbutil
@@ -340,9 +342,3 @@ class ThreadStateTestCase(TestBase):
 
         # At this point, the inferior process should have exited.
         self.assertTrue(process.GetState() == lldb.eStateExited, PROCESS_EXITED)
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/functionalities/thread/step_out/TestThreadStepOut.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/thread/step_out/TestThreadStepOut.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/functionalities/thread/step_out/TestThreadStepOut.py (original)
+++ lldb/trunk/test/functionalities/thread/step_out/TestThreadStepOut.py Thu Oct 22 15:06:20 2015
@@ -2,8 +2,9 @@
 Test stepping out from a function in a multi-threaded program.
 """
 
+import lldb_shared
+
 import os, time
-import unittest2
 import lldb
 from lldbtest import *
 import lldbutil
@@ -126,9 +127,3 @@ class ThreadStepOutTestCase(TestBase):
 
         # At this point, the inferior process should have exited.
         self.assertTrue(self.inferior_process.GetState() == lldb.eStateExited, PROCESS_EXITED)
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/functionalities/thread/thread_exit/TestThreadExit.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/thread/thread_exit/TestThreadExit.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/functionalities/thread/thread_exit/TestThreadExit.py (original)
+++ lldb/trunk/test/functionalities/thread/thread_exit/TestThreadExit.py Thu Oct 22 15:06:20 2015
@@ -2,8 +2,9 @@
 Test number of threads.
 """
 
+import lldb_shared
+
 import os, time
-import unittest2
 import lldb
 from lldbtest import *
 import lldbutil
@@ -112,9 +113,3 @@ class ThreadExitTestCase(TestBase):
 
         # At this point, the inferior process should have exited.
         self.assertTrue(process.GetState() == lldb.eStateExited, PROCESS_EXITED)
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/functionalities/thread/thread_specific_break/TestThreadSpecificBreakpoint.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/thread/thread_specific_break/TestThreadSpecificBreakpoint.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/functionalities/thread/thread_specific_break/TestThreadSpecificBreakpoint.py (original)
+++ lldb/trunk/test/functionalities/thread/thread_specific_break/TestThreadSpecificBreakpoint.py Thu Oct 22 15:06:20 2015
@@ -2,9 +2,10 @@
 Test that we obey thread conditioned breakpoints.
 """
 
+import lldb_shared
+
 import os, time
 import re
-import unittest2
 import lldb, lldbutil
 from lldbtest import *
 
@@ -59,10 +60,3 @@ class ThreadSpecificBreakTestCase(TestBa
 
         next_stop_state = process.GetState()
         self.assertTrue (next_stop_state == lldb.eStateExited, "We should have not hit the breakpoint again.")
-        
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/functionalities/tty/TestTerminal.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/tty/TestTerminal.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/functionalities/tty/TestTerminal.py (original)
+++ lldb/trunk/test/functionalities/tty/TestTerminal.py Thu Oct 22 15:06:20 2015
@@ -2,8 +2,10 @@
 Test lldb command aliases.
 """
 
-import os, time
+import lldb_shared
+
 import unittest2
+import os, time
 import lldb
 from lldbtest import *
 import lldbutil
@@ -33,10 +35,3 @@ class LaunchInTerminalTestCase(TestBase)
         self.assertTrue(error.Success(), "Make sure launch happened successfully in a terminal window")
         # Running in synchronous mode our process should have run and already exited by the time target.Launch() returns
         self.assertTrue(process.GetState() == lldb.eStateExited)
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()
-

Modified: lldb/trunk/test/functionalities/type_completion/TestTypeCompletion.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/type_completion/TestTypeCompletion.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/functionalities/type_completion/TestTypeCompletion.py (original)
+++ lldb/trunk/test/functionalities/type_completion/TestTypeCompletion.py Thu Oct 22 15:06:20 2015
@@ -2,8 +2,9 @@
 Check that types only get completed when necessary.
 """
 
+import lldb_shared
+
 import os, time
-import unittest2
 import lldb
 from lldbtest import *
 import lldbutil
@@ -111,9 +112,3 @@ class TypeCompletionTestCase(TestBase):
         string = field0.GetType().GetPointeeType()
         self.assertTrue(string.IsValid(), 'std::string should be valid')
         self.assertTrue(string.IsTypeComplete(), 'std::string should now be complete')
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/functionalities/type_lookup/TestTypeLookup.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/type_lookup/TestTypeLookup.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/functionalities/type_lookup/TestTypeLookup.py (original)
+++ lldb/trunk/test/functionalities/type_lookup/TestTypeLookup.py Thu Oct 22 15:06:20 2015
@@ -2,8 +2,9 @@
 Test type lookup command.
 """
 
+import lldb_shared
+
 import os, time
-import unittest2
 import lldb
 from lldbtest import *
 import datetime
@@ -38,9 +39,3 @@ class TypeLookupTestCase(TestBase):
         self.expect('type lookup NSURL', substrs=['NSURL'])
         self.expect('type lookup NSArray', substrs=['NSArray'])
         self.expect('type lookup NSObject', substrs=['NSObject', 'isa'])
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/functionalities/unwind/noreturn/TestNoreturnUnwind.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/unwind/noreturn/TestNoreturnUnwind.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/functionalities/unwind/noreturn/TestNoreturnUnwind.py (original)
+++ lldb/trunk/test/functionalities/unwind/noreturn/TestNoreturnUnwind.py Thu Oct 22 15:06:20 2015
@@ -2,8 +2,9 @@
 Test that we can backtrace correctly with 'noreturn' functions on the stack
 """
 
+import lldb_shared
+
 import os, time
-import unittest2
 import lldb
 from lldbtest import *
 import lldbutil
@@ -71,10 +72,3 @@ class NoreturnUnwind(TestBase):
 
         if thread.GetFrameAtIndex (main_frame_number).GetFunctionName() != "main":
             self.fail("Did not find main() above func_a().")
-
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/functionalities/unwind/sigtramp/TestSigtrampUnwind.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/unwind/sigtramp/TestSigtrampUnwind.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/functionalities/unwind/sigtramp/TestSigtrampUnwind.py (original)
+++ lldb/trunk/test/functionalities/unwind/sigtramp/TestSigtrampUnwind.py Thu Oct 22 15:06:20 2015
@@ -2,8 +2,9 @@
 Test that we can backtrace correctly with 'sigtramp' functions on the stack
 """
 
+import lldb_shared
+
 import os, time
-import unittest2
 import lldb
 from lldbtest import *
 import lldbutil
@@ -76,9 +77,3 @@ class SigtrampUnwind(TestBase):
 
         if found_main == False:
             self.fail("Unable to find main() in backtrace.")
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/functionalities/unwind/standard/TestStandardUnwind.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/unwind/standard/TestStandardUnwind.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/functionalities/unwind/standard/TestStandardUnwind.py (original)
+++ lldb/trunk/test/functionalities/unwind/standard/TestStandardUnwind.py Thu Oct 22 15:06:20 2015
@@ -10,8 +10,10 @@ file up and generate a test case from it
 after escaping some special characters).
 """
 
-import os, time
+import lldb_shared
+
 import unittest2
+import os, time
 import lldb
 from lldbtest import *
 import lldbutil
@@ -139,9 +141,3 @@ for f in test_source_files:
 
         test_function_dwarf.__name__ = test_name
         setattr(StandardUnwindTest, test_function_dwarf.__name__, test_function_dwarf)
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/functionalities/value_md5_crash/TestValueMD5Crash.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/value_md5_crash/TestValueMD5Crash.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/functionalities/value_md5_crash/TestValueMD5Crash.py (original)
+++ lldb/trunk/test/functionalities/value_md5_crash/TestValueMD5Crash.py Thu Oct 22 15:06:20 2015
@@ -2,8 +2,9 @@
 Verify that the hash computing logic for ValueObject's values can't crash us.
 """
 
+import lldb_shared
+
 import os, time
-import unittest2
 import lldb
 from lldbtest import *
 import lldbutil
@@ -47,9 +48,3 @@ class ValueMD5CrashTestCase(TestBase):
         v = value.GetValue()
         
         # if we are here, instead of crashed, the test succeeded
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/functionalities/watchpoint/hello_watchlocation/TestWatchLocation.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/watchpoint/hello_watchlocation/TestWatchLocation.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/functionalities/watchpoint/hello_watchlocation/TestWatchLocation.py (original)
+++ lldb/trunk/test/functionalities/watchpoint/hello_watchlocation/TestWatchLocation.py Thu Oct 22 15:06:20 2015
@@ -2,9 +2,10 @@
 Test lldb watchpoint that uses '-s size' to watch a pointed location with size.
 """
 
+import lldb_shared
+
 import os, time
 import re
-import unittest2
 import lldb
 from lldbtest import *
 import lldbutil
@@ -92,10 +93,3 @@ class HelloWatchLocationTestCase(TestBas
             substrs = ['hit_count = 1'])
 
         self.runCmd("thread backtrace all")
-
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/functionalities/watchpoint/hello_watchpoint/TestMyFirstWatchpoint.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/watchpoint/hello_watchpoint/TestMyFirstWatchpoint.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/functionalities/watchpoint/hello_watchpoint/TestMyFirstWatchpoint.py (original)
+++ lldb/trunk/test/functionalities/watchpoint/hello_watchpoint/TestMyFirstWatchpoint.py Thu Oct 22 15:06:20 2015
@@ -2,8 +2,9 @@
 Test my first lldb watchpoint.
 """
 
+import lldb_shared
+
 import os, time
-import unittest2
 import lldb
 from lldbtest import *
 import lldbutil
@@ -79,10 +80,3 @@ class HelloWatchpointTestCase(TestBase):
         # The hit count should now be 1.
         self.expect("watchpoint list -v",
             substrs = ['hit_count = 1'])
-
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/functionalities/watchpoint/multiple_threads/TestWatchpointMultipleThreads.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/watchpoint/multiple_threads/TestWatchpointMultipleThreads.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/functionalities/watchpoint/multiple_threads/TestWatchpointMultipleThreads.py (original)
+++ lldb/trunk/test/functionalities/watchpoint/multiple_threads/TestWatchpointMultipleThreads.py Thu Oct 22 15:06:20 2015
@@ -2,8 +2,9 @@
 Test that lldb watchpoint works for multiple threads.
 """
 
+import lldb_shared
+
 import os, time
-import unittest2
 import re
 import lldb
 from lldbtest import *
@@ -132,10 +133,3 @@ class WatchpointForMultipleThreadsTestCa
                 continue
             else:
                 self.fail("The stop reason should be either break or watchpoint")
-
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/functionalities/watchpoint/step_over_watchpoint/TestStepOverWatchpoint.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/watchpoint/step_over_watchpoint/TestStepOverWatchpoint.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/functionalities/watchpoint/step_over_watchpoint/TestStepOverWatchpoint.py (original)
+++ lldb/trunk/test/functionalities/watchpoint/step_over_watchpoint/TestStepOverWatchpoint.py Thu Oct 22 15:06:20 2015
@@ -1,6 +1,7 @@
 """Test stepping over watchpoints."""
 
-import unittest2
+import lldb_shared
+
 import lldb
 import lldbutil
 from lldbtest import *
@@ -103,9 +104,3 @@ class TestStepOverWatchpoint(TestBase):
                 self.assertTrue(stop_reason == lldb.eStopReasonPlanComplete,
                                 STOPPED_DUE_TO_STEP_IN)
         self.assertTrue(watchpoint_hit, "Watchpoint never hit.")
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/functionalities/watchpoint/variable_out_of_scope/TestWatchedVarHitWhenInScope.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/watchpoint/variable_out_of_scope/TestWatchedVarHitWhenInScope.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/functionalities/watchpoint/variable_out_of_scope/TestWatchedVarHitWhenInScope.py (original)
+++ lldb/trunk/test/functionalities/watchpoint/variable_out_of_scope/TestWatchedVarHitWhenInScope.py Thu Oct 22 15:06:20 2015
@@ -2,8 +2,10 @@
 Test that a variable watchpoint should only hit when in scope.
 """
 
-import os, time
+import lldb_shared
+
 import unittest2
+import os, time
 import lldb
 from lldbtest import *
 import lldbutil
@@ -77,10 +79,3 @@ class WatchedVariableHitWhenInScopeTestC
         # The hit count should now be 1.
         self.expect("watchpoint list -v",
             substrs = ['hit_count = 1'])
-
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/functionalities/watchpoint/watchpoint_commands/TestWatchpointCommands.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/watchpoint/watchpoint_commands/TestWatchpointCommands.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/functionalities/watchpoint/watchpoint_commands/TestWatchpointCommands.py (original)
+++ lldb/trunk/test/functionalities/watchpoint/watchpoint_commands/TestWatchpointCommands.py Thu Oct 22 15:06:20 2015
@@ -2,8 +2,9 @@
 Test watchpoint list, enable, disable, and delete commands.
 """
 
+import lldb_shared
+
 import os, time
-import unittest2
 import lldb
 from lldbtest import *
 import lldbutil
@@ -308,10 +309,3 @@ class WatchpointCommandsTestCase(TestBas
         # The hit count should be 1.
         self.expect("watchpoint list -v",
             substrs = ['hit_count = 1'])
-
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/functionalities/watchpoint/watchpoint_commands/command/TestWatchpointCommandLLDB.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/watchpoint/watchpoint_commands/command/TestWatchpointCommandLLDB.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/functionalities/watchpoint/watchpoint_commands/command/TestWatchpointCommandLLDB.py (original)
+++ lldb/trunk/test/functionalities/watchpoint/watchpoint_commands/command/TestWatchpointCommandLLDB.py Thu Oct 22 15:06:20 2015
@@ -2,8 +2,9 @@
 Test 'watchpoint command'.
 """
 
+import lldb_shared
+
 import os, time
-import unittest2
 import lldb
 from lldbtest import *
 import lldbutil
@@ -134,10 +135,3 @@ class WatchpointLLDBCommandTestCase(Test
         # be 'exited'.
         self.expect("process status",
             substrs = ['exited'])
-
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/functionalities/watchpoint/watchpoint_commands/command/TestWatchpointCommandPython.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/watchpoint/watchpoint_commands/command/TestWatchpointCommandPython.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/functionalities/watchpoint/watchpoint_commands/command/TestWatchpointCommandPython.py (original)
+++ lldb/trunk/test/functionalities/watchpoint/watchpoint_commands/command/TestWatchpointCommandPython.py Thu Oct 22 15:06:20 2015
@@ -2,8 +2,9 @@
 Test 'watchpoint command'.
 """
 
+import lldb_shared
+
 import os, time
-import unittest2
 import lldb
 from lldbtest import *
 import lldbutil
@@ -82,10 +83,3 @@ class WatchpointPythonCommandTestCase(Te
         # The watchpoint command "forced" our global variable 'cookie' to become 777.
         self.expect("frame variable --show-globals cookie",
             substrs = ['(int32_t)', 'cookie = 777'])
-
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/functionalities/watchpoint/watchpoint_commands/condition/TestWatchpointConditionCmd.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/watchpoint/watchpoint_commands/condition/TestWatchpointConditionCmd.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/functionalities/watchpoint/watchpoint_commands/condition/TestWatchpointConditionCmd.py (original)
+++ lldb/trunk/test/functionalities/watchpoint/watchpoint_commands/condition/TestWatchpointConditionCmd.py Thu Oct 22 15:06:20 2015
@@ -2,8 +2,9 @@
 Test watchpoint modify command to set condition on a watchpoint.
 """
 
+import lldb_shared
+
 import os, time
-import unittest2
 import lldb
 from lldbtest import *
 import lldbutil
@@ -73,10 +74,3 @@ class WatchpointConditionCmdTestCase(Tes
         # The hit count should now be 2.
         self.expect("watchpoint list -v",
             substrs = ['hit_count = 5'])
-
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/functionalities/watchpoint/watchpoint_events/TestWatchpointEvents.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/watchpoint/watchpoint_events/TestWatchpointEvents.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/functionalities/watchpoint/watchpoint_events/TestWatchpointEvents.py (original)
+++ lldb/trunk/test/functionalities/watchpoint/watchpoint_events/TestWatchpointEvents.py Thu Oct 22 15:06:20 2015
@@ -1,7 +1,8 @@
 """Test that adding, deleting and modifying watchpoints sends the appropriate events."""
 
+import lldb_shared
+
 import os, time
-import unittest2
 import lldb
 import lldbutil
 from lldbtest import *
@@ -84,9 +85,3 @@ class TestWatchpointEvents (TestBase):
             print "Found an event I didn't expect: ", event
 
         self.assertTrue (not found_event, "Only one event per change.")
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/functionalities/watchpoint/watchpoint_on_vectors/TestValueOfVectorVariable.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/watchpoint/watchpoint_on_vectors/TestValueOfVectorVariable.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/functionalities/watchpoint/watchpoint_on_vectors/TestValueOfVectorVariable.py (original)
+++ lldb/trunk/test/functionalities/watchpoint/watchpoint_on_vectors/TestValueOfVectorVariable.py Thu Oct 22 15:06:20 2015
@@ -2,8 +2,9 @@
 Test displayed value of a vector variable while doing watchpoint operations
 """
 
+import lldb_shared
+
 import os, time
-import unittest2
 import lldb
 from lldbtest import *
 import lldbutil
@@ -42,9 +43,3 @@ class TestValueOfVectorVariableTestCase(
         # Value of a vector variable should be displayed correctly
         self.expect("watchpoint set variable global_vector", WATCHPOINT_CREATED,
             substrs = ['new value: (1, 2, 3, 4)'])
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/functionalities/watchpoint/watchpoint_set_command/TestWatchLocationWithWatchSet.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/watchpoint/watchpoint_set_command/TestWatchLocationWithWatchSet.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/functionalities/watchpoint/watchpoint_set_command/TestWatchLocationWithWatchSet.py (original)
+++ lldb/trunk/test/functionalities/watchpoint/watchpoint_set_command/TestWatchLocationWithWatchSet.py Thu Oct 22 15:06:20 2015
@@ -2,8 +2,9 @@
 Test lldb watchpoint that uses 'watchpoint set -w write -s size' to watch a pointed location with size.
 """
 
+import lldb_shared
+
 import os, time
-import unittest2
 import lldb
 from lldbtest import *
 import lldbutil
@@ -82,10 +83,3 @@ class WatchLocationUsingWatchpointSetTes
             substrs = ['hit_count = 1'])
 
         self.runCmd("thread backtrace all")
-
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/functionalities/watchpoint/watchpoint_set_command/TestWatchpointSetErrorCases.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/watchpoint/watchpoint_set_command/TestWatchpointSetErrorCases.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/functionalities/watchpoint/watchpoint_set_command/TestWatchpointSetErrorCases.py (original)
+++ lldb/trunk/test/functionalities/watchpoint/watchpoint_set_command/TestWatchpointSetErrorCases.py Thu Oct 22 15:06:20 2015
@@ -2,8 +2,9 @@
 Test error cases for the 'watchpoint set' command to make sure it errors out when necessary.
 """
 
+import lldb_shared
+
 import os, time
-import unittest2
 import lldb
 from lldbtest import *
 import lldbutil
@@ -62,10 +63,3 @@ class WatchpointSetErrorTestCase(TestBas
         # Wrong size parameter is an error.
         self.expect("watchpoint set variable -s -128", error=True,
             substrs = ['invalid enumeration value'])
-
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/help/TestHelp.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/help/TestHelp.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/help/TestHelp.py (original)
+++ lldb/trunk/test/help/TestHelp.py Thu Oct 22 15:06:20 2015
@@ -4,8 +4,9 @@ Test some lldb help commands.
 See also CommandInterpreter::OutputFormattedHelpText().
 """
 
+import lldb_shared
+
 import os, time
-import unittest2
 import lldb
 from lldbtest import *
 
@@ -160,10 +161,3 @@ class HelpCommandTestCase(TestBase):
             substrs = ['The following subcommands are supported:'],
             patterns = ['expression +--',
                         'variable +--'])
-
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/lang/c/anonymous/TestAnonymous.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/lang/c/anonymous/TestAnonymous.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/lang/c/anonymous/TestAnonymous.py (original)
+++ lldb/trunk/test/lang/c/anonymous/TestAnonymous.py Thu Oct 22 15:06:20 2015
@@ -1,7 +1,8 @@
 """Test that anonymous structs/unions are transparent to member access"""
 
+import lldb_shared
+
 import os, time
-import unittest2
 import lldb
 from lldbtest import *
 import lldbutil
@@ -142,9 +143,3 @@ class AnonymousTestCase(TestBase):
         # The breakpoint should have a hit count of 1.
         self.expect("breakpoint list -f", BREAKPOINT_HIT_ONCE,
             substrs = [' resolved, hit count = 1'])
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/lang/c/array_types/TestArrayTypes.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/lang/c/array_types/TestArrayTypes.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/lang/c/array_types/TestArrayTypes.py (original)
+++ lldb/trunk/test/lang/c/array_types/TestArrayTypes.py Thu Oct 22 15:06:20 2015
@@ -1,7 +1,8 @@
 """Test breakpoint by file/line number; and list variables with array types."""
 
+import lldb_shared
+
 import os, time
-import unittest2
 import lldb
 from lldbtest import *
 import lldbutil
@@ -193,10 +194,3 @@ class ArrayTypesTestCase(TestBase):
         self.assertTrue(argc.GetValueType() == lldb.eValueTypeVariableArgument,
                         "Variable 'argc' should have '%s' value type." %
                         value_type_to_str(lldb.eValueTypeVariableArgument))
-
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/lang/c/bitfields/TestBitfields.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/lang/c/bitfields/TestBitfields.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/lang/c/bitfields/TestBitfields.py (original)
+++ lldb/trunk/test/lang/c/bitfields/TestBitfields.py Thu Oct 22 15:06:20 2015
@@ -1,7 +1,8 @@
 """Show bitfields and check that they display correctly."""
 
+import lldb_shared
+
 import os, time
-import unittest2
 import lldb
 from lldbtest import *
 import lldbutil
@@ -157,10 +158,3 @@ class BitfieldsTestCase(TestBase):
         # Now kill the process, and we are done.
         rc = target.GetProcess().Kill()
         self.assertTrue(rc.Success())
-
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/lang/c/blocks/TestBlocks.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/lang/c/blocks/TestBlocks.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/lang/c/blocks/TestBlocks.py (original)
+++ lldb/trunk/test/lang/c/blocks/TestBlocks.py Thu Oct 22 15:06:20 2015
@@ -1,7 +1,9 @@
 """Test that lldb can invoke blocks and access variables inside them"""
 
-import os, time
+import lldb_shared
+
 import unittest2
+import os, time
 import lldb
 from lldbtest import *
 import lldbutil
@@ -55,9 +57,3 @@ class BlocksTestCase(TestBase):
         self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
             substrs = ['stopped',
                        'stop reason = breakpoint'])
-            
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/lang/c/const_variables/TestConstVariables.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/lang/c/const_variables/TestConstVariables.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/lang/c/const_variables/TestConstVariables.py (original)
+++ lldb/trunk/test/lang/c/const_variables/TestConstVariables.py Thu Oct 22 15:06:20 2015
@@ -1,7 +1,8 @@
 """Check that compiler-generated constant values work correctly"""
 
+import lldb_shared
+
 import os, time
-import unittest2
 import lldb
 from lldbtest import *
 import lldbutil
@@ -57,9 +58,3 @@ class ConstVariableTestCase(TestBase):
             substrs = ['(int) $1 = 256'])
 
         self.runCmd("kill")
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/lang/c/enum_types/TestEnumTypes.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/lang/c/enum_types/TestEnumTypes.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/lang/c/enum_types/TestEnumTypes.py (original)
+++ lldb/trunk/test/lang/c/enum_types/TestEnumTypes.py Thu Oct 22 15:06:20 2015
@@ -1,7 +1,8 @@
 """Look up enum type information and check for correct display."""
 
+import lldb_shared
+
 import os, time
-import unittest2
 import lldb
 from lldbtest import *
 import lldbutil
@@ -66,9 +67,3 @@ class EnumTypesTestCase(TestBase):
             self.expect("frame variable day", 'check for valid enumeration value',
                 substrs = [enum_value])
             lldbutil.continue_to_breakpoint (self.process(), bkpt)
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/lang/c/forward/TestForwardDeclaration.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/lang/c/forward/TestForwardDeclaration.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/lang/c/forward/TestForwardDeclaration.py (original)
+++ lldb/trunk/test/lang/c/forward/TestForwardDeclaration.py Thu Oct 22 15:06:20 2015
@@ -1,7 +1,8 @@
 """Test that forward declaration of a data structure gets resolved correctly."""
 
+import lldb_shared
+
 import os, time
-import unittest2
 import lldb
 from lldbtest import *
 import lldbutil
@@ -42,10 +43,3 @@ class ForwardDeclarationTestCase(TestBas
             substrs = ['(bar)',
                        '(int) a = 1',
                        '(int) b = 2'])
-
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/lang/c/function_types/TestFunctionTypes.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/lang/c/function_types/TestFunctionTypes.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/lang/c/function_types/TestFunctionTypes.py (original)
+++ lldb/trunk/test/lang/c/function_types/TestFunctionTypes.py Thu Oct 22 15:06:20 2015
@@ -1,7 +1,8 @@
 """Test variable with function ptr type and that break on the function works."""
 
+import lldb_shared
+
 import os, time
-import unittest2
 import lldb
 from lldbtest import *
 import lldbutil
@@ -71,9 +72,3 @@ class FunctionTypesTestCase(TestBase):
         # The breakpoint should have a hit count of 1.
         self.expect("breakpoint list -f", BREAKPOINT_HIT_ONCE,
                     substrs = [' resolved, hit count = 1'])
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/lang/c/global_variables/TestGlobalVariables.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/lang/c/global_variables/TestGlobalVariables.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/lang/c/global_variables/TestGlobalVariables.py (original)
+++ lldb/trunk/test/lang/c/global_variables/TestGlobalVariables.py Thu Oct 22 15:06:20 2015
@@ -1,7 +1,8 @@
 """Show global variables and check that they do indeed have global scopes."""
 
+import lldb_shared
+
 import os, time
-import unittest2
 import lldb
 from lldbtest import *
 import lldbutil
@@ -72,10 +73,3 @@ class GlobalVariablesTestCase(TestBase):
                     substrs = ['g_marked_spot.y', '21'])
         self.expect("target variable g_marked_spot.y", VARIABLES_DISPLAYED_CORRECTLY, matching=False,
                     substrs = ["can't be resolved"])
-
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/lang/c/modules/TestCModules.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/lang/c/modules/TestCModules.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/lang/c/modules/TestCModules.py (original)
+++ lldb/trunk/test/lang/c/modules/TestCModules.py Thu Oct 22 15:06:20 2015
@@ -1,7 +1,8 @@
 """Test that importing modules in C works as expected."""
 
+import lldb_shared
+
 import os, time
-import unittest2
 import lldb
 import platform
 import lldbutil
@@ -60,9 +61,3 @@ class CModulesTestCase(TestBase):
         TestBase.setUp(self)
         # Find the line number to break inside main().
         self.line = line_number('main.c', '// Set breakpoint 0 here.')
-            
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/lang/c/register_variables/TestRegisterVariables.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/lang/c/register_variables/TestRegisterVariables.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/lang/c/register_variables/TestRegisterVariables.py (original)
+++ lldb/trunk/test/lang/c/register_variables/TestRegisterVariables.py Thu Oct 22 15:06:20 2015
@@ -1,7 +1,8 @@
 """Check that compiler-generated register values work correctly"""
 
+import lldb_shared
+
 import os, time
-import unittest2
 import lldb
 from lldbtest import *
 import lldbutil
@@ -65,9 +66,3 @@ class RegisterVariableTestCase(TestBase)
             substrs = ['(int) $3 = 5'])
 
         self.runCmd("kill")
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/lang/c/set_values/TestSetValues.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/lang/c/set_values/TestSetValues.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/lang/c/set_values/TestSetValues.py (original)
+++ lldb/trunk/test/lang/c/set_values/TestSetValues.py Thu Oct 22 15:06:20 2015
@@ -1,7 +1,8 @@
 """Test settings and readings of program variables."""
 
+import lldb_shared
+
 import os, time
-import unittest2
 import lldb
 from lldbtest import *
 import lldbutil
@@ -106,10 +107,3 @@ class SetValuesTestCase(TestBase):
         self.runCmd("expression i = 1.5")
         self.expect("frame variable --show-types", VARIABLES_DISPLAYED_CORRECTLY,
             startstr = "(long double) i = 1.5")
-
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/lang/c/shared_lib/TestSharedLib.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/lang/c/shared_lib/TestSharedLib.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/lang/c/shared_lib/TestSharedLib.py (original)
+++ lldb/trunk/test/lang/c/shared_lib/TestSharedLib.py Thu Oct 22 15:06:20 2015
@@ -1,5 +1,7 @@
 """Test that types defined in shared libraries work correctly."""
 
+import lldb_shared
+
 import unittest2
 import lldb
 from lldbtest import *
@@ -65,9 +67,3 @@ class SharedLibTestCase(TestBase):
         # The breakpoint should have a hit count of 1.
         self.expect("breakpoint list -f", BREAKPOINT_HIT_ONCE,
             substrs = [' resolved, hit count = 1'])
-                       
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/lang/c/shared_lib_stripped_symbols/TestSharedLibStrippedSymbols.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/lang/c/shared_lib_stripped_symbols/TestSharedLibStrippedSymbols.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/lang/c/shared_lib_stripped_symbols/TestSharedLibStrippedSymbols.py (original)
+++ lldb/trunk/test/lang/c/shared_lib_stripped_symbols/TestSharedLibStrippedSymbols.py Thu Oct 22 15:06:20 2015
@@ -1,5 +1,7 @@
 """Test that types defined in shared libraries with stripped symbols work correctly."""
 
+import lldb_shared
+
 import unittest2
 import lldb
 from lldbtest import *
@@ -67,9 +69,3 @@ class SharedLibStrippedTestCase(TestBase
         # The breakpoint should have a hit count of 1.
         self.expect("breakpoint list -f", BREAKPOINT_HIT_ONCE,
             substrs = [' resolved, hit count = 1'])
-                       
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/lang/c/stepping/TestStepAndBreakpoints.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/lang/c/stepping/TestStepAndBreakpoints.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/lang/c/stepping/TestStepAndBreakpoints.py (original)
+++ lldb/trunk/test/lang/c/stepping/TestStepAndBreakpoints.py Thu Oct 22 15:06:20 2015
@@ -1,7 +1,8 @@
 """Test stepping over vrs. hitting breakpoints & subsequent stepping in various forms."""
 
+import lldb_shared
+
 import os, time
-import unittest2
 import lldb
 import lldbutil
 from lldbtest import *
@@ -237,9 +238,3 @@ class TestCStepping(TestBase):
 
         thread.StepInto("NoSuchFunction")
         self.assertTrue (thread.GetFrameAtIndex(0).GetFunctionName() == "main")
-        
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/lang/c/stepping/TestThreadStepping.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/lang/c/stepping/TestThreadStepping.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/lang/c/stepping/TestThreadStepping.py (original)
+++ lldb/trunk/test/lang/c/stepping/TestThreadStepping.py Thu Oct 22 15:06:20 2015
@@ -2,9 +2,10 @@
 Test thread stepping features in combination with frame select.
 """
 
+import lldb_shared
+
 import os, time
 import re
-import unittest2
 import lldb, lldbutil
 from lldbtest import *
 import lldbutil
@@ -75,10 +76,3 @@ class ThreadSteppingTestCase(TestBase):
         self.expect("thread backtrace", STEP_OUT_SUCCEEDED,
             substrs = ["stop reason = step out"],
             patterns = ["frame #0.*main.c:%d" % self.line4])
-        
-        
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/lang/c/strings/TestCStrings.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/lang/c/strings/TestCStrings.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/lang/c/strings/TestCStrings.py (original)
+++ lldb/trunk/test/lang/c/strings/TestCStrings.py Thu Oct 22 15:06:20 2015
@@ -52,9 +52,3 @@ class CStringsTestCase(TestBase):
 
         self.expect("expression !z",
                     substrs = ['false'])
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/lang/c/tls_globals/TestTlsGlobals.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/lang/c/tls_globals/TestTlsGlobals.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/lang/c/tls_globals/TestTlsGlobals.py (original)
+++ lldb/trunk/test/lang/c/tls_globals/TestTlsGlobals.py Thu Oct 22 15:06:20 2015
@@ -1,7 +1,9 @@
 """Test that thread-local storage can be read correctly."""
 
-import os, time
+import lldb_shared
+
 import unittest2
+import os, time
 import lldb
 from lldbtest import *
 import lldbutil
@@ -69,9 +71,3 @@ class TlsGlobalTestCase(TestBase):
             patterns = ["\(int\) \$.* = 44"])
         self.expect("expr var_shared", VARIABLES_DISPLAYED_CORRECTLY,
             patterns = ["\(int\) \$.* = 33"])
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/lang/c/typedef/Testtypedef.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/lang/c/typedef/Testtypedef.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/lang/c/typedef/Testtypedef.py (original)
+++ lldb/trunk/test/lang/c/typedef/Testtypedef.py Thu Oct 22 15:06:20 2015
@@ -1,7 +1,8 @@
 """Look up type information for typedefs of same name at different lexical scope and check for correct display."""
 
+import lldb_shared
+
 import os, time
-import unittest2
 import lldb
 from lldbtest import *
 import lldbutil
@@ -43,9 +44,3 @@ class TypedefTestCase(TestBase):
             self.expect("image lookup -t a", DATA_TYPES_DISPLAYED_CORRECTLY,
             substrs = ['name = "' + t + '"'])
             self.runCmd("continue")
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/lang/cpp/bool/TestCPPBool.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/lang/cpp/bool/TestCPPBool.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/lang/cpp/bool/TestCPPBool.py (original)
+++ lldb/trunk/test/lang/cpp/bool/TestCPPBool.py Thu Oct 22 15:06:20 2015
@@ -24,9 +24,3 @@ class CPPBoolTestCase(TestBase):
 
         self.expect("expression -- my_bool = true",
                     startstr = "(bool) $1 = true")
-        
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/lang/cpp/breakpoint-commands/TestCPPBreakpointCommands.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/lang/cpp/breakpoint-commands/TestCPPBreakpointCommands.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/lang/cpp/breakpoint-commands/TestCPPBreakpointCommands.py (original)
+++ lldb/trunk/test/lang/cpp/breakpoint-commands/TestCPPBreakpointCommands.py Thu Oct 22 15:06:20 2015
@@ -2,8 +2,9 @@
 Test lldb breakpoint command for CPP methods & functions in a namespace.
 """
 
+import lldb_shared
+
 import os, time
-import unittest2
 import lldb
 from lldbtest import *
 
@@ -79,11 +80,3 @@ class CPPBreakpointCommandsTestCase(Test
                                                             a_out_module,
                                                             nested_comp_unit)
         self.assertTrue (plain_method_break.GetNumLocations() == 1)
-
-        
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/lang/cpp/call-function/TestCallCPPFunction.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/lang/cpp/call-function/TestCallCPPFunction.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/lang/cpp/call-function/TestCallCPPFunction.py (original)
+++ lldb/trunk/test/lang/cpp/call-function/TestCallCPPFunction.py Thu Oct 22 15:06:20 2015
@@ -31,9 +31,3 @@ class CallCPPFunctionTestCase(TestBase):
 
         self.expect("expression -- a_function_to_call()",
                     startstr = "(int) $0 = 0")
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/lang/cpp/chained-calls/TestCppChainedCalls.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/lang/cpp/chained-calls/TestCppChainedCalls.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/lang/cpp/chained-calls/TestCppChainedCalls.py (original)
+++ lldb/trunk/test/lang/cpp/chained-calls/TestCppChainedCalls.py Thu Oct 22 15:06:20 2015
@@ -71,9 +71,3 @@ class TestCppChainedCalls(TestBase):
 
         test_result = frame.EvaluateExpression("get(t) && get(t)")
         self.assertTrue(test_result.IsValid() and test_result.GetValue() == "true", "get(t) && get(t) = true")
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/lang/cpp/char1632_t/TestChar1632T.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/lang/cpp/char1632_t/TestChar1632T.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/lang/cpp/char1632_t/TestChar1632T.py (original)
+++ lldb/trunk/test/lang/cpp/char1632_t/TestChar1632T.py Thu Oct 22 15:06:20 2015
@@ -3,8 +3,9 @@
 Test that the C++11 support for char16_t and char32_t works correctly.
 """
 
+import lldb_shared
+
 import os, time
-import unittest2
 import lldb
 from lldbtest import *
 import lldbutil
@@ -85,9 +86,3 @@ class Char1632TestCase(TestBase):
         # Check that we can run expressions that return charN_t
         self.expect("expression u'a'",substrs = ['(char16_t) $',"61 u'a'"])
         self.expect("expression U'a'",substrs = ['(char32_t) $',"61 U'a'"])
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/lang/cpp/class_static/TestStaticVariables.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/lang/cpp/class_static/TestStaticVariables.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/lang/cpp/class_static/TestStaticVariables.py (original)
+++ lldb/trunk/test/lang/cpp/class_static/TestStaticVariables.py Thu Oct 22 15:06:20 2015
@@ -2,8 +2,9 @@
 Test display and Python APIs on file and class static variables.
 """
 
+import lldb_shared
+
 import os, time
-import unittest2
 import lldb
 from lldbtest import *
 import lldbutil
@@ -115,10 +116,3 @@ class StaticVariableTestCase(TestBase):
         val = frame.FindValue("hello_world", lldb.eValueTypeVariableLocal)
         self.DebugSBValue(val)
         self.assertTrue(val.GetName() == 'hello_world')
-
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/lang/cpp/class_types/TestClassTypes.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/lang/cpp/class_types/TestClassTypes.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/lang/cpp/class_types/TestClassTypes.py (original)
+++ lldb/trunk/test/lang/cpp/class_types/TestClassTypes.py Thu Oct 22 15:06:20 2015
@@ -1,7 +1,8 @@
 """Test breakpoint on a class constructor; and variable list the this object."""
 
+import lldb_shared
+
 import os, time
-import unittest2
 import lldb
 import lldbutil
 from lldbtest import *
@@ -210,9 +211,3 @@ class ClassTypesTestCase(TestBase):
         self.assertTrue (frame.IsValid(), "Got a valid frame.")
 
         self.assertTrue ("C::C" in frame.name, "Constructor name includes class name.")
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/lang/cpp/class_types/TestClassTypesDisassembly.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/lang/cpp/class_types/TestClassTypesDisassembly.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/lang/cpp/class_types/TestClassTypesDisassembly.py (original)
+++ lldb/trunk/test/lang/cpp/class_types/TestClassTypesDisassembly.py Thu Oct 22 15:06:20 2015
@@ -2,8 +2,9 @@
 Test the lldb disassemble command on each call frame when stopped on C's ctor.
 """
 
+import lldb_shared
+
 import os, time
-import unittest2
 import lldb
 from lldbtest import *
 import lldbutil
@@ -89,9 +90,3 @@ class IterateFrameAndDisassembleTestCase
         # We should be stopped on the ctor function of class C.
         # self.expect("thread backtrace", BACKTRACE_DISPLAYED_CORRECTLY,
         #  substrs = ['C::C'])
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/lang/cpp/diamond/TestDiamond.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/lang/cpp/diamond/TestDiamond.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/lang/cpp/diamond/TestDiamond.py (original)
+++ lldb/trunk/test/lang/cpp/diamond/TestDiamond.py Thu Oct 22 15:06:20 2015
@@ -39,9 +39,3 @@ class CPPTestDiamondInheritance(TestBase
         # Some compilers (for example GCC 4.4.7 and 4.6.1) emit multiple locations for the statement with the ternary
         # operator in the test program, while others emit only 1.
         lldbutil.run_break_set_by_file_and_line (self, "main.cpp", line, num_expected_locations=-1, loc_exact=False)
-        
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/lang/cpp/dynamic-value/TestCppValueCast.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/lang/cpp/dynamic-value/TestCppValueCast.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/lang/cpp/dynamic-value/TestCppValueCast.py (original)
+++ lldb/trunk/test/lang/cpp/dynamic-value/TestCppValueCast.py Thu Oct 22 15:06:20 2015
@@ -2,9 +2,11 @@
 Test lldb Python API SBValue::Cast(SBType) for C++ types.
 """
 
+import lldb_shared
+
+import unittest2
 import os, time
 import re
-import unittest2
 import lldb, lldbutil
 from lldbtest import *
 
@@ -122,10 +124,3 @@ class CppValueCastTestCase(TestBase):
         b_member_val = instanceB.GetChildMemberWithName('m_b_val')
         self.DebugSBValue(b_member_val)
         self.assertTrue(b_member_val.GetValueAsUnsigned(error, 0) == 36)
-
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/lang/cpp/dynamic-value/TestDynamicValue.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/lang/cpp/dynamic-value/TestDynamicValue.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/lang/cpp/dynamic-value/TestDynamicValue.py (original)
+++ lldb/trunk/test/lang/cpp/dynamic-value/TestDynamicValue.py Thu Oct 22 15:06:20 2015
@@ -2,9 +2,10 @@
 Use lldb Python API to test dynamic values in C++
 """
 
+import lldb_shared
+
 import os, time
 import re
-import unittest2
 import lldb, lldbutil
 from lldbtest import *
 
@@ -217,10 +218,3 @@ class DynamicValueTestCase(TestBase):
         contained_b_static_addr = int (contained_b_static.GetValue(), 16)
         
         self.assertTrue (contained_b_addr < contained_b_static_addr)
-
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/lang/cpp/enum_types/TestCPP11EnumTypes.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/lang/cpp/enum_types/TestCPP11EnumTypes.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/lang/cpp/enum_types/TestCPP11EnumTypes.py (original)
+++ lldb/trunk/test/lang/cpp/enum_types/TestCPP11EnumTypes.py Thu Oct 22 15:06:20 2015
@@ -1,7 +1,8 @@
 """Look up enum type information and check for correct display."""
 
+import lldb_shared
+
 import os, time
-import unittest2
 import lldb
 from lldbtest import *
 import lldbutil
@@ -105,8 +106,3 @@ class CPP11EnumTypesTestCase(TestBase):
             self.expect("frame variable day", 'check for valid enumeration value',
                 substrs = [enum_value])
             lldbutil.continue_to_breakpoint (self.process(), bkpt)
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/lang/cpp/exceptions/TestCPPExceptionBreakpoints.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/lang/cpp/exceptions/TestCPPExceptionBreakpoints.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/lang/cpp/exceptions/TestCPPExceptionBreakpoints.py (original)
+++ lldb/trunk/test/lang/cpp/exceptions/TestCPPExceptionBreakpoints.py Thu Oct 22 15:06:20 2015
@@ -2,8 +2,9 @@
 Test lldb exception breakpoint command for CPP.
 """
 
+import lldb_shared
+
 import os, time
-import unittest2
 import lldb
 import lldbutil
 from lldbtest import *
@@ -60,10 +61,3 @@ class CPPBreakpointTestCase(TestBase):
         self.assertTrue (frame_functions.count ("throws_exception_on_even(int)") == 0, "At catch our throw function is off the stack")
         self.assertTrue (frame_functions.count ("intervening_function(int)") == 0,     "At catch our intervening function is off the stack")
         self.assertTrue (frame_functions.count ("catches_exception(int)") == 1, "At catch our catch function is on the stack")
-
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/lang/cpp/global_operators/TestCppGlobalOperators.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/lang/cpp/global_operators/TestCppGlobalOperators.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/lang/cpp/global_operators/TestCppGlobalOperators.py (original)
+++ lldb/trunk/test/lang/cpp/global_operators/TestCppGlobalOperators.py Thu Oct 22 15:06:20 2015
@@ -52,10 +52,3 @@ class TestCppGlobalOperators(TestBase):
 
         test_result = frame.EvaluateExpression("operator==(s2, s3)")
         self.assertTrue(test_result.IsValid() and test_result.GetValue() == "false", "operator==(s2, s3) = false")
-
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/lang/cpp/incomplete-types/TestCppIncompleteTypes.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/lang/cpp/incomplete-types/TestCppIncompleteTypes.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/lang/cpp/incomplete-types/TestCppIncompleteTypes.py (original)
+++ lldb/trunk/test/lang/cpp/incomplete-types/TestCppIncompleteTypes.py Thu Oct 22 15:06:20 2015
@@ -63,9 +63,3 @@ class TestCppIncompleteTypes(TestBase):
 
         # Get frame for current thread
         return thread.GetSelectedFrame()
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/lang/cpp/namespace/TestNamespace.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/lang/cpp/namespace/TestNamespace.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/lang/cpp/namespace/TestNamespace.py (original)
+++ lldb/trunk/test/lang/cpp/namespace/TestNamespace.py Thu Oct 22 15:06:20 2015
@@ -2,8 +2,9 @@
 Test the printing of anonymous and named namespace variables.
 """
 
+import lldb_shared
+
 import os, time
-import unittest2
 import lldb
 from lldbtest import *
 import lldbutil
@@ -106,9 +107,3 @@ class NamespaceTestCase(TestBase):
 
         self.expect("p variadic_sum",
             patterns = ['\(anonymous namespace\)::variadic_sum\(int, ...\)'])
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/lang/cpp/nsimport/TestCppNsImport.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/lang/cpp/nsimport/TestCppNsImport.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/lang/cpp/nsimport/TestCppNsImport.py (original)
+++ lldb/trunk/test/lang/cpp/nsimport/TestCppNsImport.py Thu Oct 22 15:06:20 2015
@@ -98,10 +98,3 @@ class TestCppNsImport(TestBase):
         # Test function inside namespace
         test_result = frame.EvaluateExpression("fun_var")
         self.assertTrue(test_result.IsValid() and test_result.GetValueAsSigned() == 5, "fun_var = 5")
-        
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/lang/cpp/overloaded-functions/TestOverloadedFunctions.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/lang/cpp/overloaded-functions/TestOverloadedFunctions.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/lang/cpp/overloaded-functions/TestOverloadedFunctions.py (original)
+++ lldb/trunk/test/lang/cpp/overloaded-functions/TestOverloadedFunctions.py Thu Oct 22 15:06:20 2015
@@ -34,9 +34,3 @@ class CPPStaticMethodsTestCase(TestBase)
 
         self.expect("expression -- Static()",
                     startstr = "(int) $1 = 1")
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/lang/cpp/rdar12991846/TestRdar12991846.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/lang/cpp/rdar12991846/TestRdar12991846.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/lang/cpp/rdar12991846/TestRdar12991846.py (original)
+++ lldb/trunk/test/lang/cpp/rdar12991846/TestRdar12991846.py Thu Oct 22 15:06:20 2015
@@ -3,8 +3,10 @@
 Test that the expression parser returns proper Unicode strings.
 """
 
-import os, time
+import lldb_shared
+
 import unittest2
+import os, time
 import lldb
 from lldbtest import *
 import lldbutil
@@ -79,9 +81,3 @@ class Rdar12991846TestCase(TestBase):
         if expr == 2: self.expect('expression u"hello"', substrs = ['hello'])
 
         if expr == 3: self.expect('expression U"hello"', substrs = ['hello'])
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/lang/cpp/rvalue-references/TestRvalueReferences.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/lang/cpp/rvalue-references/TestRvalueReferences.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/lang/cpp/rvalue-references/TestRvalueReferences.py (original)
+++ lldb/trunk/test/lang/cpp/rvalue-references/TestRvalueReferences.py Thu Oct 22 15:06:20 2015
@@ -47,9 +47,3 @@ class RvalueReferencesTestCase(TestBase)
 
     def set_breakpoint(self, line):
         lldbutil.run_break_set_by_file_and_line (self, "main.cpp", line, num_expected_locations=1, loc_exact=True)
-        
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/lang/cpp/scope/TestCppScope.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/lang/cpp/scope/TestCppScope.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/lang/cpp/scope/TestCppScope.py (original)
+++ lldb/trunk/test/lang/cpp/scope/TestCppScope.py Thu Oct 22 15:06:20 2015
@@ -65,9 +65,3 @@ class TestCppScopes(TestBase):
             value = frame.EvaluateExpression(name)
             assert_value = global_variables_assert[name]
             self.assertTrue(value.IsValid() and value.GetValueAsSigned() == assert_value, name + " = " + str(assert_value))
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/lang/cpp/signed_types/TestSignedTypes.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/lang/cpp/signed_types/TestSignedTypes.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/lang/cpp/signed_types/TestSignedTypes.py (original)
+++ lldb/trunk/test/lang/cpp/signed_types/TestSignedTypes.py Thu Oct 22 15:06:20 2015
@@ -2,9 +2,10 @@
 Test that variables with signed types display correctly.
 """
 
+import lldb_shared
+
 import os, time
 import re
-import unittest2
 import lldb
 from lldbtest import *
 import lldbutil
@@ -55,10 +56,3 @@ class UnsignedTypesTestCase(TestBase):
             substrs = ["(int) the_signed_int = 99",
                        "(long) the_signed_long = 99",
                        "(long long) the_signed_long_long = 99"])
-
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/lang/cpp/static_members/TestCPPStaticMembers.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/lang/cpp/static_members/TestCPPStaticMembers.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/lang/cpp/static_members/TestCPPStaticMembers.py (original)
+++ lldb/trunk/test/lang/cpp/static_members/TestCPPStaticMembers.py Thu Oct 22 15:06:20 2015
@@ -1,6 +1,10 @@
 """
 Tests that C++ member and static variables have correct layout and scope.
 """
+
+import lldb_shared
+
+import unittest2
 import lldb
 from lldbtest import *
 import lldbutil
@@ -51,10 +55,3 @@ class CPPStaticMembersTestCase(TestBase)
 
     def set_breakpoint(self, line):
         lldbutil.run_break_set_by_file_and_line (self, "main.cpp", line, num_expected_locations=1, loc_exact=False)
-
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/lang/cpp/static_methods/TestCPPStaticMethods.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/lang/cpp/static_methods/TestCPPStaticMethods.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/lang/cpp/static_methods/TestCPPStaticMethods.py (original)
+++ lldb/trunk/test/lang/cpp/static_methods/TestCPPStaticMethods.py Thu Oct 22 15:06:20 2015
@@ -34,9 +34,3 @@ class CPPStaticMethodsTestCase(TestBase)
 
         self.expect("expression -- my_a.getMemberValue()",
                     startstr = "(int) $1 = 3")
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/lang/cpp/stl/TestSTL.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/lang/cpp/stl/TestSTL.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/lang/cpp/stl/TestSTL.py (original)
+++ lldb/trunk/test/lang/cpp/stl/TestSTL.py Thu Oct 22 15:06:20 2015
@@ -2,8 +2,10 @@
 Test some expressions involving STL data types.
 """
 
-import os, time
+import lldb_shared
+
 import unittest2
+import os, time
 import lldb
 import lldbutil
 from lldbtest import *
@@ -112,10 +114,3 @@ class STLTestCase(TestBase):
 
         # Check that both entries of the dictionary have 'True' as the value.
         self.assertTrue(all(expected_types.values()))
-
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/lang/cpp/stl/TestStdCXXDisassembly.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/lang/cpp/stl/TestStdCXXDisassembly.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/lang/cpp/stl/TestStdCXXDisassembly.py (original)
+++ lldb/trunk/test/lang/cpp/stl/TestStdCXXDisassembly.py Thu Oct 22 15:06:20 2015
@@ -2,8 +2,10 @@
 Test the lldb disassemble command on lib stdc++.
 """
 
-import os, time
+import lldb_shared
+
 import unittest2
+import os, time
 import lldb
 from lldbtest import *
 import lldbutil
@@ -104,10 +106,3 @@ class StdCXXDisassembleTestCase(TestBase
             else:
                 # This entry is not a Code entry.  Reset SA = None.
                 SA = None
-
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/lang/cpp/this/TestCPPThis.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/lang/cpp/this/TestCPPThis.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/lang/cpp/this/TestCPPThis.py (original)
+++ lldb/trunk/test/lang/cpp/this/TestCPPThis.py Thu Oct 22 15:06:20 2015
@@ -51,9 +51,3 @@ class CPPThisTestCase(TestBase):
     
     def set_breakpoint(self, line):
         lldbutil.run_break_set_by_file_and_line (self, "main.cpp", line, num_expected_locations=1, loc_exact=False)
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/lang/cpp/unique-types/TestUniqueTypes.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/lang/cpp/unique-types/TestUniqueTypes.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/lang/cpp/unique-types/TestUniqueTypes.py (original)
+++ lldb/trunk/test/lang/cpp/unique-types/TestUniqueTypes.py Thu Oct 22 15:06:20 2015
@@ -2,7 +2,8 @@
 Test that template instaniations of std::vector<long> and <short> in the same module have the correct types.
 """
 
-import unittest2
+import lldb_shared
+
 import lldb
 import lldbutil
 from lldbtest import *
@@ -57,10 +58,3 @@ class UniqueTypesTestCase(TestBase):
                 continue
             self.expect(x, "Expect type 'short'", exe=False,
                 substrs = ['short'])
-        
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/lang/cpp/unsigned_types/TestUnsignedTypes.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/lang/cpp/unsigned_types/TestUnsignedTypes.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/lang/cpp/unsigned_types/TestUnsignedTypes.py (original)
+++ lldb/trunk/test/lang/cpp/unsigned_types/TestUnsignedTypes.py Thu Oct 22 15:06:20 2015
@@ -2,9 +2,10 @@
 Test that variables with unsigned types display correctly.
 """
 
+import lldb_shared
+
 import os, time
 import re
-import unittest2
 import lldb
 from lldbtest import *
 import lldbutil
@@ -49,10 +50,3 @@ class UnsignedTypesTestCase(TestBase):
                        "(unsigned long) the_unsigned_long = 99",
                        "(unsigned long long) the_unsigned_long_long = 99",
                        "(uint32_t) the_uint32 = 99"])
-
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/lang/cpp/wchar_t/TestCxxWCharT.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/lang/cpp/wchar_t/TestCxxWCharT.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/lang/cpp/wchar_t/TestCxxWCharT.py (original)
+++ lldb/trunk/test/lang/cpp/wchar_t/TestCxxWCharT.py Thu Oct 22 15:06:20 2015
@@ -3,8 +3,9 @@
 Test that C++ supports wchar_t correctly.
 """
 
+import lldb_shared
+
 import os, time
-import unittest2
 import lldb
 from lldbtest import *
 import lldbutil
@@ -69,9 +70,3 @@ class CxxWCharTTestCase(TestBase):
         
         self.expect('frame variable wchar_zero', substrs=["L'\\0'"])
         self.expect('expression wchar_zero', substrs=["L'\\0'"])
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/lang/go/goroutines/TestGoroutines.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/lang/go/goroutines/TestGoroutines.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/lang/go/goroutines/TestGoroutines.py (original)
+++ lldb/trunk/test/lang/go/goroutines/TestGoroutines.py Thu Oct 22 15:06:20 2015
@@ -1,7 +1,8 @@
 """Test the Go OS Plugin."""
 
+import lldb_shared
+
 import os, time
-import unittest2
 import lldb
 import lldbutil
 from lldbtest import *
@@ -80,10 +81,3 @@ class TestGoASTContext(TestBase):
         self.dbg.HandleCommand("settings set plugin.os.goroutines.enable false")
         self.thread().StepInstruction(False)
         self.assertLess(len(self.process().threads), 20)
-        
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/lang/go/types/TestGoASTContext.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/lang/go/types/TestGoASTContext.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/lang/go/types/TestGoASTContext.py (original)
+++ lldb/trunk/test/lang/go/types/TestGoASTContext.py Thu Oct 22 15:06:20 2015
@@ -1,7 +1,8 @@
 """Test the go DWARF type parsing."""
 
+import lldb_shared
+
 import os, time
-import unittest2
 import lldb
 import lldbutil
 from lldbtest import *
@@ -128,10 +129,3 @@ class TestGoASTContext(TestBase):
         self.assertEqual(5, v.GetNumChildren())
         for i in xrange(5):
             self.assertEqual(str(i + 1), v.GetChildAtIndex(i).value)
-        
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/lang/mixed/TestMixedLanguages.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/lang/mixed/TestMixedLanguages.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/lang/mixed/TestMixedLanguages.py (original)
+++ lldb/trunk/test/lang/mixed/TestMixedLanguages.py Thu Oct 22 15:06:20 2015
@@ -1,7 +1,8 @@
 """Test that lldb works correctly on compile units form different languages."""
 
+import lldb_shared
+
 import os, time, re
-import unittest2
 import lldb
 from lldbtest import *
 
@@ -51,9 +52,3 @@ class MixedLanguagesTestCase(TestBase):
         # (note: C++11 is enabled by default for C++).
         self.expect("expr foo != nullptr",
             patterns = ["true"])
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/lang/objc/blocks/TestObjCIvarsInBlocks.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/lang/objc/blocks/TestObjCIvarsInBlocks.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/lang/objc/blocks/TestObjCIvarsInBlocks.py (original)
+++ lldb/trunk/test/lang/objc/blocks/TestObjCIvarsInBlocks.py Thu Oct 22 15:06:20 2015
@@ -1,7 +1,8 @@
 """Test printing ivars and ObjC objects captured in blocks that are made in methods of an ObjC class."""
 
+import lldb_shared
+
 import os, time
-import unittest2
 import lldb
 from lldbtest import *
 import lldbutil
@@ -98,9 +99,3 @@ class TestObjCIvarsInBlocks(TestBase):
         ret_value_signed = expr.GetValueAsSigned (error)
         # print 'ret_value_signed = %i' % (ret_value_signed)
         self.assertTrue (ret_value_signed == 5, "The local variable in the block was what we expected.")
-        
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/lang/objc/forward-decl/TestForwardDecl.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/lang/objc/forward-decl/TestForwardDecl.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/lang/objc/forward-decl/TestForwardDecl.py (original)
+++ lldb/trunk/test/lang/objc/forward-decl/TestForwardDecl.py Thu Oct 22 15:06:20 2015
@@ -1,7 +1,8 @@
 """Test that a forward-declared class works when its complete definition is in a library"""
 
+import lldb_shared
+
 import os, time
-import unittest2
 import lldb
 from lldbtest import *
 import lldbutil
@@ -49,9 +50,3 @@ class ForwardDeclTestCase(TestBase):
         # This should display correctly.
         self.expect("expression [j getMember]", VARIABLES_DISPLAYED_CORRECTLY,
             substrs = ["= 0x"])
-            
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/lang/objc/foundation/TestConstStrings.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/lang/objc/foundation/TestConstStrings.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/lang/objc/foundation/TestConstStrings.py (original)
+++ lldb/trunk/test/lang/objc/foundation/TestConstStrings.py Thu Oct 22 15:06:20 2015
@@ -3,8 +3,9 @@ Test that objective-c constant strings a
 parser.
 """
 
+import lldb_shared
+
 import os, time
-import unittest2
 import lldb
 from lldbtest import *
 import lldbutil
@@ -48,10 +49,3 @@ class ConstStringTestCase(TestBase):
 
         self.expect('expression (int)[@"123" length]',
             startstr = "(int) $3 = 3")
-
-        
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/lang/objc/foundation/TestFoundationDisassembly.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/lang/objc/foundation/TestFoundationDisassembly.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/lang/objc/foundation/TestFoundationDisassembly.py (original)
+++ lldb/trunk/test/lang/objc/foundation/TestFoundationDisassembly.py Thu Oct 22 15:06:20 2015
@@ -2,8 +2,10 @@
 Test the lldb disassemble command on foundation framework.
 """
 
-import os, time
+import lldb_shared
+
 import unittest2
+import os, time
 import lldb
 from lldbtest import *
 import lldbutil
@@ -128,10 +130,3 @@ class FoundationDisassembleTestCase(Test
 
         # Do the disassemble for the currently stopped function.
         self.runCmd("disassemble -f")
-
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/lang/objc/foundation/TestObjCMethods.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/lang/objc/foundation/TestObjCMethods.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/lang/objc/foundation/TestObjCMethods.py (original)
+++ lldb/trunk/test/lang/objc/foundation/TestObjCMethods.py Thu Oct 22 15:06:20 2015
@@ -3,8 +3,9 @@ Set breakpoints on objective-c class and
 Also lookup objective-c data types and evaluate expressions.
 """
 
+import lldb_shared
+
 import os, os.path, time
-import unittest2
 import lldb
 import string
 from lldbtest import *
@@ -79,7 +80,6 @@ class FoundationTestCase(TestBase):
         self.expect("thread backtrace", "Stop at -[NSAutoreleasePool release]",
             substrs = ["Foundation`-[NSAutoreleasePool release]"])
 
-    #@unittest2.expectedFailure
     # rdar://problem/8542091
     # rdar://problem/8492646
     def test_data_type_and_expr(self):
@@ -258,9 +258,3 @@ class FoundationTestCase(TestBase):
                     print line,
             self.assertTrue(num_errors == 0, "Spurious lookups detected")
             f.close()
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/lang/objc/foundation/TestObjCMethods2.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/lang/objc/foundation/TestObjCMethods2.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/lang/objc/foundation/TestObjCMethods2.py (original)
+++ lldb/trunk/test/lang/objc/foundation/TestObjCMethods2.py Thu Oct 22 15:06:20 2015
@@ -2,8 +2,9 @@
 Test more expression command sequences with objective-c.
 """
 
+import lldb_shared
+
 import os, time
-import unittest2
 import lldb
 from lldbtest import *
 import lldbutil
@@ -164,9 +165,3 @@ class FoundationTestCase2(TestBase):
                     error = True, 
                     patterns = ["no known method", "cast the message send to the method's return type"])
         self.runCmd("process continue")
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/lang/objc/foundation/TestObjectDescriptionAPI.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/lang/objc/foundation/TestObjectDescriptionAPI.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/lang/objc/foundation/TestObjectDescriptionAPI.py (original)
+++ lldb/trunk/test/lang/objc/foundation/TestObjectDescriptionAPI.py Thu Oct 22 15:06:20 2015
@@ -2,9 +2,10 @@
 Test SBValue.GetObjectDescription() with the value from SBTarget.FindGlobalVariables().
 """
 
+import lldb_shared
+
 import os, time
 import re
-import unittest2
 import lldb, lldbutil
 from lldbtest import *
 
@@ -65,10 +66,3 @@ class ObjectDescriptionAPITestCase(TestB
                 print "object description:", v.GetObjectDescription()
             if v.GetName() == 'my_global_str':
                 self.assertTrue(v.GetObjectDescription() == 'This is a global string')
-
-        
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/lang/objc/foundation/TestRuntimeTypes.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/lang/objc/foundation/TestRuntimeTypes.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/lang/objc/foundation/TestRuntimeTypes.py (original)
+++ lldb/trunk/test/lang/objc/foundation/TestRuntimeTypes.py Thu Oct 22 15:06:20 2015
@@ -2,8 +2,9 @@
 Test that Objective-C methods from the runtime work correctly.
 """
 
+import lldb_shared
+
 import os, time
-import unittest2
 import lldb
 from lldbtest import *
 import lldbutil
@@ -43,9 +44,3 @@ class RuntimeTypesTestCase(TestBase):
 
         self.expect("po $1", VARIABLES_DISPLAYED_CORRECTLY,
             substrs = ["foo"])
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/lang/objc/foundation/TestSymbolTable.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/lang/objc/foundation/TestSymbolTable.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/lang/objc/foundation/TestSymbolTable.py (original)
+++ lldb/trunk/test/lang/objc/foundation/TestSymbolTable.py Thu Oct 22 15:06:20 2015
@@ -2,8 +2,9 @@
 Test symbol table access for main.m.
 """
 
+import lldb_shared
+
 import os, time
-import unittest2
 import lldb
 from lldbtest import *
 
@@ -63,10 +64,3 @@ class FoundationSymtabTestCase(TestBase)
         #print "symbols unaccounted for:", expected_symbols
         self.assertTrue(len(expected_symbols) == 0,
                         "All the known symbols are accounted for")
-
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/lang/objc/hidden-ivars/TestHiddenIvars.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/lang/objc/hidden-ivars/TestHiddenIvars.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/lang/objc/hidden-ivars/TestHiddenIvars.py (original)
+++ lldb/trunk/test/lang/objc/hidden-ivars/TestHiddenIvars.py Thu Oct 22 15:06:20 2015
@@ -1,7 +1,9 @@
 """Test that hidden ivars in a shared library are visible from the main executable."""
 
-import os, time
+import lldb_shared
+
 import unittest2
+import os, time
 import lldb
 from lldbtest import *
 import lldbutil
@@ -168,10 +170,3 @@ class HiddenIvarsTestCase(TestBase):
         else:
             self.expect("frame variable *k", VARIABLES_DISPLAYED_CORRECTLY,
                 substrs = ["foo = 2", "bar = 3", '_filteredDataSource = 0x', '"2 elements"'])
-
-                       
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/lang/objc/ivar-IMP/TestObjCiVarIMP.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/lang/objc/ivar-IMP/TestObjCiVarIMP.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/lang/objc/ivar-IMP/TestObjCiVarIMP.py (original)
+++ lldb/trunk/test/lang/objc/ivar-IMP/TestObjCiVarIMP.py Thu Oct 22 15:06:20 2015
@@ -2,9 +2,10 @@
 Test that dynamically discovered ivars of type IMP do not crash LLDB
 """
 
+import lldb_shared
+
 import os, time
 import re
-import unittest2
 import lldb, lldbutil
 from lldbtest import *
 import commands
@@ -57,9 +58,3 @@ class ObjCiVarIMPTestCase(TestBase):
         self.expect('disassemble --start-address `((MyClass*)object)->myImp`', substrs=[
             '-[MyClass init]'
         ])
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/lang/objc/modules-auto-import/TestModulesAutoImport.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/lang/objc/modules-auto-import/TestModulesAutoImport.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/lang/objc/modules-auto-import/TestModulesAutoImport.py (original)
+++ lldb/trunk/test/lang/objc/modules-auto-import/TestModulesAutoImport.py Thu Oct 22 15:06:20 2015
@@ -1,7 +1,9 @@
 """Test that importing modules in Objective-C works as expected."""
 
-import os, time
+import lldb_shared
+
 import unittest2
+import os, time
 import lldb
 import platform
 import lldbutil
@@ -47,9 +49,3 @@ class ObjCModulesAutoImportTestCase(Test
 
         self.expect("p getpid()", VARIABLES_DISPLAYED_CORRECTLY,
             substrs = ["pid_t"])
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/lang/objc/modules-incomplete/TestIncompleteModules.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/lang/objc/modules-incomplete/TestIncompleteModules.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/lang/objc/modules-incomplete/TestIncompleteModules.py (original)
+++ lldb/trunk/test/lang/objc/modules-incomplete/TestIncompleteModules.py Thu Oct 22 15:06:20 2015
@@ -1,7 +1,9 @@
 """Test that DWARF types are trusted over module types"""
 
-import os, time
+import lldb_shared
+
 import unittest2
+import os, time
 import lldb
 import platform
 import lldbutil
@@ -55,9 +57,3 @@ class IncompleteModulesTestCase(TestBase
 
         self.expect("expr MAX(2,3)", "#undefd macro was correcltly not found",
             error=True)
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/lang/objc/modules-inline-functions/TestModulesInlineFunctions.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/lang/objc/modules-inline-functions/TestModulesInlineFunctions.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/lang/objc/modules-inline-functions/TestModulesInlineFunctions.py (original)
+++ lldb/trunk/test/lang/objc/modules-inline-functions/TestModulesInlineFunctions.py Thu Oct 22 15:06:20 2015
@@ -1,7 +1,9 @@
 """Test that inline functions from modules are imported correctly"""
 
-import os, time
+import lldb_shared
+
 import unittest2
+import os, time
 import lldb
 import platform
 import lldbutil
@@ -48,9 +50,3 @@ class ModulesInlineFunctionsTestCase(Tes
 
         self.expect("expr isInline(2)", VARIABLES_DISPLAYED_CORRECTLY,
             substrs = ["4"])
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/lang/objc/modules/TestObjCModules.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/lang/objc/modules/TestObjCModules.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/lang/objc/modules/TestObjCModules.py (original)
+++ lldb/trunk/test/lang/objc/modules/TestObjCModules.py Thu Oct 22 15:06:20 2015
@@ -1,7 +1,9 @@
 """Test that importing modules in Objective-C works as expected."""
 
-import os, time
+import lldb_shared
+
 import unittest2
+import os, time
 import lldb
 import platform
 import lldbutil
@@ -65,9 +67,3 @@ class ObjCModulesTestCase(TestBase):
 
         self.expect("p [NSURL URLWithString:@\"http://lldb.llvm.org\"].scheme", VARIABLES_DISPLAYED_CORRECTLY,
             substrs = ["http"])
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/lang/objc/objc++/TestObjCXX.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/lang/objc/objc%2B%2B/TestObjCXX.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/lang/objc/objc++/TestObjCXX.py (original)
+++ lldb/trunk/test/lang/objc/objc++/TestObjCXX.py Thu Oct 22 15:06:20 2015
@@ -2,8 +2,9 @@
 Make sure that ivars of Objective-C++ classes are visible in LLDB.
 """
 
+import lldb_shared
+
 import os, time
-import unittest2
 import lldb
 from lldbtest import *
 import lldbutil
@@ -28,9 +29,3 @@ class ObjCXXTestCase(TestBase):
 
         self.expect("expr f->f", "Found ivar in class",
             substrs = ["= 3"])
-        
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/lang/objc/objc-baseclass-sbtype/TestObjCBaseClassSBType.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/lang/objc/objc-baseclass-sbtype/TestObjCBaseClassSBType.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/lang/objc/objc-baseclass-sbtype/TestObjCBaseClassSBType.py (original)
+++ lldb/trunk/test/lang/objc/objc-baseclass-sbtype/TestObjCBaseClassSBType.py Thu Oct 22 15:06:20 2015
@@ -2,9 +2,10 @@
 Use lldb Python API to test base class resolution for ObjC classes
 """
 
+import lldb_shared
+
 import os, time
 import re
-import unittest2
 import lldb, lldbutil
 from lldbtest import *
 
@@ -52,9 +53,3 @@ class ObjCDynamicValueTestCase(TestBase)
         self.assertTrue(var_pte_type.GetDirectBaseClassAtIndex(0).IsValid(), "Foo * has a valid base class")
 
         self.assertTrue(var_ptr_type.GetDirectBaseClassAtIndex(0).GetName() == var_pte_type.GetDirectBaseClassAtIndex(0).GetName(), "Foo and its pointer type don't agree on their base class")
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/lang/objc/objc-builtin-types/TestObjCBuiltinTypes.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/lang/objc/objc-builtin-types/TestObjCBuiltinTypes.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/lang/objc/objc-builtin-types/TestObjCBuiltinTypes.py (original)
+++ lldb/trunk/test/lang/objc/objc-builtin-types/TestObjCBuiltinTypes.py Thu Oct 22 15:06:20 2015
@@ -1,7 +1,8 @@
 """Test that the expression parser doesn't get confused by 'id' and 'Class'"""
 
+import lldb_shared
+
 import os, time
-import unittest2
 import lldb
 import lldbutil
 from lldbtest import *
@@ -50,9 +51,3 @@ class TestObjCBuiltinTypes(TestBase):
         self.expect("expr (foo)", patterns = ["\(ns::id\) \$.* = 0"])
 
         self.expect("expr id my_id = 0; my_id", patterns = ["\(id\) \$.* = nil"])
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/lang/objc/objc-checker/TestObjCCheckers.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/lang/objc/objc-checker/TestObjCCheckers.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/lang/objc/objc-checker/TestObjCCheckers.py (original)
+++ lldb/trunk/test/lang/objc/objc-checker/TestObjCCheckers.py Thu Oct 22 15:06:20 2015
@@ -2,9 +2,10 @@
 Use lldb Python API to make sure the dynamic checkers are doing their jobs.
 """
 
+import lldb_shared
+
 import os, time
 import re
-import unittest2
 import lldb, lldbutil
 from lldbtest import *
 
@@ -69,9 +70,3 @@ class ObjCCheckerTestCase(TestBase):
         # Make sure the error is helpful:
         err_string = expr_error.GetCString()
         self.assertTrue ("selector" in err_string)
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/lang/objc/objc-class-method/TestObjCClassMethod.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/lang/objc/objc-class-method/TestObjCClassMethod.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/lang/objc/objc-class-method/TestObjCClassMethod.py (original)
+++ lldb/trunk/test/lang/objc/objc-class-method/TestObjCClassMethod.py Thu Oct 22 15:06:20 2015
@@ -1,7 +1,8 @@
 """Test calling functions in class methods."""
 
+import lldb_shared
+
 import os, time
-import unittest2
 import lldb
 import lldbutil
 from lldbtest import *
@@ -51,9 +52,3 @@ class TestObjCClassMethod(TestBase):
         cmd_value = frame.EvaluateExpression ("(int)[Foo doSomethingWithString:@\"Hello\"]")
         self.assertTrue (cmd_value.IsValid())
         self.assertTrue (cmd_value.GetValueAsUnsigned() == 5)
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/lang/objc/objc-dyn-sbtype/TestObjCDynamicSBType.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/lang/objc/objc-dyn-sbtype/TestObjCDynamicSBType.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/lang/objc/objc-dyn-sbtype/TestObjCDynamicSBType.py (original)
+++ lldb/trunk/test/lang/objc/objc-dyn-sbtype/TestObjCDynamicSBType.py Thu Oct 22 15:06:20 2015
@@ -2,8 +2,9 @@
 Test that we are able to properly report a usable dynamic type
 """
 
+import lldb_shared
+
 import os, time
-import unittest2
 import lldb
 from lldbtest import *
 import lldbutil
@@ -57,9 +58,3 @@ class ObjCDynamicSBTypeTestCase(TestBase
 
         self.assertTrue(object_pointee_type.GetNumberOfFields() == 2, "The dynamic type for NSObject has 2 fields")
         self.assertTrue(base_pointee_type.GetNumberOfFields() == 2, "The dynamic type for Base has 2 fields")
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/lang/objc/objc-dynamic-value/TestObjCDynamicValue.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/lang/objc/objc-dynamic-value/TestObjCDynamicValue.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/lang/objc/objc-dynamic-value/TestObjCDynamicValue.py (original)
+++ lldb/trunk/test/lang/objc/objc-dynamic-value/TestObjCDynamicValue.py Thu Oct 22 15:06:20 2015
@@ -2,9 +2,10 @@
 Use lldb Python API to test dynamic values in ObjC
 """
 
+import lldb_shared
+
 import os, time
 import re
-import unittest2
 import lldb, lldbutil
 from lldbtest import *
 
@@ -171,9 +172,3 @@ class ObjCDynamicValueTestCase(TestBase)
         derivedValue = object.GetChildMemberWithName ('_derivedValue')
         self.assertTrue (derivedValue)
         self.assertTrue (int (derivedValue.GetValue(), 0) == 30)
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/lang/objc/objc-ivar-offsets/TestObjCIvarOffsets.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/lang/objc/objc-ivar-offsets/TestObjCIvarOffsets.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/lang/objc/objc-ivar-offsets/TestObjCIvarOffsets.py (original)
+++ lldb/trunk/test/lang/objc/objc-ivar-offsets/TestObjCIvarOffsets.py Thu Oct 22 15:06:20 2015
@@ -1,7 +1,8 @@
 """Test printing ObjC objects that use unbacked properties - so that the static ivar offsets are incorrect."""
 
+import lldb_shared
+
 import os, time
-import unittest2
 import lldb
 from lldbtest import *
 import lldbutil
@@ -69,9 +70,3 @@ class TestObjCIvarOffsets(TestBase):
         flag2_value = mine_flag2.GetValueAsUnsigned (error)
         self.assertTrue (error.Success())
         self.assertTrue (flag2_value == 7)
-        
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/lang/objc/objc-ivar-stripped/TestObjCIvarStripped.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/lang/objc/objc-ivar-stripped/TestObjCIvarStripped.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/lang/objc/objc-ivar-stripped/TestObjCIvarStripped.py (original)
+++ lldb/trunk/test/lang/objc/objc-ivar-stripped/TestObjCIvarStripped.py Thu Oct 22 15:06:20 2015
@@ -1,7 +1,8 @@
 """Test printing ObjC objects that use unbacked properties - so that the static ivar offsets are incorrect."""
 
+import lldb_shared
+
 import os, time
-import unittest2
 import lldb
 from lldbtest import *
 import lldbutil
@@ -54,9 +55,3 @@ class TestObjCIvarStripped(TestBase):
         ivar_value = ivar.GetValueAsSigned (error)
         self.assertTrue (error.Success())
         self.assertTrue (ivar_value == 3)
-        
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/lang/objc/objc-new-syntax/TestObjCNewSyntax.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/lang/objc/objc-new-syntax/TestObjCNewSyntax.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/lang/objc/objc-new-syntax/TestObjCNewSyntax.py (original)
+++ lldb/trunk/test/lang/objc/objc-new-syntax/TestObjCNewSyntax.py Thu Oct 22 15:06:20 2015
@@ -1,7 +1,9 @@
 """Test that the Objective-C syntax for dictionary/array literals and indexing works"""
 
-import os, time
+import lldb_shared
+
 import unittest2
+import os, time
 import lldb
 import platform
 import lldbutil
@@ -97,9 +99,3 @@ class ObjCNewSyntaxTestCase(TestBase):
             substrs = ["4"])
         self.expect("expr -- @((char*)\"Hello world\" + 6)", VARIABLES_DISPLAYED_CORRECTLY,
             substrs = ["NSString", "world"])
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/lang/objc/objc-optimized/TestObjcOptimized.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/lang/objc/objc-optimized/TestObjcOptimized.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/lang/objc/objc-optimized/TestObjcOptimized.py (original)
+++ lldb/trunk/test/lang/objc/objc-optimized/TestObjcOptimized.py Thu Oct 22 15:06:20 2015
@@ -7,8 +7,9 @@ or 'self' variable was not properly read
 optimized it into a register.
 """
 
+import lldb_shared
+
 import os, time
-import unittest2
 import lldb
 from lldbtest import *
 import lldbutil
@@ -58,10 +59,3 @@ class ObjcOptimizedTestCase(TestBase):
 
         self.expect('expression self->non_member', error=True,
             substrs = ["does not have a member named 'non_member'"])
-
-        
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/lang/objc/objc-property/TestObjCProperty.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/lang/objc/objc-property/TestObjCProperty.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/lang/objc/objc-property/TestObjCProperty.py (original)
+++ lldb/trunk/test/lang/objc/objc-property/TestObjCProperty.py Thu Oct 22 15:06:20 2015
@@ -2,9 +2,10 @@
 Use lldb Python API to verify that expression evaluation for property references uses the correct getters and setters
 """
 
+import lldb_shared
+
 import os, time
 import re
-import unittest2
 import lldb, lldbutil
 from lldbtest import *
 
@@ -108,9 +109,3 @@ class ObjCPropertyTestCase(TestBase):
         idWithProtocol_error = idWithProtocol_value.GetError()
         self.assertTrue (idWithProtocol_error.Success())
         self.assertTrue (idWithProtocol_value.GetTypeName() == "id")
-        
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/lang/objc/objc-static-method-stripped/TestObjCStaticMethodStripped.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/lang/objc/objc-static-method-stripped/TestObjCStaticMethodStripped.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/lang/objc/objc-static-method-stripped/TestObjCStaticMethodStripped.py (original)
+++ lldb/trunk/test/lang/objc/objc-static-method-stripped/TestObjCStaticMethodStripped.py Thu Oct 22 15:06:20 2015
@@ -1,7 +1,8 @@
 """Test calling functions in static methods with a stripped binary."""
 
+import lldb_shared
+
 import os, time
-import unittest2
 import lldb
 import lldbutil
 from lldbtest import *
@@ -60,9 +61,3 @@ class TestObjCStaticMethodStripped(TestB
         self.assertTrue (cmd_value.IsValid())
         string_length = cmd_value.GetValueAsUnsigned()
         self.assertTrue (string_length == 27, "Got the right value from another class method on the same class.")
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/lang/objc/objc-static-method/TestObjCStaticMethod.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/lang/objc/objc-static-method/TestObjCStaticMethod.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/lang/objc/objc-static-method/TestObjCStaticMethod.py (original)
+++ lldb/trunk/test/lang/objc/objc-static-method/TestObjCStaticMethod.py Thu Oct 22 15:06:20 2015
@@ -1,7 +1,8 @@
 """Test calling functions in static methods."""
 
+import lldb_shared
+
 import os, time
-import unittest2
 import lldb
 import lldbutil
 from lldbtest import *
@@ -56,9 +57,3 @@ class TestObjCStaticMethod(TestBase):
         self.assertTrue (cmd_value.IsValid())
         string_length = cmd_value.GetValueAsUnsigned()
         self.assertTrue (string_length == 27, "Got the right value from another class method on the same class.")
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/lang/objc/objc-stepping/TestObjCStepping.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/lang/objc/objc-stepping/TestObjCStepping.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/lang/objc/objc-stepping/TestObjCStepping.py (original)
+++ lldb/trunk/test/lang/objc/objc-stepping/TestObjCStepping.py Thu Oct 22 15:06:20 2015
@@ -1,7 +1,8 @@
 """Test stepping through ObjC method dispatch in various forms."""
 
+import lldb_shared
+
 import os, time
-import unittest2
 import lldb
 import lldbutil
 from lldbtest import *
@@ -167,9 +168,3 @@ class TestObjCStepping(TestBase):
         thread.StepInto()
         line_number = thread.GetFrameAtIndex(0).GetLineEntry().GetLine()
         self.assertTrue (line_number == self.stepped_past_nil_line, "Step in over dispatch to nil stepped over.")
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/lang/objc/objc-struct-argument/TestObjCStructArgument.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/lang/objc/objc-struct-argument/TestObjCStructArgument.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/lang/objc/objc-struct-argument/TestObjCStructArgument.py (original)
+++ lldb/trunk/test/lang/objc/objc-struct-argument/TestObjCStructArgument.py Thu Oct 22 15:06:20 2015
@@ -1,7 +1,8 @@
 """Test passing structs to Objective-C methods."""
 
+import lldb_shared
+
 import os, time
-import unittest2
 import lldb
 import lldbutil
 from lldbtest import *
@@ -52,9 +53,3 @@ class TestObjCStructArgument(TestBase):
         # Now make sure we can call a method that returns a struct without crashing.
         cmd_value = frame.EvaluateExpression ("[provider getRange]")
         self.assertTrue (cmd_value.IsValid())
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/lang/objc/objc-struct-return/TestObjCStructReturn.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/lang/objc/objc-struct-return/TestObjCStructReturn.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/lang/objc/objc-struct-return/TestObjCStructReturn.py (original)
+++ lldb/trunk/test/lang/objc/objc-struct-return/TestObjCStructReturn.py Thu Oct 22 15:06:20 2015
@@ -1,7 +1,8 @@
 """Test calling functions in class methods."""
 
+import lldb_shared
+
 import os, time
-import unittest2
 import lldb
 import lldbutil
 from lldbtest import *
@@ -48,9 +49,3 @@ class TestObjCClassMethod(TestBase):
         # Now make sure we can call a method that returns a struct without crashing.
         cmd_value = frame.EvaluateExpression ("[provider getRange]")
         self.assertTrue (cmd_value.IsValid())
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/lang/objc/objc-super/TestObjCSuper.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/lang/objc/objc-super/TestObjCSuper.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/lang/objc/objc-super/TestObjCSuper.py (original)
+++ lldb/trunk/test/lang/objc/objc-super/TestObjCSuper.py Thu Oct 22 15:06:20 2015
@@ -1,7 +1,8 @@
 """Test calling methods on super."""
 
+import lldb_shared
+
 import os, time
-import unittest2
 import lldb
 import lldbutil
 from lldbtest import *
@@ -54,9 +55,3 @@ class TestObjCSuperMethod(TestBase):
         cmd_value = frame.EvaluateExpression ("[super get]")
         self.assertTrue (cmd_value.IsValid())
         self.assertTrue (cmd_value.GetValueAsUnsigned() == 1)
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/lang/objc/print-obj/TestPrintObj.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/lang/objc/print-obj/TestPrintObj.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/lang/objc/print-obj/TestPrintObj.py (original)
+++ lldb/trunk/test/lang/objc/print-obj/TestPrintObj.py Thu Oct 22 15:06:20 2015
@@ -2,8 +2,9 @@
 Test "print object" where another thread blocks the print object from making progress.
 """
 
+import lldb_shared
+
 import os, time
-import unittest2
 import lldb
 from lldbtest import *
 
@@ -82,10 +83,3 @@ class PrintObjTestCase(TestBase):
 
         self.expect("po lock_me", OBJECT_PRINTED_CORRECTLY,
             substrs = ['I am pretty special.'])
-
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/lang/objc/radar-9691614/TestObjCMethodReturningBOOL.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/lang/objc/radar-9691614/TestObjCMethodReturningBOOL.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/lang/objc/radar-9691614/TestObjCMethodReturningBOOL.py (original)
+++ lldb/trunk/test/lang/objc/radar-9691614/TestObjCMethodReturningBOOL.py Thu Oct 22 15:06:20 2015
@@ -2,8 +2,9 @@
 Test that objective-c method returning BOOL works correctly.
 """
 
+import lldb_shared
+
 import os, time
-import unittest2
 import lldb
 from lldbtest import *
 import lldbutil
@@ -40,10 +41,3 @@ class MethodReturningBOOLTestCase(TestBa
 
         # rdar://problem/9691614
         self.runCmd('p (int)[my isValid]')
-
-        
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/lang/objc/rdar-10967107/TestRdar10967107.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/lang/objc/rdar-10967107/TestRdar10967107.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/lang/objc/rdar-10967107/TestRdar10967107.py (original)
+++ lldb/trunk/test/lang/objc/rdar-10967107/TestRdar10967107.py Thu Oct 22 15:06:20 2015
@@ -2,8 +2,9 @@
 Test that CoreFoundation classes CFGregorianDate and CFRange are not improperly uniqued
 """
 
+import lldb_shared
+
 import os, time
-import unittest2
 import lldb
 from lldbtest import *
 import lldbutil
@@ -39,9 +40,3 @@ class Rdar10967107TestCase(TestBase):
         self.expect("frame variable cf_range --raw", substrs = ['location','length'])
         # check that printing both does not somehow confuse LLDB
         self.expect("frame variable  --raw", substrs = ['year','month','day','hour','minute','second','location','length'])
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/lang/objc/rdar-11355592/TestRdar11355592.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/lang/objc/rdar-11355592/TestRdar11355592.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/lang/objc/rdar-11355592/TestRdar11355592.py (original)
+++ lldb/trunk/test/lang/objc/rdar-11355592/TestRdar11355592.py Thu Oct 22 15:06:20 2015
@@ -2,8 +2,9 @@
 Test that we do not attempt to make a dynamic type for a 'const char*'
 """
 
+import lldb_shared
+
 import os, time
-import unittest2
 import lldb
 from lldbtest import *
 import lldbutil
@@ -60,9 +61,3 @@ class Rdar10967107TestCase(TestBase):
         # check that expr also gets it right
         self.expect("expr my_foolie", substrs = ['FoolMeOnce *'])
         self.expect("expr -d run -- my_foolie", substrs = ['FoolMeOnce *'])
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/lang/objc/rdar-12408181/TestRdar12408181.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/lang/objc/rdar-12408181/TestRdar12408181.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/lang/objc/rdar-12408181/TestRdar12408181.py (original)
+++ lldb/trunk/test/lang/objc/rdar-12408181/TestRdar12408181.py Thu Oct 22 15:06:20 2015
@@ -2,8 +2,9 @@
 Test that we are able to find out how many children NSWindow has
 """
 
+import lldb_shared
+
 import os, time
-import unittest2
 import lldb
 from lldbtest import *
 import lldbutil
@@ -40,9 +41,3 @@ class Rdar12408181TestCase(TestBase):
         self.assertTrue(window_dynamic.GetNumChildren() > 1, "NSWindow (dynamic) only has 1 child!")
         self.assertTrue(window.GetChildAtIndex(0).IsValid(), "NSWindow (static) has an invalid child")
         self.assertTrue(window_dynamic.GetChildAtIndex(0).IsValid(), "NSWindow (dynamic) has an invalid child")
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/lang/objc/real-definition/TestRealDefinition.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/lang/objc/real-definition/TestRealDefinition.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/lang/objc/real-definition/TestRealDefinition.py (original)
+++ lldb/trunk/test/lang/objc/real-definition/TestRealDefinition.py Thu Oct 22 15:06:20 2015
@@ -1,7 +1,8 @@
 """Test that types defined in shared libraries work correctly."""
 
+import lldb_shared
+
 import os, time
-import unittest2
 import lldb
 from lldbtest import *
 import lldbutil
@@ -81,9 +82,3 @@ class TestRealDefinition(TestBase):
         # Break inside the foo function which takes a bar_ptr argument.
         line = line_number('main.m', '// Set breakpoint in main')
         lldbutil.run_break_set_by_file_and_line (self, "main.m", line, num_expected_locations=1, loc_exact=True)
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/lang/objc/self/TestObjCSelf.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/lang/objc/self/TestObjCSelf.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/lang/objc/self/TestObjCSelf.py (original)
+++ lldb/trunk/test/lang/objc/self/TestObjCSelf.py Thu Oct 22 15:06:20 2015
@@ -34,9 +34,3 @@ class ObjCSelfTestCase(TestBase):
 
     def set_breakpoint(self, line):
         lldbutil.run_break_set_by_file_and_line (self, "main.m", line, num_expected_locations=1, loc_exact=True)
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/linux/builtin_trap/TestBuiltinTrap.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/linux/builtin_trap/TestBuiltinTrap.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/linux/builtin_trap/TestBuiltinTrap.py (original)
+++ lldb/trunk/test/linux/builtin_trap/TestBuiltinTrap.py Thu Oct 22 15:06:20 2015
@@ -3,8 +3,9 @@ Test lldb ability to unwind a stack with
 '__builtin_trap' intrinsic, which GCC (4.6) encodes to an illegal opcode.
 """
 
+import lldb_shared
+
 import os
-import unittest2
 import lldb
 from lldbtest import *
 import lldbutil
@@ -46,9 +47,3 @@ class BuiltinTrapTestCase(TestBase):
 
         # evaluate a local
         self.expect('p foo', substrs = ['= 5'])
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/linux/thread/create_during_instruction_step/TestCreateDuringInstructionStep.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/linux/thread/create_during_instruction_step/TestCreateDuringInstructionStep.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/linux/thread/create_during_instruction_step/TestCreateDuringInstructionStep.py (original)
+++ lldb/trunk/test/linux/thread/create_during_instruction_step/TestCreateDuringInstructionStep.py Thu Oct 22 15:06:20 2015
@@ -3,8 +3,9 @@ This tests that we do not lose control o
 over a thread creation instruction.
 """
 
+import lldb_shared
+
 import os
-import unittest2
 import lldb
 from lldbtest import *
 import lldbutil
@@ -61,9 +62,3 @@ class CreateDuringInstructionStepTestCas
 
         # At this point, the inferior process should have exited.
         self.assertEqual(process.GetState(), lldb.eStateExited, PROCESS_EXITED)
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/lldbinline.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/lldbinline.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/lldbinline.py (original)
+++ lldb/trunk/test/lldbinline.py Thu Oct 22 15:06:20 2015
@@ -4,7 +4,6 @@ import lldb
 from lldbtest import *
 import lldbutil
 import os
-import unittest2
 import sys
 
 def source_type(filename):

Modified: lldb/trunk/test/lldbpexpect.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/lldbpexpect.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/lldbpexpect.py (original)
+++ lldb/trunk/test/lldbpexpect.py Thu Oct 22 15:06:20 2015
@@ -1,8 +1,9 @@
+import lldb_shared
+
 import lldb
 from lldbtest import *
 import lldbutil
 import os
-import unittest2
 import sys
 import pexpect
 

Modified: lldb/trunk/test/logging/TestLogging.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/logging/TestLogging.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/logging/TestLogging.py (original)
+++ lldb/trunk/test/logging/TestLogging.py Thu Oct 22 15:06:20 2015
@@ -2,8 +2,9 @@
 Test lldb logging.  This test just makes sure logging doesn't crash, and produces some output.
 """
 
+import lldb_shared
+
 import os, time, string
-import unittest2
 import lldb
 from lldbtest import *
 
@@ -102,10 +103,3 @@ class LogTestCase(TestBase):
 
         # check that it is still there
         self.assertTrue(string.find(contents, "bacon") == 0)
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()
-

Modified: lldb/trunk/test/macosx/add-dsym/TestAddDsymMidExecutionCommand.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/macosx/add-dsym/TestAddDsymMidExecutionCommand.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/macosx/add-dsym/TestAddDsymMidExecutionCommand.py (original)
+++ lldb/trunk/test/macosx/add-dsym/TestAddDsymMidExecutionCommand.py Thu Oct 22 15:06:20 2015
@@ -1,7 +1,8 @@
 """Test that the 'add-dsym', aka 'target symbols add', succeeds in the middle of debug session."""
 
+import lldb_shared
+
 import os, time
-import unittest2
 import lldb
 import sys
 from lldbtest import *
@@ -40,9 +41,3 @@ class AddDsymMidExecutionCommandCase(Tes
 
         self.expect("frame select",
                     substrs = ['a.out`main at main.c'])
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/macosx/debug-info/apple_types/TestAppleTypesIsProduced.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/macosx/debug-info/apple_types/TestAppleTypesIsProduced.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/macosx/debug-info/apple_types/TestAppleTypesIsProduced.py (original)
+++ lldb/trunk/test/macosx/debug-info/apple_types/TestAppleTypesIsProduced.py Thu Oct 22 15:06:20 2015
@@ -2,8 +2,9 @@
 Test that clang produces the __apple accelerator tables, for example, __apple_types, correctly.
 """
 
+import lldb_shared
+
 import os, time
-import unittest2
 import lldb
 from lldbtest import *
 from lldbutil import symbol_type_to_str
@@ -62,10 +63,3 @@ class AppleTypesTestCase(TestBase):
         self.assertTrue(dwarf_section.FindSubSection("__apple_names") and
                         dwarf_section.FindSubSection("__apple_namespac") and
                         dwarf_section.FindSubSection("__apple_objc"))
-
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/macosx/indirect_symbol/TestIndirectSymbols.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/macosx/indirect_symbol/TestIndirectSymbols.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/macosx/indirect_symbol/TestIndirectSymbols.py (original)
+++ lldb/trunk/test/macosx/indirect_symbol/TestIndirectSymbols.py Thu Oct 22 15:06:20 2015
@@ -1,7 +1,8 @@
 """Test stepping and setting breakpoints in indirect and re-exported symbols."""
 
+import lldb_shared
+
 import os, time
-import unittest2
 import lldb
 import lldbutil
 from lldbtest import *
@@ -83,11 +84,3 @@ class TestIndirectFunctions(TestBase):
         self.assertTrue (len(threads) == 1, "Stopped at breakpoint in reexported function target.")
         curr_function = thread.GetFrameAtIndex(0).GetFunctionName()
         self.assertTrue (curr_function == "call_through_indirect_hidden", "Stepped into indirect symbols.")
-
-
- 
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/macosx/order/TestOrderFile.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/macosx/order/TestOrderFile.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/macosx/order/TestOrderFile.py (original)
+++ lldb/trunk/test/macosx/order/TestOrderFile.py Thu Oct 22 15:06:20 2015
@@ -2,9 +2,10 @@
 Test that debug symbols have the correct order as specified by the order file.
 """
 
+import lldb_shared
+
 import os, time
 import re
-import unittest2
 import lldb
 from lldbtest import *
 
@@ -31,9 +32,3 @@ class OrderFileTestCase(TestBase):
                         "Symbols have correct order by the order file")
 
         self.runCmd("run", RUN_COMPLETED)
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/macosx/queues/TestQueues.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/macosx/queues/TestQueues.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/macosx/queues/TestQueues.py (original)
+++ lldb/trunk/test/macosx/queues/TestQueues.py Thu Oct 22 15:06:20 2015
@@ -1,7 +1,9 @@
 """Test queues inspection SB APIs."""
 
-import os, time
+import lldb_shared
+
 import unittest2
+import os, time
 import lldb
 import lldbutil
 from lldbtest import *
@@ -237,9 +239,3 @@ class TestQueues(TestBase):
         self.assertTrue(queue_performer_2.GetPendingItemAtIndex(9998).IsValid(), "queue 2's pending item #9998 is valid")
         self.assertTrue(queue_performer_2.GetPendingItemAtIndex(9998).GetAddress().GetSymbol().GetName() == "doing_the_work_2", "queue 2's pending item #0 should be doing_the_work_2")
         self.assertTrue(queue_performer_2.GetPendingItemAtIndex(9999).IsValid() == False, "queue 2's pending item #9999 is invalid")
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/macosx/safe-to-func-call/TestSafeFuncCalls.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/macosx/safe-to-func-call/TestSafeFuncCalls.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/macosx/safe-to-func-call/TestSafeFuncCalls.py (original)
+++ lldb/trunk/test/macosx/safe-to-func-call/TestSafeFuncCalls.py Thu Oct 22 15:06:20 2015
@@ -1,7 +1,8 @@
 """Test function call thread safety."""
 
+import lldb_shared
+
 import os, time
-import unittest2
 import lldb
 import lldbutil
 from lldbtest import *
@@ -58,9 +59,3 @@ class TestSafeFuncCalls(TestBase):
 
     def safe_to_call_func_on_select_thread (self, select_thread):
         self.assertTrue(select_thread.SafeToCallFunctions() == False, "It is not safe to call functions on the select thread")
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/macosx/universal/TestUniversal.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/macosx/universal/TestUniversal.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/macosx/universal/TestUniversal.py (original)
+++ lldb/trunk/test/macosx/universal/TestUniversal.py Thu Oct 22 15:06:20 2015
@@ -1,7 +1,9 @@
 """Test aspects of lldb commands on universal binaries."""
 
-import os, time
+import lldb_shared
+
 import unittest2
+import os, time
 import lldb
 from lldbtest import *
 import lldbutil
@@ -101,10 +103,3 @@ class UniversalTestCase(TestBase):
             substrs = ['Name: eax'])
 
         self.runCmd("continue")
-
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/python_api/breakpoint/TestBreakpointAPI.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/python_api/breakpoint/TestBreakpointAPI.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/python_api/breakpoint/TestBreakpointAPI.py (original)
+++ lldb/trunk/test/python_api/breakpoint/TestBreakpointAPI.py Thu Oct 22 15:06:20 2015
@@ -2,9 +2,10 @@
 Test SBBreakpoint APIs.
 """
 
+import lldb_shared
+
 import os, time
 import re
-import unittest2
 import lldb, lldbutil
 from lldbtest import *
 
@@ -39,10 +40,3 @@ class BreakpointAPITestCase(TestBase):
 
         # Finally make sure the original breakpoint is no longer valid.
         self.assertTrue (not breakpoint, "Breakpoint we deleted is no longer valid.")
-
-        
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/python_api/class_members/TestSBTypeClassMembers.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/python_api/class_members/TestSBTypeClassMembers.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/python_api/class_members/TestSBTypeClassMembers.py (original)
+++ lldb/trunk/test/python_api/class_members/TestSBTypeClassMembers.py Thu Oct 22 15:06:20 2015
@@ -2,9 +2,10 @@
 Test SBType APIs to fetch member function types.
 """
 
+import lldb_shared
+
 import os, time
 import re
-import unittest2
 import lldb, lldbutil
 from lldbtest import *
 
@@ -71,9 +72,3 @@ class SBTypeMemberFunctionsTest(TestBase
         self.assertTrue(Thingy.GetMemberFunctionAtIndex(0).GetReturnType().GetName() == "id", "Thingy::init returns an id")
         self.assertTrue(Thingy.GetMemberFunctionAtIndex(1).GetNumberOfArguments() == 2, "Thingy::foo takes two arguments")
         self.assertTrue(Thingy.GetMemberFunctionAtIndex(1).GetArgumentTypeAtIndex(0).GetName() == "int", "Thingy::foo takes an int")
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/python_api/default-constructor/TestDefaultConstructorForAPIObjects.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/python_api/default-constructor/TestDefaultConstructorForAPIObjects.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/python_api/default-constructor/TestDefaultConstructorForAPIObjects.py (original)
+++ lldb/trunk/test/python_api/default-constructor/TestDefaultConstructorForAPIObjects.py Thu Oct 22 15:06:20 2015
@@ -11,9 +11,10 @@ SBCommadnReturnObject, SBStream, and SBS
 after default construction.
 """
 
+import lldb_shared
+
 import os, time
 import re
-import unittest2
 import lldb, lldbutil
 from lldbtest import *
 
@@ -387,10 +388,3 @@ class APIDefaultConstructorTestCase(Test
         # Do fuzz testing on the invalid obj, it should not crash lldb.
         import sb_watchpoint
         sb_watchpoint.fuzz_obj(obj)
-
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/python_api/disassemble-raw-data/TestDisassembleRawData.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/python_api/disassemble-raw-data/TestDisassembleRawData.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/python_api/disassemble-raw-data/TestDisassembleRawData.py (original)
+++ lldb/trunk/test/python_api/disassemble-raw-data/TestDisassembleRawData.py Thu Oct 22 15:06:20 2015
@@ -2,9 +2,10 @@
 Use lldb Python API to disassemble raw machine code bytes
 """
 
+import lldb_shared
+
 import os, time
 import re
-import unittest2
 import lldb, lldbutil
 from lldbtest import *
 
@@ -33,9 +34,3 @@ class DisassembleRawDataTestCase(TestBas
  
         self.assertTrue (inst.GetMnemonic(target) == "movq")
         self.assertTrue (inst.GetOperands(target) == '%' + "rsp, " + '%' + "rbp")
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/python_api/disassemble-raw-data/TestDisassemble_VST1_64.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/python_api/disassemble-raw-data/TestDisassemble_VST1_64.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/python_api/disassemble-raw-data/TestDisassemble_VST1_64.py (original)
+++ lldb/trunk/test/python_api/disassemble-raw-data/TestDisassemble_VST1_64.py Thu Oct 22 15:06:20 2015
@@ -2,9 +2,10 @@
 Use lldb Python API to disassemble raw machine code bytes
 """
 
+import lldb_shared
+
 import os, time
 import re
-import unittest2
 import lldb, lldbutil
 from lldbtest import *
 
@@ -52,10 +53,3 @@ class Disassemble_VST1_64(TestBase):
             print "Disassembled%s" % str(inst)
  
         self.assertTrue (inst.GetMnemonic(target) == "vst1.64")
-
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/python_api/event/TestEvents.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/python_api/event/TestEvents.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/python_api/event/TestEvents.py (original)
+++ lldb/trunk/test/python_api/event/TestEvents.py Thu Oct 22 15:06:20 2015
@@ -2,9 +2,10 @@
 Test lldb Python event APIs.
 """
 
+import lldb_shared
+
 import os, time
 import re
-import unittest2
 import lldb, lldbutil
 from lldbtest import *
 
@@ -280,9 +281,3 @@ class EventAPITestCase(TestBase):
         # The final judgement. :-)
         self.assertTrue(self.state == 'stopped',
                         "Both expected state changed events received")
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/python_api/findvalue_duplist/TestSBFrameFindValue.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/python_api/findvalue_duplist/TestSBFrameFindValue.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/python_api/findvalue_duplist/TestSBFrameFindValue.py (original)
+++ lldb/trunk/test/python_api/findvalue_duplist/TestSBFrameFindValue.py Thu Oct 22 15:06:20 2015
@@ -1,7 +1,8 @@
 """Test that SBFrame::FindValue finds things but does not duplicate the entire variables list"""
 
+import lldb_shared
+
 import os, sys, time
-import unittest2
 import lldb
 from lldbtest import *
 import lldbutil
@@ -45,9 +46,3 @@ class SBFrameFindValueTestCase(TestBase)
         self.assertTrue(self.frame.GetVariables(True,True,False,True).GetSize() == 2, "variable count is off after failed FindValue()")
         self.assertTrue(self.frame.FindValue("a",lldb.eValueTypeVariableArgument,lldb.eDynamicCanRunTarget).IsValid(), "FindValue() didn't find an argument")
         self.assertTrue(self.frame.GetVariables(True,True,False,True).GetSize() == 2, "variable count is off after successful FindValue()")
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/python_api/formatters/TestFormattersSBAPI.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/python_api/formatters/TestFormattersSBAPI.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/python_api/formatters/TestFormattersSBAPI.py (original)
+++ lldb/trunk/test/python_api/formatters/TestFormattersSBAPI.py Thu Oct 22 15:06:20 2015
@@ -1,7 +1,8 @@
 """Test Python APIs for working with formatters"""
 
+import lldb_shared
+
 import os, sys, time
-import unittest2
 import lldb
 from lldbtest import *
 import lldbutil
@@ -339,10 +340,3 @@ class SBFormattersAPITestCase(TestBase):
         if self.TraceOn():
              print int_vector
         self.assertTrue(int_vector.GetNumChildren() == 0, 'synthetic vector is still empty')
-
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/python_api/frame/TestFrames.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/python_api/frame/TestFrames.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/python_api/frame/TestFrames.py (original)
+++ lldb/trunk/test/python_api/frame/TestFrames.py Thu Oct 22 15:06:20 2015
@@ -7,7 +7,6 @@ import lldb_shared
 
 import os, time
 import re
-import unittest2
 import lldb, lldbutil
 from lldbtest import *
 
@@ -200,10 +199,3 @@ class FrameAPITestCase(TestBase):
 
         # The latest two frames should not be equal.
         self.assertFalse(frameOutOfC.IsEqual(frameNow))
-
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/python_api/frame/inlines/TestInlinedFrame.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/python_api/frame/inlines/TestInlinedFrame.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/python_api/frame/inlines/TestInlinedFrame.py (original)
+++ lldb/trunk/test/python_api/frame/inlines/TestInlinedFrame.py Thu Oct 22 15:06:20 2015
@@ -2,9 +2,10 @@
 Testlldb Python SBFrame APIs IsInlined() and GetFunctionName().
 """
 
+import lldb_shared
+
 import os, time
 import re
-import unittest2
 import lldb, lldbutil
 from lldbtest import *
 
@@ -73,9 +74,3 @@ class InlinedFrameAPITestCase(TestBase):
                 print stack_traces2
                 self.expect(stack_traces2, "Second stop at %s:%d" % (self.source, self.second_stop), exe=False,
                             substrs = ['%s:%d' % (self.source, self.second_stop)])
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/python_api/function_symbol/TestDisasmAPI.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/python_api/function_symbol/TestDisasmAPI.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/python_api/function_symbol/TestDisasmAPI.py (original)
+++ lldb/trunk/test/python_api/function_symbol/TestDisasmAPI.py Thu Oct 22 15:06:20 2015
@@ -2,9 +2,10 @@
 Test retrieval of SBAddress from function/symbol, disassembly, and SBAddress APIs.
 """
 
+import lldb_shared
+
 import os, time
 import re
-import unittest2
 import lldb, lldbutil
 from lldbtest import *
 
@@ -105,9 +106,3 @@ class DisasmAPITestCase(TestBase):
         desc2 = get_description(sa2)
         self.assertTrue(desc1 and desc2 and desc1 == desc2,
                         "SBAddress.GetDescription() API of sa1 and sa2 should return the same string")
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/python_api/function_symbol/TestSymbolAPI.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/python_api/function_symbol/TestSymbolAPI.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/python_api/function_symbol/TestSymbolAPI.py (original)
+++ lldb/trunk/test/python_api/function_symbol/TestSymbolAPI.py Thu Oct 22 15:06:20 2015
@@ -2,9 +2,10 @@
 Test newly added SBSymbol and SBAddress APIs.
 """
 
+import lldb_shared
+
 import os, time
 import re
-import unittest2
 import lldb, lldbutil
 from lldbtest import *
 
@@ -75,10 +76,3 @@ class SymbolAPITestCase(TestBase):
         if self.TraceOn():
             print "UUID:", addr_line1.GetModule().GetUUIDString()
         self.assertTrue(addr_line1.GetModule().GetUUIDString() == addr_line2.GetModule().GetUUIDString())
-
-        
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/python_api/hello_world/TestHelloWorld.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/python_api/hello_world/TestHelloWorld.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/python_api/hello_world/TestHelloWorld.py (original)
+++ lldb/trunk/test/python_api/hello_world/TestHelloWorld.py Thu Oct 22 15:06:20 2015
@@ -1,7 +1,8 @@
 """Test Python APIs for target (launch and attach), breakpoint, and process."""
 
+import lldb_shared
+
 import os, sys, time
-import unittest2
 import lldb
 import time
 from lldbtest import *
@@ -139,9 +140,3 @@ class HelloWorldTestCase(TestBase):
         self.expect(stacktraces, exe=False,
             substrs = ['main.c:%d' % self.line2,
                        '(int)argc=3'])
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/python_api/interpreter/TestCommandInterpreterAPI.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/python_api/interpreter/TestCommandInterpreterAPI.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/python_api/interpreter/TestCommandInterpreterAPI.py (original)
+++ lldb/trunk/test/python_api/interpreter/TestCommandInterpreterAPI.py Thu Oct 22 15:06:20 2015
@@ -1,7 +1,8 @@
 """Test the SBCommandInterpreter APIs."""
 
+import lldb_shared
+
 import os
-import unittest2
 import lldb
 from lldbtest import *
 
@@ -68,10 +69,3 @@ class CommandInterpreterAPICase(TestBase
 
         if self.TraceOn():
             lldbutil.print_stacktraces(process)        
-                        
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/python_api/lldbutil/frame/TestFrameUtils.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/python_api/lldbutil/frame/TestFrameUtils.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/python_api/lldbutil/frame/TestFrameUtils.py (original)
+++ lldb/trunk/test/python_api/lldbutil/frame/TestFrameUtils.py Thu Oct 22 15:06:20 2015
@@ -2,8 +2,9 @@
 Test utility functions for the frame object.
 """
 
+import lldb_shared
+
 import os
-import unittest2
 import lldb
 from lldbtest import *
 
@@ -54,10 +55,3 @@ class FrameUtilsTestCase(TestBase):
             lldbutil.print_stacktrace(thread)
             print "Current frame: %s" % frame0_args
             print "Parent frame: %s" % parent_args
-
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/python_api/lldbutil/iter/TestLLDBIterator.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/python_api/lldbutil/iter/TestLLDBIterator.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/python_api/lldbutil/iter/TestLLDBIterator.py (original)
+++ lldb/trunk/test/python_api/lldbutil/iter/TestLLDBIterator.py Thu Oct 22 15:06:20 2015
@@ -2,9 +2,10 @@
 Test the iteration protocol for some lldb container objects.
 """
 
+import lldb_shared
+
 import os, time
 import re
-import unittest2
 import lldb
 from lldbtest import *
 
@@ -117,9 +118,3 @@ class LLDBIteratorTestCase(TestBase):
                     print frame
 
         self.assertTrue(stopped_due_to_breakpoint)
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/python_api/lldbutil/iter/TestRegistersIterator.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/python_api/lldbutil/iter/TestRegistersIterator.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/python_api/lldbutil/iter/TestRegistersIterator.py (original)
+++ lldb/trunk/test/python_api/lldbutil/iter/TestRegistersIterator.py Thu Oct 22 15:06:20 2015
@@ -2,9 +2,10 @@
 Test the iteration protocol for frame registers.
 """
 
+import lldb_shared
+
 import os, time
 import re
-import unittest2
 import lldb
 from lldbtest import *
 
@@ -89,10 +90,3 @@ class RegistersIteratorTestCase(TestBase
 
                     # We've finished dumping the registers for frame #0.
                     break
-
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/python_api/lldbutil/process/TestPrintStackTraces.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/python_api/lldbutil/process/TestPrintStackTraces.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/python_api/lldbutil/process/TestPrintStackTraces.py (original)
+++ lldb/trunk/test/python_api/lldbutil/process/TestPrintStackTraces.py Thu Oct 22 15:06:20 2015
@@ -2,9 +2,10 @@
 Test SBprocess and SBThread APIs with printing of the stack traces using lldbutil.
 """
 
+import lldb_shared
+
 import os, time
 import re
-import unittest2
 import lldb
 from lldbtest import *
 
@@ -47,10 +48,3 @@ class ThreadsStackTracesTestCase(TestBas
         stacktraces = lldbutil.print_stacktraces(process, string_buffer=True)
         self.expect(stacktraces, exe=False,
             substrs = ['(int)argc=3'])
-
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/python_api/module_section/TestModuleAndSection.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/python_api/module_section/TestModuleAndSection.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/python_api/module_section/TestModuleAndSection.py (original)
+++ lldb/trunk/test/python_api/module_section/TestModuleAndSection.py Thu Oct 22 15:06:20 2015
@@ -2,9 +2,10 @@
 Test some SBModule and SBSection APIs.
 """
 
+import lldb_shared
+
 import os, time
 import re
-import unittest2
 import lldb
 from lldbtest import *
 from lldbutil import symbol_type_to_str
@@ -121,9 +122,3 @@ class ModuleAndSectionAPIsTestCase(TestB
         INDENT2 = INDENT * 2
         for cu in exe_module.compile_unit_iter():
             print cu
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/python_api/objc_type/TestObjCType.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/python_api/objc_type/TestObjCType.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/python_api/objc_type/TestObjCType.py (original)
+++ lldb/trunk/test/python_api/objc_type/TestObjCType.py Thu Oct 22 15:06:20 2015
@@ -2,9 +2,10 @@
 Test SBType for ObjC classes.
 """
 
+import lldb_shared
+
 import os, time
 import re
-import unittest2
 import lldb, lldbutil
 from lldbtest import *
 
@@ -58,9 +59,3 @@ class ObjCSBTypeTestCase(TestBase):
         aBarField = aBarType.GetFieldAtIndex(0)
 
         self.assertTrue(aBarField.GetName() == "_iVar", "The field has the right name")
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/python_api/process/TestProcessAPI.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/python_api/process/TestProcessAPI.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/python_api/process/TestProcessAPI.py (original)
+++ lldb/trunk/test/python_api/process/TestProcessAPI.py Thu Oct 22 15:06:20 2015
@@ -2,8 +2,9 @@
 Test SBProcess APIs, including ReadMemory(), WriteMemory(), and others.
 """
 
+import lldb_shared
+
 import os, time
-import unittest2
 import lldb
 from lldbutil import get_stopped_thread, state_type_to_str
 from lldbtest import *
@@ -283,10 +284,3 @@ class ProcessAPITestCase(TestBase):
         num = process.GetNumSupportedHardwareWatchpoints(error)
         if self.TraceOn() and error.Success():
             print "Number of supported hardware watchpoints: %d" % num
-
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/python_api/process/io/TestProcessIO.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/python_api/process/io/TestProcessIO.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/python_api/process/io/TestProcessIO.py (original)
+++ lldb/trunk/test/python_api/process/io/TestProcessIO.py Thu Oct 22 15:06:20 2015
@@ -1,7 +1,8 @@
 """Test Python APIs for process IO."""
 
+import lldb_shared
+
 import os, sys, time
-import unittest2
 import lldb
 from lldbtest import *
 import lldbutil
@@ -201,9 +202,3 @@ class ProcessIOTestCase(TestBase):
         for line in self.lines:
             check_line = 'input line to stderr: %s' % (line)
             self.assertTrue(check_line in error, "verify stderr line shows up in STDERR")
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/python_api/rdar-12481949/Test-rdar-12481949.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/python_api/rdar-12481949/Test-rdar-12481949.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/python_api/rdar-12481949/Test-rdar-12481949.py (original)
+++ lldb/trunk/test/python_api/rdar-12481949/Test-rdar-12481949.py Thu Oct 22 15:06:20 2015
@@ -2,8 +2,9 @@
 Check that SBValue.GetValueAsSigned() does the right thing for a 32-bit -1.
 """
 
+import lldb_shared
+
 import os, time
-import unittest2
 import lldb
 from lldbtest import *
 import lldbutil
@@ -49,9 +50,3 @@ class Radar12481949DataFormatterTestCase
         self.assertTrue(self.frame().FindVariable("myvar").GetValueAsUnsigned() != -1, "GetValueAsUnsigned() does not say -1")
         self.assertTrue(self.frame().FindVariable("myvar").GetValueAsUnsigned() == 0xFFFFFFFFFFFFFFFF, "GetValueAsUnsigned() says 0xFFFFFFFFFFFFFFFF")
         self.assertTrue(self.frame().FindVariable("myvar").GetValueAsSigned() != 0xFFFFFFFF, "GetValueAsUnsigned() does not say 0xFFFFFFFF")
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/python_api/sbdata/TestSBData.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/python_api/sbdata/TestSBData.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/python_api/sbdata/TestSBData.py (original)
+++ lldb/trunk/test/python_api/sbdata/TestSBData.py Thu Oct 22 15:06:20 2015
@@ -1,7 +1,8 @@
 """Test the SBData APIs."""
 
+import lldb_shared
+
 import os
-import unittest2
 import lldb
 from lldbtest import *
 from math import fabs
@@ -343,9 +344,3 @@ class SBDataAPICase(TestBase):
                                                                    arg,
                                                                    stream.GetData()))
         self.assertTrue(expected == result, "%s(error, %s) == %s != %s" % (func.__name__, arg, result, expected))
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/python_api/sbvalue_persist/TestSBValuePersist.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/python_api/sbvalue_persist/TestSBValuePersist.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/python_api/sbvalue_persist/TestSBValuePersist.py (original)
+++ lldb/trunk/test/python_api/sbvalue_persist/TestSBValuePersist.py Thu Oct 22 15:06:20 2015
@@ -1,7 +1,8 @@
 """Test SBValue::Persist"""
 
+import lldb_shared
+
 import os, sys, time
-import unittest2
 import lldb
 from lldbtest import *
 import lldbutil
@@ -69,9 +70,3 @@ class SBValuePersistTestCase(TestBase):
         self.assertTrue(bazPersist.GetSummary() == '"85"', "bazPersist != 85")
         
         self.expect("expr *(%s)" % (barPersist.GetName()), substrs = ['= 4'])
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/python_api/section/TestSectionAPI.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/python_api/section/TestSectionAPI.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/python_api/section/TestSectionAPI.py (original)
+++ lldb/trunk/test/python_api/section/TestSectionAPI.py Thu Oct 22 15:06:20 2015
@@ -2,7 +2,8 @@
 Test SBSection APIs.
 """
 
-import unittest2
+import lldb_shared
+
 from lldbtest import *
 
 class SectionAPITestCase(TestBase):
@@ -36,9 +37,3 @@ class SectionAPITestCase(TestBase):
 
         self.assertIsNotNone(data_section)
         self.assertEquals(data_section.target_byte_size, 1)
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/python_api/signals/TestSignalsAPI.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/python_api/signals/TestSignalsAPI.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/python_api/signals/TestSignalsAPI.py (original)
+++ lldb/trunk/test/python_api/signals/TestSignalsAPI.py Thu Oct 22 15:06:20 2015
@@ -2,8 +2,9 @@
 Test SBProcess APIs, including ReadMemory(), WriteMemory(), and others.
 """
 
+import lldb_shared
+
 import os, time
-import unittest2
 import lldb
 from lldbutil import get_stopped_thread, state_type_to_str
 from lldbtest import *
@@ -42,10 +43,3 @@ class SignalsAPITestCase(TestBase):
         process.Continue()
         self.assertTrue(process.state == lldb.eStateExited, "The process should have exited")
         self.assertTrue(process.GetExitStatus() == 0, "The process should have returned 0")
-
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/python_api/symbol-context/TestSymbolContext.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/python_api/symbol-context/TestSymbolContext.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/python_api/symbol-context/TestSymbolContext.py (original)
+++ lldb/trunk/test/python_api/symbol-context/TestSymbolContext.py Thu Oct 22 15:06:20 2015
@@ -2,9 +2,10 @@
 Test SBSymbolContext APIs.
 """
 
+import lldb_shared
+
 import os, time
 import re
-import unittest2
 import lldb, lldbutil
 from lldbtest import *
 
@@ -83,10 +84,3 @@ class SymbolContextAPITestCase(TestBase)
         symbol = context.GetSymbol()
         self.assertTrue(function.GetName() == symbol.GetName() and symbol.GetName() == 'c',
                         "The symbol name should be 'c'")
-
-        
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/python_api/target/TestTargetAPI.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/python_api/target/TestTargetAPI.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/python_api/target/TestTargetAPI.py (original)
+++ lldb/trunk/test/python_api/target/TestTargetAPI.py Thu Oct 22 15:06:20 2015
@@ -2,9 +2,11 @@
 Test SBTarget APIs.
 """
 
+import lldb_shared
+
+import unittest2
 import os, time
 import re
-import unittest2
 import lldb, lldbutil
 from lldbtest import *
 
@@ -365,10 +367,3 @@ class TargetAPITestCase(TestBase):
         desc2 = get_description(symbol2)
         self.assertTrue(desc1 and desc2 and desc1 == desc2,
                         "The two addresses should resolve to the same symbol")
-
-        
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/python_api/thread/TestThreadAPI.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/python_api/thread/TestThreadAPI.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/python_api/thread/TestThreadAPI.py (original)
+++ lldb/trunk/test/python_api/thread/TestThreadAPI.py Thu Oct 22 15:06:20 2015
@@ -2,8 +2,9 @@
 Test SBThread APIs.
 """
 
+import lldb_shared
+
 import os, time
-import unittest2
 import lldb
 from lldbutil import get_stopped_thread, get_caller_symbol
 from lldbtest import *
@@ -240,10 +241,3 @@ class ThreadAPITestCase(TestBase):
         thread.RunToAddress(start_addr)
         self.runCmd("process status")
         #self.runCmd("thread backtrace")
-
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/python_api/type/TestTypeList.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/python_api/type/TestTypeList.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/python_api/type/TestTypeList.py (original)
+++ lldb/trunk/test/python_api/type/TestTypeList.py Thu Oct 22 15:06:20 2015
@@ -2,9 +2,10 @@
 Test SBType and SBTypeList API.
 """
 
+import lldb_shared
+
 import os, time
 import re
-import unittest2
 import lldb, lldbutil
 from lldbtest import *
 
@@ -105,9 +106,3 @@ class TypeAndTypeListTestCase(TestBase):
         # SBType.GetBasicType() takes an enum 'BasicType' (lldb-enumerations.h).
         int_type = id_type.GetBasicType(lldb.eBasicTypeInt)
         self.assertTrue(id_type == int_type)
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/python_api/value/TestValueAPI.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/python_api/value/TestValueAPI.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/python_api/value/TestValueAPI.py (original)
+++ lldb/trunk/test/python_api/value/TestValueAPI.py Thu Oct 22 15:06:20 2015
@@ -2,9 +2,10 @@
 Test some SBValue APIs.
 """
 
+import lldb_shared
+
 import os, time
 import re
-import unittest2
 import lldb, lldbutil
 from lldbtest import *
 
@@ -129,9 +130,3 @@ class ValueAPITestCase(TestBase):
         val_a = target.EvaluateExpression('a')
         self.assertTrue(val_s.GetChildMemberWithName('a').AddressOf(), VALID_VARIABLE)
         self.assertTrue(val_a.Cast(val_i.GetType()).AddressOf(), VALID_VARIABLE)
-        
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/python_api/value/change_values/TestChangeValueAPI.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/python_api/value/change_values/TestChangeValueAPI.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/python_api/value/change_values/TestChangeValueAPI.py (original)
+++ lldb/trunk/test/python_api/value/change_values/TestChangeValueAPI.py Thu Oct 22 15:06:20 2015
@@ -2,9 +2,10 @@
 Test some SBValue APIs.
 """
 
+import lldb_shared
+
 import os, time
 import re
-import unittest2
 import lldb, lldbutil
 from lldbtest import *
 
@@ -142,9 +143,3 @@ class ChangeValueAPITestCase(TestBase):
         self.assertTrue(thread == None, "We should not have managed to hit our second breakpoint with sp == 1")
         
         process.Kill()
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/python_api/value/linked_list/TestValueAPILinkedList.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/python_api/value/linked_list/TestValueAPILinkedList.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/python_api/value/linked_list/TestValueAPILinkedList.py (original)
+++ lldb/trunk/test/python_api/value/linked_list/TestValueAPILinkedList.py Thu Oct 22 15:06:20 2015
@@ -3,9 +3,10 @@ Test SBValue API linked_list_iter which
 supports iteration till the end of list is reached.
 """
 
+import lldb_shared
+
 import os, time
 import re
-import unittest2
 import lldb, lldbutil
 from lldbtest import *
 
@@ -127,9 +128,3 @@ class ValueAsLinkedListTestCase(TestBase
             list.append(int(t.GetChildMemberWithName("id").GetValue()))
 
         self.assertTrue(len(list) == 3)
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/python_api/value_var_update/TestValueVarUpdate.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/python_api/value_var_update/TestValueVarUpdate.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/python_api/value_var_update/TestValueVarUpdate.py (original)
+++ lldb/trunk/test/python_api/value_var_update/TestValueVarUpdate.py Thu Oct 22 15:06:20 2015
@@ -1,7 +1,8 @@
 """Test SBValue::GetValueDidChange"""
 
+import lldb_shared
+
 import os, sys, time
-import unittest2
 import lldb
 import time
 from lldbtest import *
@@ -54,9 +55,3 @@ class HelloWorldTestCase(TestBase):
         # Check complex type
         self.assertTrue(c.GetChildAtIndex(0).GetChildAtIndex(0).GetValueDidChange() and
                         not c.GetChildAtIndex(1).GetValueDidChange(), "GetValueDidChange() is saying a lie")
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/python_api/watchpoint/TestSetWatchpoint.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/python_api/watchpoint/TestSetWatchpoint.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/python_api/watchpoint/TestSetWatchpoint.py (original)
+++ lldb/trunk/test/python_api/watchpoint/TestSetWatchpoint.py Thu Oct 22 15:06:20 2015
@@ -2,9 +2,10 @@
 Use lldb Python SBValue API to create a watchpoint for read_write of 'globl' var.
 """
 
+import lldb_shared
+
 import os, time
 import re
-import unittest2
 import lldb, lldbutil
 from lldbtest import *
 
@@ -87,10 +88,3 @@ class SetWatchpointAPITestCase(TestBase)
 
         # At this point, the inferior process should have exited.
         self.assertTrue(process.GetState() == lldb.eStateExited, PROCESS_EXITED)
-
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/python_api/watchpoint/TestWatchpointIgnoreCount.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/python_api/watchpoint/TestWatchpointIgnoreCount.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/python_api/watchpoint/TestWatchpointIgnoreCount.py (original)
+++ lldb/trunk/test/python_api/watchpoint/TestWatchpointIgnoreCount.py Thu Oct 22 15:06:20 2015
@@ -2,9 +2,10 @@
 Use lldb Python SBWatchpoint API to set the ignore count.
 """
 
+import lldb_shared
+
 import os, time
 import re
-import unittest2
 import lldb, lldbutil
 from lldbtest import *
 
@@ -83,10 +84,3 @@ class WatchpointIgnoreCountTestCase(Test
         self.assertTrue(watchpoint.GetWatchSize() == 4)
         self.assertTrue(watchpoint.GetHitCount() == 2)
         print watchpoint
-
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/python_api/watchpoint/TestWatchpointIter.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/python_api/watchpoint/TestWatchpointIter.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/python_api/watchpoint/TestWatchpointIter.py (original)
+++ lldb/trunk/test/python_api/watchpoint/TestWatchpointIter.py Thu Oct 22 15:06:20 2015
@@ -2,9 +2,10 @@
 Use lldb Python SBTarget API to iterate on the watchpoint(s) for the target.
 """
 
+import lldb_shared
+
 import os, time
 import re
-import unittest2
 import lldb, lldbutil
 from lldbtest import *
 
@@ -108,10 +109,3 @@ class WatchpointIteratorTestCase(TestBas
             self.assertTrue(watchpoint.GetWatchSize() == 4)
             self.assertTrue(watchpoint.GetHitCount() == 1)
             print watchpoint
-
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/python_api/watchpoint/condition/TestWatchpointConditionAPI.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/python_api/watchpoint/condition/TestWatchpointConditionAPI.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/python_api/watchpoint/condition/TestWatchpointConditionAPI.py (original)
+++ lldb/trunk/test/python_api/watchpoint/condition/TestWatchpointConditionAPI.py Thu Oct 22 15:06:20 2015
@@ -2,8 +2,9 @@
 Test watchpoint condition API.
 """
 
+import lldb_shared
+
 import os, time
-import unittest2
 import lldb
 import lldbutil
 from lldbtest import *
@@ -84,10 +85,3 @@ class WatchpointConditionAPITestCase(Tes
 
         # Verify that the condition is met.
         self.assertTrue(value.GetValueAsUnsigned() == 5)
-
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/python_api/watchpoint/watchlocation/TestSetWatchlocation.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/python_api/watchpoint/watchlocation/TestSetWatchlocation.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/python_api/watchpoint/watchlocation/TestSetWatchlocation.py (original)
+++ lldb/trunk/test/python_api/watchpoint/watchlocation/TestSetWatchlocation.py Thu Oct 22 15:06:20 2015
@@ -2,9 +2,10 @@
 Use lldb Python SBValue.WatchPointee() API to create a watchpoint for write of '*g_char_ptr'.
 """
 
+import lldb_shared
+
 import os, time
 import re
-import unittest2
 import lldb, lldbutil
 from lldbtest import *
 
@@ -84,10 +85,3 @@ class SetWatchlocationAPITestCase(TestBa
             substrs = [self.violating_func])
 
         # This finishes our test.
-
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/python_api/watchpoint/watchlocation/TestTargetWatchAddress.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/python_api/watchpoint/watchlocation/TestTargetWatchAddress.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/python_api/watchpoint/watchlocation/TestTargetWatchAddress.py (original)
+++ lldb/trunk/test/python_api/watchpoint/watchlocation/TestTargetWatchAddress.py Thu Oct 22 15:06:20 2015
@@ -2,9 +2,10 @@
 Use lldb Python SBtarget.WatchAddress() API to create a watchpoint for write of '*g_char_ptr'.
 """
 
+import lldb_shared
+
 import os, time
 import re
-import unittest2
 import lldb, lldbutil
 from lldbtest import *
 
@@ -124,10 +125,3 @@ class TargetWatchAddressAPITestCase(Test
         self.assertFalse(watchpoint)
         self.expect(error.GetCString(), exe=False,
             substrs = ['watch size of %d is not supported' % 365])
-
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/settings/TestSettings.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/settings/TestSettings.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/settings/TestSettings.py (original)
+++ lldb/trunk/test/settings/TestSettings.py Thu Oct 22 15:06:20 2015
@@ -2,8 +2,9 @@
 Test lldb settings command.
 """
 
+import lldb_shared
+
 import os, time, re
-import unittest2
 import lldb
 from lldbtest import *
 
@@ -490,11 +491,3 @@ class SettingsCommandTestCase(TestBase):
                                  "target.process.extra-startup-command",
                                  "target.process.thread.step-avoid-regexp",
                                  "target.process.thread.trace-thread"])
-                                 
-        
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/settings/quoting/TestQuoting.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/settings/quoting/TestQuoting.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/settings/quoting/TestQuoting.py (original)
+++ lldb/trunk/test/settings/quoting/TestQuoting.py Thu Oct 22 15:06:20 2015
@@ -2,8 +2,9 @@
 Test quoting of arguments to lldb commands
 """
 
+import lldb_shared
+
 import os, time, re
-import unittest2
 import lldb
 from lldbtest import *
 
@@ -87,9 +88,3 @@ class SettingsCommandTestCase(TestBase):
         self.RemoveTempFile("stdout.txt")
 
         self.assertEqual(output, args_out)
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/source-manager/TestSourceManager.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/source-manager/TestSourceManager.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/source-manager/TestSourceManager.py (original)
+++ lldb/trunk/test/source-manager/TestSourceManager.py Thu Oct 22 15:06:20 2015
@@ -9,7 +9,8 @@ o test_modify_source_file_while_debuggin
   Test the caching mechanism of the source manager.
 """
 
-import unittest2
+import lldb_shared
+
 import lldb
 from lldbtest import *
 import lldbutil
@@ -168,10 +169,3 @@ class SourceManagerTestCase(TestBase):
         # Display the source code again.  We should see the updated line.
         self.expect("source list -f main.c -l %d" % self.line, SOURCE_DISPLAYED_CORRECTLY,
             substrs = ['Hello lldb'])
-
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/terminal/TestSTTYBeforeAndAfter.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/terminal/TestSTTYBeforeAndAfter.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/terminal/TestSTTYBeforeAndAfter.py (original)
+++ lldb/trunk/test/terminal/TestSTTYBeforeAndAfter.py Thu Oct 22 15:06:20 2015
@@ -2,8 +2,9 @@
 Test that 'stty -a' displays the same output before and after running the lldb command.
 """
 
+import lldb_shared
+
 import os
-import unittest2
 import lldb
 from lldbtest import *
 
@@ -116,10 +117,3 @@ class CommandLineCompletionTestCase(Test
             if len(tuple[0]) == 0:
                 break
             self.assertTrue(tuple[0] == tuple[1])
-
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/tools/lldb-mi/TestMiExit.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/tools/lldb-mi/TestMiExit.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/tools/lldb-mi/TestMiExit.py (original)
+++ lldb/trunk/test/tools/lldb-mi/TestMiExit.py Thu Oct 22 15:06:20 2015
@@ -2,9 +2,10 @@
 Test that the lldb-mi driver exits properly.
 """
 
+import lldb_shared
+
 import lldbmi_testcase
 from lldbtest import *
-import unittest2
 
 class MiExitTestCase(lldbmi_testcase.MiTestCaseBase):
 
@@ -82,6 +83,3 @@ class MiExitTestCase(lldbmi_testcase.MiT
         self.runCmd("q")
         import pexpect
         self.expect(pexpect.EOF)
-
-if __name__ == '__main__':
-    unittest2.main()

Modified: lldb/trunk/test/tools/lldb-mi/TestMiFile.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/tools/lldb-mi/TestMiFile.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/tools/lldb-mi/TestMiFile.py (original)
+++ lldb/trunk/test/tools/lldb-mi/TestMiFile.py Thu Oct 22 15:06:20 2015
@@ -2,9 +2,10 @@
 Test lldb-mi -file-xxx commands.
 """
 
+import lldb_shared
+
 import lldbmi_testcase
 from lldbtest import *
-import unittest2
 
 class MiFileTestCase(lldbmi_testcase.MiTestCaseBase):
 
@@ -76,6 +77,3 @@ class MiFileTestCase(lldbmi_testcase.MiT
         path = "unknown_dir/%s" % self.myexe
         self.runCmd("-file-exec-and-symbols %s" % path)
         self.expect("\^error")
-
-if __name__ == '__main__':
-    unittest2.main()

Modified: lldb/trunk/test/tools/lldb-mi/TestMiGdbSetShow.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/tools/lldb-mi/TestMiGdbSetShow.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/tools/lldb-mi/TestMiGdbSetShow.py (original)
+++ lldb/trunk/test/tools/lldb-mi/TestMiGdbSetShow.py Thu Oct 22 15:06:20 2015
@@ -2,9 +2,11 @@
 Test lldb-mi -gdb-set and -gdb-show commands.
 """
 
+import lldb_shared
+
+import unittest2
 import lldbmi_testcase
 from lldbtest import *
-import unittest2
 
 class MiGdbSetShowTestCase(lldbmi_testcase.MiTestCaseBase):
 
@@ -191,6 +193,3 @@ class MiGdbSetShowTestCase(lldbmi_testca
         self.expect("\^done");
         self.runCmd("-var-evaluate-expression var_a");
         self.expect("\^done,value=\"10\"");
-
-if __name__ == '__main__':
-    unittest2.main()

Modified: lldb/trunk/test/tools/lldb-mi/TestMiLibraryLoaded.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/tools/lldb-mi/TestMiLibraryLoaded.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/tools/lldb-mi/TestMiLibraryLoaded.py (original)
+++ lldb/trunk/test/tools/lldb-mi/TestMiLibraryLoaded.py Thu Oct 22 15:06:20 2015
@@ -2,9 +2,10 @@
 Test lldb-mi =library-loaded notifications.
 """
 
+import lldb_shared
+
 import lldbmi_testcase
 from lldbtest import *
-import unittest2
 
 class MiLibraryLoadedTestCase(lldbmi_testcase.MiTestCaseBase):
 
@@ -29,6 +30,3 @@ class MiLibraryLoadedTestCase(lldbmi_tes
         def add_slashes(x): return x.replace("\\", "\\\\").replace("\"", "\\\"").replace("\'", "\\\'").replace("\0", "\\\0")
         self.expect([ "=library-loaded,id=\"%s\",target-name=\"%s\",host-name=\"%s\",symbols-loaded=\"1\",symbols-path=\"%s\",loaded_addr=\"-\",size=\"[0-9]+\"" % (add_slashes(path), add_slashes(path), add_slashes(path), add_slashes(symbols_path)),
                       "=library-loaded,id=\"%s\",target-name=\"%s\",host-name=\"%s\",symbols-loaded=\"0\",loaded_addr=\"-\",size=\"[0-9]+\"" % (add_slashes(path), add_slashes(path), add_slashes(path)) ])
-
-if __name__ == '__main__':
-    unittest2.main()

Modified: lldb/trunk/test/tools/lldb-mi/TestMiPrompt.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/tools/lldb-mi/TestMiPrompt.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/tools/lldb-mi/TestMiPrompt.py (original)
+++ lldb/trunk/test/tools/lldb-mi/TestMiPrompt.py Thu Oct 22 15:06:20 2015
@@ -2,9 +2,10 @@
 Test that the lldb-mi driver prints prompt properly.
 """
 
+import lldb_shared
+
 import lldbmi_testcase
 from lldbtest import *
-import unittest2
 
 class MiPromptTestCase(lldbmi_testcase.MiTestCaseBase):
 
@@ -50,6 +51,3 @@ class MiPromptTestCase(lldbmi_testcase.M
         # Test that lldb-mi is ready after program exited
         self.expect("\*stopped,reason=\"exited-normally\"")
         self.expect(self.child_prompt, exactly = True)
-
-if __name__ == '__main__':
-    unittest2.main()

Modified: lldb/trunk/test/tools/lldb-mi/breakpoint/TestMiBreak.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/tools/lldb-mi/breakpoint/TestMiBreak.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/tools/lldb-mi/breakpoint/TestMiBreak.py (original)
+++ lldb/trunk/test/tools/lldb-mi/breakpoint/TestMiBreak.py Thu Oct 22 15:06:20 2015
@@ -2,9 +2,11 @@
 Test lldb-mi -break-xxx commands.
 """
 
+import lldb_shared
+
+import unittest2
 import lldbmi_testcase
 from lldbtest import *
-import unittest2
 
 class MiBreakTestCase(lldbmi_testcase.MiTestCaseBase):
 
@@ -247,6 +249,3 @@ class MiBreakTestCase(lldbmi_testcase.Mi
         self.runCmd("-exec-continue")
         self.expect("\^running")
         self.expect("\*stopped,reason=\"exited-normally\"")
-
-if __name__ == '__main__':
-    unittest2.main()

Modified: lldb/trunk/test/tools/lldb-mi/control/TestMiExec.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/tools/lldb-mi/control/TestMiExec.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/tools/lldb-mi/control/TestMiExec.py (original)
+++ lldb/trunk/test/tools/lldb-mi/control/TestMiExec.py Thu Oct 22 15:06:20 2015
@@ -2,9 +2,10 @@
 Test lldb-mi -exec-xxx commands.
 """
 
+import lldb_shared
+
 import lldbmi_testcase
 from lldbtest import *
-import unittest2
 
 class MiExecTestCase(lldbmi_testcase.MiTestCaseBase):
 
@@ -466,6 +467,3 @@ class MiExecTestCase(lldbmi_testcase.MiT
         self.runCmd("-exec-finish --thread 1 --frame 0")
         self.expect("\^running")
         self.expect("\*stopped,reason=\"end-stepping-range\".+?func=\"main\"")
-
-if __name__ == '__main__':
-    unittest2.main()

Modified: lldb/trunk/test/tools/lldb-mi/data/TestMiData.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/tools/lldb-mi/data/TestMiData.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/tools/lldb-mi/data/TestMiData.py (original)
+++ lldb/trunk/test/tools/lldb-mi/data/TestMiData.py Thu Oct 22 15:06:20 2015
@@ -2,9 +2,11 @@
 Test lldb-mi -data-xxx commands.
 """
 
+import lldb_shared
+
+import unittest2
 import lldbmi_testcase
 from lldbtest import *
-import unittest2
 
 class MiDataTestCase(lldbmi_testcase.MiTestCaseBase):
 
@@ -334,6 +336,3 @@ class MiDataTestCase(lldbmi_testcase.MiT
         # Check 2d array 
         self.runCmd("-data-evaluate-expression array2d")
         self.expect("\^done,value=\"\{\[0\] = \{\[0\] = 1, \[1\] = 2, \[2\] = 3\}, \[1\] = \{\[0\] = 4, \[1\] = 5, \[2\] = 6\}\}\"")
-
-if __name__ == '__main__':
-    unittest2.main()

Modified: lldb/trunk/test/tools/lldb-mi/interpreter/TestMiCliSupport.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/tools/lldb-mi/interpreter/TestMiCliSupport.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/tools/lldb-mi/interpreter/TestMiCliSupport.py (original)
+++ lldb/trunk/test/tools/lldb-mi/interpreter/TestMiCliSupport.py Thu Oct 22 15:06:20 2015
@@ -2,9 +2,10 @@
 Test lldb-mi can interpret CLI commands directly.
 """
 
+import lldb_shared
+
 import lldbmi_testcase
 from lldbtest import *
-import unittest2
 
 class MiCliSupportTestCase(lldbmi_testcase.MiTestCaseBase):
 
@@ -209,6 +210,3 @@ class MiCliSupportTestCase(lldbmi_testca
         self.expect("\^done")
         self.expect("@\"argc=1\\\\r\\\\n")
         self.expect("\*stopped,reason=\"exited-normally\"")
-
-if __name__ == '__main__':
-    unittest2.main()

Modified: lldb/trunk/test/tools/lldb-mi/interpreter/TestMiInterpreterExec.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/tools/lldb-mi/interpreter/TestMiInterpreterExec.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/tools/lldb-mi/interpreter/TestMiInterpreterExec.py (original)
+++ lldb/trunk/test/tools/lldb-mi/interpreter/TestMiInterpreterExec.py Thu Oct 22 15:06:20 2015
@@ -2,9 +2,10 @@
 Test lldb-mi -interpreter-exec command.
 """
 
+import lldb_shared
+
 import lldbmi_testcase
 from lldbtest import *
-import unittest2
 
 class MiInterpreterExecTestCase(lldbmi_testcase.MiTestCaseBase):
 
@@ -231,6 +232,3 @@ class MiInterpreterExecTestCase(lldbmi_t
         self.expect("\^done")
         self.expect("@\"argc=1\\\\r\\\\n")
         self.expect("\*stopped,reason=\"exited-normally\"")
-
-if __name__ == '__main__':
-    unittest2.main()

Modified: lldb/trunk/test/tools/lldb-mi/lldbmi_testcase.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/tools/lldb-mi/lldbmi_testcase.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/tools/lldb-mi/lldbmi_testcase.py (original)
+++ lldb/trunk/test/tools/lldb-mi/lldbmi_testcase.py Thu Oct 22 15:06:20 2015
@@ -2,8 +2,9 @@
 Base class for lldb-mi test cases.
 """
 
+import lldb_shared
+
 from lldbtest import *
-import unittest2
 
 class MiTestCaseBase(Base):
 

Modified: lldb/trunk/test/tools/lldb-mi/signal/TestMiSignal.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/tools/lldb-mi/signal/TestMiSignal.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/tools/lldb-mi/signal/TestMiSignal.py (original)
+++ lldb/trunk/test/tools/lldb-mi/signal/TestMiSignal.py Thu Oct 22 15:06:20 2015
@@ -2,9 +2,10 @@
 Test that the lldb-mi handles signals properly.
 """
 
+import lldb_shared
+
 import lldbmi_testcase
 from lldbtest import *
-import unittest2
 
 class MiSignalTestCase(lldbmi_testcase.MiTestCaseBase):
 
@@ -197,6 +198,3 @@ class MiSignalTestCase(lldbmi_testcase.M
         # Exit
         self.runCmd("-gdb-exit")
         self.expect("\^exit")
-
-if __name__ == '__main__':
-    unittest2.main()

Modified: lldb/trunk/test/tools/lldb-mi/stack/TestMiStack.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/tools/lldb-mi/stack/TestMiStack.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/tools/lldb-mi/stack/TestMiStack.py (original)
+++ lldb/trunk/test/tools/lldb-mi/stack/TestMiStack.py Thu Oct 22 15:06:20 2015
@@ -2,9 +2,10 @@
 Test lldb-mi -stack-xxx commands.
 """
 
+import lldb_shared
+
 import lldbmi_testcase
 from lldbtest import *
-import unittest2
 
 class MiStackTestCase(lldbmi_testcase.MiTestCaseBase):
 
@@ -481,6 +482,3 @@ class MiStackTestCase(lldbmi_testcase.Mi
         # Test that current frame is #0 and it has the same information
         self.runCmd("-stack-info-frame")
         self.expect("\^done,frame=\{level=\"0\",addr=\"0x[0-9a-f]+\",func=\"main\",file=\"main\.cpp\",fullname=\".+?main\.cpp\",line=\"\d+\"\}")
-
-if __name__ == '__main__':
-    unittest2.main()

Modified: lldb/trunk/test/tools/lldb-mi/startup_options/TestMiStartupOptions.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/tools/lldb-mi/startup_options/TestMiStartupOptions.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/tools/lldb-mi/startup_options/TestMiStartupOptions.py (original)
+++ lldb/trunk/test/tools/lldb-mi/startup_options/TestMiStartupOptions.py Thu Oct 22 15:06:20 2015
@@ -2,9 +2,10 @@
 Test lldb-mi startup options.
 """
 
+import lldb_shared
+
 import lldbmi_testcase
 from lldbtest import *
-import unittest2
 
 class MiStartupOptionsTestCase(lldbmi_testcase.MiTestCaseBase):
 
@@ -295,6 +296,3 @@ class MiStartupOptionsTestCase(lldbmi_te
         # Delete log
         for f in logFile:
             os.remove(f)
-
-if __name__ == '__main__':
-    unittest2.main()

Modified: lldb/trunk/test/tools/lldb-mi/symbol/TestMiSymbol.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/tools/lldb-mi/symbol/TestMiSymbol.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/tools/lldb-mi/symbol/TestMiSymbol.py (original)
+++ lldb/trunk/test/tools/lldb-mi/symbol/TestMiSymbol.py Thu Oct 22 15:06:20 2015
@@ -2,9 +2,10 @@
 Test lldb-mi -symbol-xxx commands.
 """
 
+import lldb_shared
+
 import lldbmi_testcase
 from lldbtest import *
-import unittest2
 
 class MiSymbolTestCase(lldbmi_testcase.MiTestCaseBase):
 
@@ -69,6 +70,3 @@ class MiSymbolTestCase(lldbmi_testcase.M
         # Test that -symbol-list-lines fails when file doesn't exist
         self.runCmd("-symbol-list-lines unknown_dir/main.cpp")
         self.expect("\^error,message=\"warning: No source filenames matched 'unknown_dir/main\.cpp'\. error: no source filenames matched any command arguments \"")
-
-if __name__ == '__main__':
-    unittest2.main()

Modified: lldb/trunk/test/tools/lldb-mi/syntax/TestMiSyntax.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/tools/lldb-mi/syntax/TestMiSyntax.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/tools/lldb-mi/syntax/TestMiSyntax.py (original)
+++ lldb/trunk/test/tools/lldb-mi/syntax/TestMiSyntax.py Thu Oct 22 15:06:20 2015
@@ -2,9 +2,10 @@
 Test that the lldb-mi driver understands MI command syntax.
 """
 
+import lldb_shared
+
 import lldbmi_testcase
 from lldbtest import *
-import unittest2
 
 class MiSyntaxTestCase(lldbmi_testcase.MiTestCaseBase):
 
@@ -78,6 +79,3 @@ class MiSyntaxTestCase(lldbmi_testcase.M
         # Test that a process output is wrapped correctly
         self.expect("\@\"'\\\\r\\\\n\"")
         self.expect("\@\"` - it's \\\\\\\\n\\\\x12\\\\\"\\\\\\\\\\\\\"")
-
-if __name__ == '__main__':
-    unittest2.main()

Modified: lldb/trunk/test/tools/lldb-mi/target/TestMiTarget.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/tools/lldb-mi/target/TestMiTarget.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/tools/lldb-mi/target/TestMiTarget.py (original)
+++ lldb/trunk/test/tools/lldb-mi/target/TestMiTarget.py Thu Oct 22 15:06:20 2015
@@ -2,9 +2,10 @@
 Test lldb-mi -target-xxx commands.
 """
 
+import lldb_shared
+
 import lldbmi_testcase
 from lldbtest import *
-import unittest2
 
 class MiTargetTestCase(lldbmi_testcase.MiTestCaseBase):
 

Modified: lldb/trunk/test/tools/lldb-mi/variable/TestMiGdbSetShowPrint.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/tools/lldb-mi/variable/TestMiGdbSetShowPrint.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/tools/lldb-mi/variable/TestMiGdbSetShowPrint.py (original)
+++ lldb/trunk/test/tools/lldb-mi/variable/TestMiGdbSetShowPrint.py Thu Oct 22 15:06:20 2015
@@ -3,9 +3,10 @@
 Test lldb-mi -gdb-set and -gdb-show commands for 'print option-name'.
 """
 
+import lldb_shared
+
 import lldbmi_testcase
 from lldbtest import *
-import unittest2
 
 class MiGdbSetShowTestCase(lldbmi_testcase.MiTestCaseBase):
 
@@ -225,6 +226,3 @@ class MiGdbSetShowTestCase(lldbmi_testca
         # Test that -gdb-set print aggregate-field-names fails when option is unknown
         self.runCmd("-gdb-set print aggregate-field-names unknown")
         self.expect("\^error,msg=\"The request ''print' expects option-name and \"on\" or \"off\"' failed.\"")
-
-if __name__ == '__main__':
-    unittest2.main()

Modified: lldb/trunk/test/tools/lldb-mi/variable/TestMiVar.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/tools/lldb-mi/variable/TestMiVar.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/tools/lldb-mi/variable/TestMiVar.py (original)
+++ lldb/trunk/test/tools/lldb-mi/variable/TestMiVar.py Thu Oct 22 15:06:20 2015
@@ -2,9 +2,10 @@
 Test lldb-mi -var-xxx commands.
 """
 
+import lldb_shared
+
 import lldbmi_testcase
 from lldbtest import *
-import unittest2
 
 class MiVarTestCase(lldbmi_testcase.MiTestCaseBase):
 
@@ -353,6 +354,3 @@ class MiVarTestCase(lldbmi_testcase.MiTe
         # Test for std::string
         self.runCmd("-var-create - * std_string")
         self.expect('\^done,name="var\d+",numchild="[0-9]+",value="\\\\"hello\\\\"",type="std::[\S]*?string",thread-id="1",has_more="0"')
-
-if __name__ == '__main__':
-    unittest2.main()

Modified: lldb/trunk/test/tools/lldb-server/TestGDBRemoteMemoryRead.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/tools/lldb-server/TestGDBRemoteMemoryRead.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/tools/lldb-server/TestGDBRemoteMemoryRead.py (original)
+++ lldb/trunk/test/tools/lldb-server/TestGDBRemoteMemoryRead.py Thu Oct 22 15:06:20 2015
@@ -2,8 +2,9 @@
 Tests the binary ($x) and hex ($m) memory read packets of the remote stub
 """
 
+import lldb_shared
+
 import os
-import unittest2
 import lldb
 from lldbtest import *
 import lldbutil
@@ -36,10 +37,3 @@ class MemoryReadTestCase(TestBase):
 
         process.Continue()
         self.assertEqual(process.GetState(), lldb.eStateExited, "Process exited")
-
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/tools/lldb-server/TestGdbRemoteAttach.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/tools/lldb-server/TestGdbRemoteAttach.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/tools/lldb-server/TestGdbRemoteAttach.py (original)
+++ lldb/trunk/test/tools/lldb-server/TestGdbRemoteAttach.py Thu Oct 22 15:06:20 2015
@@ -1,6 +1,7 @@
+import lldb_shared
+
 import gdbremote_testcase
 import lldbgdbserverutils
-import unittest2
 
 from lldbtest import *
 
@@ -55,7 +56,3 @@ class TestGdbRemoteAttach(gdbremote_test
         self.build()
         self.set_inferior_startup_attach_manually()
         self.attach_with_vAttach()
-
-
-if __name__ == '__main__':
-    unittest2.main()

Modified: lldb/trunk/test/tools/lldb-server/TestGdbRemoteAuxvSupport.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/tools/lldb-server/TestGdbRemoteAuxvSupport.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/tools/lldb-server/TestGdbRemoteAuxvSupport.py (original)
+++ lldb/trunk/test/tools/lldb-server/TestGdbRemoteAuxvSupport.py Thu Oct 22 15:06:20 2015
@@ -1,4 +1,4 @@
-import unittest2
+import lldb_shared
 
 import gdbremote_testcase
 from lldbtest import *
@@ -197,7 +197,3 @@ class TestGdbRemoteAuxvSupport(gdbremote
         self.build()
         self.set_inferior_startup_launch()
         self.auxv_chunked_reads_work()
-
-
-if __name__ == '__main__':
-    unittest2.main()

Modified: lldb/trunk/test/tools/lldb-server/TestGdbRemoteExpeditedRegisters.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/tools/lldb-server/TestGdbRemoteExpeditedRegisters.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/tools/lldb-server/TestGdbRemoteExpeditedRegisters.py (original)
+++ lldb/trunk/test/tools/lldb-server/TestGdbRemoteExpeditedRegisters.py Thu Oct 22 15:06:20 2015
@@ -1,4 +1,4 @@
-import unittest2
+import lldb_shared
 
 import gdbremote_testcase
 from lldbtest import *
@@ -140,7 +140,3 @@ class TestGdbRemoteExpeditedRegisters(gd
         self.build()
         self.set_inferior_startup_launch()
         self.stop_notification_contains_sp_register()
-
-
-if __name__ == '__main__':
-    unittest2.main()

Modified: lldb/trunk/test/tools/lldb-server/TestGdbRemoteKill.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/tools/lldb-server/TestGdbRemoteKill.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/tools/lldb-server/TestGdbRemoteKill.py (original)
+++ lldb/trunk/test/tools/lldb-server/TestGdbRemoteKill.py Thu Oct 22 15:06:20 2015
@@ -1,4 +1,4 @@
-import unittest2
+import lldb_shared
 
 import gdbremote_testcase
 import lldbgdbserverutils

Modified: lldb/trunk/test/tools/lldb-server/TestGdbRemoteProcessInfo.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/tools/lldb-server/TestGdbRemoteProcessInfo.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/tools/lldb-server/TestGdbRemoteProcessInfo.py (original)
+++ lldb/trunk/test/tools/lldb-server/TestGdbRemoteProcessInfo.py Thu Oct 22 15:06:20 2015
@@ -1,7 +1,8 @@
+import lldb_shared
+
 import gdbremote_testcase
 import lldbgdbserverutils
 import sys
-import unittest2
 
 from lldbtest import *
 
@@ -174,7 +175,3 @@ class TestGdbRemoteProcessInfo(gdbremote
         self.init_llgs_test()
         self.build()
         self.qProcessInfo_does_not_contain_keys(set(['cputype', 'cpusubtype']))
-
-
-if __name__ == '__main__':
-    unittest2.main()

Modified: lldb/trunk/test/tools/lldb-server/TestGdbRemoteRegisterState.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/tools/lldb-server/TestGdbRemoteRegisterState.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/tools/lldb-server/TestGdbRemoteRegisterState.py (original)
+++ lldb/trunk/test/tools/lldb-server/TestGdbRemoteRegisterState.py Thu Oct 22 15:06:20 2015
@@ -1,4 +1,4 @@
-import unittest2
+import lldb_shared
 
 import gdbremote_testcase
 from lldbtest import *
@@ -122,7 +122,3 @@ class TestGdbRemoteRegisterState(gdbremo
         self.build()
         self.set_inferior_startup_launch()
         self.grp_register_save_restore_works(USE_THREAD_SUFFIX)
-
-
-if __name__ == '__main__':
-    unittest2.main()

Modified: lldb/trunk/test/tools/lldb-server/TestGdbRemoteSingleStep.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/tools/lldb-server/TestGdbRemoteSingleStep.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/tools/lldb-server/TestGdbRemoteSingleStep.py (original)
+++ lldb/trunk/test/tools/lldb-server/TestGdbRemoteSingleStep.py Thu Oct 22 15:06:20 2015
@@ -1,4 +1,4 @@
-import unittest2
+import lldb_shared
 
 import gdbremote_testcase
 from lldbtest import *
@@ -21,6 +21,3 @@ class TestGdbRemoteSingleStep(gdbremote_
         self.build()
         self.set_inferior_startup_launch()
         self.single_step_only_steps_one_instruction(use_Hc_packet=True, step_instruction="s")
-
-if __name__ == '__main__':
-    unittest2.main()

Modified: lldb/trunk/test/tools/lldb-server/TestGdbRemoteThreadsInStopReply.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/tools/lldb-server/TestGdbRemoteThreadsInStopReply.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/tools/lldb-server/TestGdbRemoteThreadsInStopReply.py (original)
+++ lldb/trunk/test/tools/lldb-server/TestGdbRemoteThreadsInStopReply.py Thu Oct 22 15:06:20 2015
@@ -1,4 +1,4 @@
-import unittest2
+import lldb_shared
 
 import gdbremote_testcase
 from lldbtest import *
@@ -160,7 +160,3 @@ class TestGdbRemoteThreadsInStopReply(gd
         self.build()
         self.set_inferior_startup_launch()
         self.stop_reply_reports_correct_threads(5)
-
-
-if __name__ == '__main__':
-    unittest2.main()

Modified: lldb/trunk/test/tools/lldb-server/TestGdbRemote_qThreadStopInfo.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/tools/lldb-server/TestGdbRemote_qThreadStopInfo.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/tools/lldb-server/TestGdbRemote_qThreadStopInfo.py (original)
+++ lldb/trunk/test/tools/lldb-server/TestGdbRemote_qThreadStopInfo.py Thu Oct 22 15:06:20 2015
@@ -1,6 +1,8 @@
+import lldb_shared
+
 import sys
-import unittest2
 
+import unittest2
 import gdbremote_testcase
 from lldbtest import *
 
@@ -144,7 +146,3 @@ class TestGdbRemote_qThreadStopInfo(gdbr
         self.build()
         self.set_inferior_startup_launch()
         self.qThreadStopInfo_has_valid_thread_names(self.THREAD_COUNT, "a.out")
-
-
-if __name__ == '__main__':
-    unittest2.main()

Modified: lldb/trunk/test/tools/lldb-server/TestGdbRemote_vCont.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/tools/lldb-server/TestGdbRemote_vCont.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/tools/lldb-server/TestGdbRemote_vCont.py (original)
+++ lldb/trunk/test/tools/lldb-server/TestGdbRemote_vCont.py Thu Oct 22 15:06:20 2015
@@ -1,4 +1,4 @@
-import unittest2
+import lldb_shared
 
 import gdbremote_testcase
 from lldbtest import *
@@ -112,7 +112,3 @@ class TestGdbRemote_vCont(gdbremote_test
         self.build()
         self.set_inferior_startup_launch()
         self.single_step_only_steps_one_instruction(use_Hc_packet=False, step_instruction="vCont;s:{thread}")
-
-
-if __name__ == '__main__':
-    unittest2.main()

Modified: lldb/trunk/test/tools/lldb-server/TestLldbGdbServer.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/tools/lldb-server/TestLldbGdbServer.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/tools/lldb-server/TestLldbGdbServer.py (original)
+++ lldb/trunk/test/tools/lldb-server/TestLldbGdbServer.py Thu Oct 22 15:06:20 2015
@@ -10,11 +10,13 @@ gdb remote packet functional areas.  For
 the initial set of tests implemented.
 """
 
+import lldb_shared
+
+import unittest2
 import gdbremote_testcase
 import lldbgdbserverutils
 import platform
 import signal
-import unittest2
 from lldbtest import *
 
 class LldbGdbServerTestCase(gdbremote_testcase.GdbRemoteTestCaseBase):
@@ -1465,7 +1467,3 @@ class LldbGdbServerTestCase(gdbremote_te
         self.build()
         self.set_inferior_startup_launch()
         self.P_and_p_thread_suffix_work()
-
-
-if __name__ == '__main__':
-    unittest2.main()

Modified: lldb/trunk/test/tools/lldb-server/commandline/TestStubReverseConnect.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/tools/lldb-server/commandline/TestStubReverseConnect.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/tools/lldb-server/commandline/TestStubReverseConnect.py (original)
+++ lldb/trunk/test/tools/lldb-server/commandline/TestStubReverseConnect.py Thu Oct 22 15:06:20 2015
@@ -83,7 +83,3 @@ class TestStubReverseConnect(gdbremote_t
         self.init_llgs_test(use_named_pipe=False)
         self.set_inferior_startup_launch()
         self.reverse_connect_works()
-
-
-if __name__ == '__main__':
-    unittest2.main()

Modified: lldb/trunk/test/tools/lldb-server/commandline/TestStubSetSID.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/tools/lldb-server/commandline/TestStubSetSID.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/tools/lldb-server/commandline/TestStubSetSID.py (original)
+++ lldb/trunk/test/tools/lldb-server/commandline/TestStubSetSID.py Thu Oct 22 15:06:20 2015
@@ -1,4 +1,4 @@
-import unittest2
+import lldb_shared
 
 import gdbremote_testcase
 import lldbgdbserverutils

Modified: lldb/trunk/test/tools/lldb-server/gdbremote_testcase.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/tools/lldb-server/gdbremote_testcase.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/tools/lldb-server/gdbremote_testcase.py (original)
+++ lldb/trunk/test/tools/lldb-server/gdbremote_testcase.py Thu Oct 22 15:06:20 2015
@@ -2,6 +2,8 @@
 Base class for gdb-remote test cases.
 """
 
+import lldb_shared
+
 import errno
 import os
 import os.path
@@ -16,7 +18,6 @@ import subprocess
 import sys
 import tempfile
 import time
-import unittest2
 from lldbtest import *
 from lldbgdbserverutils import *
 import logging

Modified: lldb/trunk/test/tools/lldb-server/inferior-crash/TestGdbRemoteAbort.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/tools/lldb-server/inferior-crash/TestGdbRemoteAbort.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/tools/lldb-server/inferior-crash/TestGdbRemoteAbort.py (original)
+++ lldb/trunk/test/tools/lldb-server/inferior-crash/TestGdbRemoteAbort.py Thu Oct 22 15:06:20 2015
@@ -1,4 +1,4 @@
-import unittest2
+import lldb_shared
 
 import gdbremote_testcase
 import signal

Modified: lldb/trunk/test/tools/lldb-server/inferior-crash/TestGdbRemoteSegFault.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/tools/lldb-server/inferior-crash/TestGdbRemoteSegFault.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/tools/lldb-server/inferior-crash/TestGdbRemoteSegFault.py (original)
+++ lldb/trunk/test/tools/lldb-server/inferior-crash/TestGdbRemoteSegFault.py Thu Oct 22 15:06:20 2015
@@ -1,4 +1,4 @@
-import unittest2
+import lldb_shared
 
 import gdbremote_testcase
 import signal

Modified: lldb/trunk/test/tools/lldb-server/test/test_lldbgdbserverutils.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/tools/lldb-server/test/test_lldbgdbserverutils.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/tools/lldb-server/test/test_lldbgdbserverutils.py (original)
+++ lldb/trunk/test/tools/lldb-server/test/test_lldbgdbserverutils.py Thu Oct 22 15:06:20 2015
@@ -1,9 +1,10 @@
+import lldb_shared
+
+import unittest2
 import os.path
 import re
 import sys
 
-import unittest2
-
 from lldbgdbserverutils import *
 
 
@@ -44,6 +45,3 @@ class TestLldbGdbServerUtils(unittest2.T
         except AssertionError:
             # okay
             return None
-
-if __name__ == '__main__':
-    unittest2.main()

Modified: lldb/trunk/test/types/HideTestFailures.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/types/HideTestFailures.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/types/HideTestFailures.py (original)
+++ lldb/trunk/test/types/HideTestFailures.py Thu Oct 22 15:06:20 2015
@@ -2,8 +2,9 @@
 Test that variables of integer basic types are displayed correctly.
 """
 
+import lldb_shared
+
 import AbstractBase
-import unittest2
 import sys
 import lldb
 from lldbtest import *
@@ -73,9 +74,3 @@ class DebugIntegerTypesFailures(TestBase
         self.build(dictionary=d)
         self.setTearDownCleanup(dictionary=d)
         self.generic_type_tester(set(['long long']))
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/types/TestFloatTypes.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/types/TestFloatTypes.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/types/TestFloatTypes.py (original)
+++ lldb/trunk/test/types/TestFloatTypes.py Thu Oct 22 15:06:20 2015
@@ -2,8 +2,9 @@
 Test that variables of floating point types are displayed correctly.
 """
 
+import lldb_shared
+
 import AbstractBase
-import unittest2
 import lldb
 import sys
 from lldbtest import *
@@ -36,9 +37,3 @@ class FloatTypesTestCase(AbstractBase.Ge
     def test_double_type_from_block(self):
         """Test that double-type variables are displayed correctly from a block."""
         self.build_and_run('double.cpp', set(['double']), bc=True)
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/types/TestFloatTypesExpr.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/types/TestFloatTypesExpr.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/types/TestFloatTypesExpr.py (original)
+++ lldb/trunk/test/types/TestFloatTypesExpr.py Thu Oct 22 15:06:20 2015
@@ -2,8 +2,9 @@
 Test that variable expressions of floating point types are evaluated correctly.
 """
 
+import lldb_shared
+
 import AbstractBase
-import unittest2
 import lldb
 import sys
 from lldbtest import *
@@ -39,9 +40,3 @@ class FloatTypesExprTestCase(AbstractBas
     def test_double_type_from_block(self):
         """Test that double-type variables are displayed correctly from a block."""
         self.build_and_run_expr('double.cpp', set(['double']), bc=True)
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/types/TestIntegerTypes.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/types/TestIntegerTypes.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/types/TestIntegerTypes.py (original)
+++ lldb/trunk/test/types/TestIntegerTypes.py Thu Oct 22 15:06:20 2015
@@ -2,8 +2,9 @@
 Test that variables of integer basic types are displayed correctly.
 """
 
+import lldb_shared
+
 import AbstractBase
-import unittest2
 import lldb
 import sys
 from lldbtest import *
@@ -108,10 +109,3 @@ class IntegerTypesTestCase(AbstractBase.
     def test_unsigned_long_long_type_from_block(self):
         """Test that 'unsigned_long_long'-type variables are displayed correctly from a block."""
         self.build_and_run('unsigned_long_long.cpp', set(['unsigned', 'long long']), bc=True)
-
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/types/TestIntegerTypesExpr.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/types/TestIntegerTypesExpr.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/types/TestIntegerTypesExpr.py (original)
+++ lldb/trunk/test/types/TestIntegerTypesExpr.py Thu Oct 22 15:06:20 2015
@@ -2,8 +2,9 @@
 Test that variable expressions of integer basic types are evaluated correctly.
 """
 
+import lldb_shared
+
 import AbstractBase
-import unittest2
 import lldb
 import sys
 from lldbtest import *
@@ -108,10 +109,3 @@ class IntegerTypesExprTestCase(AbstractB
     def test_unsigned_long_long_type_from_block(self):
         """Test that 'unsigned_long_long'-type variables are displayed correctly from a block."""
         self.build_and_run_expr('unsigned_long_long.cpp', set(['unsigned', 'long long']), bc=True)
-
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/types/TestRecursiveTypes.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/types/TestRecursiveTypes.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/types/TestRecursiveTypes.py (original)
+++ lldb/trunk/test/types/TestRecursiveTypes.py Thu Oct 22 15:06:20 2015
@@ -2,10 +2,11 @@
 Test that recursive types are handled correctly.
 """
 
+import lldb_shared
+
 import lldb
 import lldbutil
 import sys
-import unittest2
 from lldbtest import *
 
 class RecursiveTypesTestCase(TestBase):
@@ -46,9 +47,3 @@ class RecursiveTypesTestCase(TestBase):
 
         self.expect("print tpi", RUN_SUCCEEDED)
         self.expect("print *tpi", RUN_SUCCEEDED)
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()

Modified: lldb/trunk/test/warnings/uuid/TestAddDsymCommand.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/warnings/uuid/TestAddDsymCommand.py?rev=251055&r1=251054&r2=251055&view=diff
==============================================================================
--- lldb/trunk/test/warnings/uuid/TestAddDsymCommand.py (original)
+++ lldb/trunk/test/warnings/uuid/TestAddDsymCommand.py Thu Oct 22 15:06:20 2015
@@ -1,7 +1,8 @@
 """Test that the 'add-dsym', aka 'target symbols add', command informs the user about success or failure."""
 
+import lldb_shared
+
 import os, time
-import unittest2
 import lldb
 from lldbtest import *
 
@@ -102,10 +103,3 @@ class AddDsymCommandCase(TestBase):
         right_path = "%s.dSYM" % exe_name
         self.expect("add-dsym " + right_path,
             substrs = ['symbol file', 'has been added to'])
-
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()




More information about the lldb-commits mailing list