Lines Matching +full:check +full:- +full:clang +full:- +full:python

2 A simple testing framework for lldb using python's unit testing framework.
4 Tests for lldb are written as python scripts which take advantage of the script
10 To specify the directories where "Test*.py" python test scripts are located,
16 ./dotest.py -h
35 # Third-party modules
79 This is an example of using the -f option to pinpoint to a specific test class
82 $ ./dotest.py -f ClassTypesTestCase.test_with_dsym_and_run_command
83 ----------------------------------------------------------------------
89 ----------------------------------------------------------------------
94 And this is an example of using the -p option to run a single file (the filename
97 $ ./dotest.py -v -p ObjC
98 ----------------------------------------------------------------------
102 Test setting objc breakpoints using '_regexp-break' and 'breakpoint set'. ... ok
104 Test setting objc breakpoints using '_regexp-break' and 'breakpoint set'. ... ok
106 Lookup objective-c data types and evaluate expressions. ... ok
108 Lookup objective-c data types and evaluate expressions. ... ok
110 ----------------------------------------------------------------------
117 tries to set up Python's search paths for modules by looking at the build tree
118 relative to this script. See also the '-i' option in the following example.
121 Xcode4 to run against the tests under the 'forward' directory, and with the '-w'
123 as the architecture and CC=clang to specify the compiler used for the test run:
125 $ PYTHONPATH=/Xcode4/Library/PrivateFrameworks/LLDB.framework/Versions/A/Resources/Python ARCH=x86_64 CC=clang ./dotest.py -v -w -i forward
127 Session logs for test failures/errors will go into directory '2010-11-11-13_56_16'
128 ----------------------------------------------------------------------
136 ----------------------------------------------------------------------
141 The 'Session ...' verbiage is recently introduced (see also the '-s' option) to
152 $ ./dotest.py --channel "lldb all"
154 $ ./dotest.py --channel "lldb all" --channel "gdb-remote packets"
158 <session-dir>/<test-id>-host.log (logs from lldb host process)
159 <session-dir>/<test-id>-server.log (logs from debugserver/lldb-server)
160 <session-dir>/<test-id>-<test-result>.log (console logs)
162 By default, logs from successful runs are deleted. Use the --log-success flag
165 $ ./dotest.py --log-success
208 '-h/--help as the first option prints out usage info and exit the program.
225 # From Python Doc: When unsetenv() is supported, deletion of items in os.environ
253 sys.exit(-1)
259 'xcrun -sdk "%s" -find clang 2> /dev/null' % (args.apple_sdk)
262 # 'clang' on ubuntu 14.04 is 3.4 so we try clang-3.5 first
263 candidateCompilers = ["clang-3.5", "clang", "gcc"]
276 "xcrun -find -toolchain default dsymutil"
285 logging.warning("(Double-check the --llvm-tools-dir argument to dotest.py)")
290 "Custom libc++ is not supported for remote runs: ignoring --libcxx arguments"
294 "Custom libc++ requires both --libcxx-include-dir and --libcxx-library-dir"
296 sys.exit(-1)
315 'xcrun --sdk "%s" --show-sdk-path 2> /dev/null' % (args.apple_sdk)
319 sys.exit(-1)
351 os.environ["CFLAGS"] = "-gdwarf-{}".format(configuration.dwarf_version)
359 sys.exit(-1)
372 if any([x.startswith("-") for x in args.f]):
388 sys.exit(-1)
395 if args.p.startswith("-"):
430 configuration.test_build_dir, "module-cache-lldb"
437 configuration.test_build_dir, "module-cache-clang"
470 Add LLDB.framework/Resources/Python to the search paths for modules.
481 sys.exit(-1)
495 toolsLLDBDAP = os.path.join(scriptPath, "tools", "lldb-dap")
496 toolsLLDBServerPath = os.path.join(scriptPath, "tools", "lldb-server")
499 # Insert script dir, plugin dir and lldb-server dir to the sys.path.
501 # Adding test/tools/lldb-dap to the path makes it easy to
504 # Adding test/tools/lldb-server to the path makes it easy
505 # to "import lldbgdbserverutils" from the lldb-server tests
508 # to "import intelpt_testcase" from the lldb-server tests
529 # Last, check the path
542 sys.exit(-1)
544 os.system("%s -v" % lldbtest_config.lldbExec)
548 lldbDAPExec = os.path.join(lldbDir, "lldb-dap")
554 # If our lldb supports the -P option, use it to find the python path:
556 [lldbtest_config.lldbExec, "-P"], universal_newlines=True
575 " the version of Python that LLDB built and linked against, and PYTHONPATH"
578 " should contain the Lib directory for the same python distro, as well as the"
580 print(" location of LLDB's site-packages folder.")
582 " 3) A different version of Python than that which was built against is exported in"
586 " 4) The executable '%s' could not be found. Please check "
634 # Thoroughly check the filterspec against the base module and admit
637 def check(obj, parts):
651 if check(module, parts):
653 elif parts[0] == base and len(parts) > 1 and check(module, parts[1:]):
657 if check(value, parts):
673 # Also the fail-over case when the filterspec branch
686 # Gather all the Python test file names that follow the Test*.py pattern.
691 # Visit all the python test files.
702 # Run the relevant tests in the python file.
717 output_str = cmd_output.decode("utf-8")
740 full_path = seven.get_command_output("xcrun -sdk %s --show-sdk-path" % sdk)
749 # Add some intervention here to sanity check that the compiler requested is sane.
759 ["xcrun", "-find", c], stdout=subprocess.PIPE, stderr=subprocess.STDOUT
766 print("'xcrun -find %s' returning %s" % (c, configuration.compiler))
779 cmd = [configuration.compiler, "-xc++", "-stdlib=libc++", "-o", f.name, "-"]
789 return True, "Compiling with -stdlib=libc++ works"
792 "Compiling with -stdlib=libc++ fails with the error: %s" % stderr,
841 ["/sbin/sysctl", "-n", "security.models.extensions.user_set_dbregs"]
909 print(skip_msg % "lldb-server")
937 "The 'lldb-dap' executable cannot be located and its tests will not be run."
940 msg = "lldb-dap tests are not compatible with remote platforms and will not be run."
947 configuration.skip_categories.append("lldb-dap")
951 # On MacOS X, check to make sure that domain for com.apple.DebugSymbols defaults
1067 # Install the control-c handler.
1131 "%s - %d\n" % (category, configuration.failures_per_category[category])
1143 sys.exit(-1)