[lldb] Remove LLDB session dir and just store test traces in the respective test build directoryTest runs log some of their output to files inside the LLDB session dir. Thissession dir is shared b
[lldb] Remove LLDB session dir and just store test traces in the respective test build directoryTest runs log some of their output to files inside the LLDB session dir. Thissession dir is shared between all tests, so all the tests have to make sure theychoose a unique file name inside that directory. We currently choose by default`<test-class-name>-<test-method-name>` as the log file name. However, that meansthat if not every test class in the test suite has a unique class name, then weend up with a race condition as two tests will try to write to the same logfile.I already tried in D83767 changing the format to use the test file basenameinstead (which we already require to be unique for some other functionality),but it seems the code for getting the basename didn't work on Windows.This patch instead just changes that dotest stores the log files in the builddirectory for the current test. We know that directory is unique for this test,so no need to generate some unique file name now. Also removes all theenvironment vars and parameters related to the now unused session dir.The new log paths now look like this for a failure in 'TestCppOperators`:```./lldb-test-build.noindex/lang/cpp/operators/TestCppOperators.test_dwarf/Failure.log./lldb-test-build.noindex/lang/cpp/operators/TestCppOperators.test_dsym/Failure.log./lldb-test-build.noindex/lang/cpp/operators/TestCppOperators.test_gmodules/Failure.log```Reviewed By: labathDifferential Revision: https://reviews.llvm.org/D92498
show more ...
Modified .lldb-loggings now to direct the lldb log files to the same session directory which also houses the test logs.llvm-svn: 162387
Demonstrate how to use the config file and the pre-flight functionality to route the lldb gdb-remote log messagesinto individually named log destinations. In the simple usage-lldb-loggings example,
Demonstrate how to use the config file and the pre-flight functionality to route the lldb gdb-remote log messagesinto individually named log destinations. In the simple usage-lldb-loggings example, we ran two cases which resultedin two lldb_log files.llvm-svn: 162378
Add the capability of supplying the pre/post-flight functions to the test suite such thatthe pre-flight code gets executed during setUp() after the debugger instance is availableand the post-flight
Add the capability of supplying the pre/post-flight functions to the test suite such thatthe pre-flight code gets executed during setUp() after the debugger instance is availableand the post-flight code gets executed during tearDown() after the debugger instance hasdone killing the inferior and deleting all the target programs.Example:[11:32:48] johnny:/Volumes/data/lldb/svn/ToT/test $ ./dotest.py -A x86_64 -v -c ../examples/test/.lldb-pre-post-flight functionalities/watchpoint/hello_watchpointconfig: {'pre_flight': <function pre_flight at 0x1098541b8>, 'post_flight': <function post_flight at 0x109854230>}LLDB build dir: /Volumes/data/lldb/svn/ToT/build/DebugLLDB-139Path: /Volumes/data/lldb/svn/ToTURL: https://[email protected]/svn/llvm-project/lldb/trunkRepository Root: https://[email protected]/svn/llvm-projectRepository UUID: 91177308-0d34-0410-b5e6-96231b3b80d8Revision: 154753Node Kind: directorySchedule: normalLast Changed Author: gclaytonLast Changed Rev: 154730Last Changed Date: 2012-04-13 18:42:46 -0700 (Fri, 13 Apr 2012)lldb.pre_flight: def pre_flight(test): __import__("lldb") __import__("lldbtest") print "\nRunning pre-flight function:" print "for test case:", testlldb.post_flight: def post_flight(test): __import__("lldb") __import__("lldbtest") print "\nRunning post-flight function:" print "for test case:", testSession logs for test failures/errors/unexpected successes will go into directory '2012-04-16-11_34_08'Command invoked: python ./dotest.py -A x86_64 -v -c ../examples/test/.lldb-pre-post-flight functionalities/watchpoint/hello_watchpointcompilers=['clang']Configuration: arch=x86_64 compiler=clang----------------------------------------------------------------------Collected 2 tests1: test_hello_watchpoint_with_dsym_using_watchpoint_set (TestMyFirstWatchpoint.HelloWatchpointTestCase) Test a simple sequence of watchpoint creation and watchpoint hit. ... Running pre-flight function:for test case: test_hello_watchpoint_with_dsym_using_watchpoint_set (TestMyFirstWatchpoint.HelloWatchpointTestCase)Running post-flight function:for test case: test_hello_watchpoint_with_dsym_using_watchpoint_set (TestMyFirstWatchpoint.HelloWatchpointTestCase)ok2: test_hello_watchpoint_with_dwarf_using_watchpoint_set (TestMyFirstWatchpoint.HelloWatchpointTestCase) Test a simple sequence of watchpoint creation and watchpoint hit. ... Running pre-flight function:for test case: test_hello_watchpoint_with_dwarf_using_watchpoint_set (TestMyFirstWatchpoint.HelloWatchpointTestCase)Running post-flight function:for test case: test_hello_watchpoint_with_dwarf_using_watchpoint_set (TestMyFirstWatchpoint.HelloWatchpointTestCase)ok----------------------------------------------------------------------Ran 2 tests in 1.584sOKllvm-svn: 154847
Add comment explaining the options used to invoke the test driver.llvm-svn: 117318
A simple config to test both x86_64 and i386 architectures.llvm-svn: 117304
Added the capability for the test driver to split the sys.stderr/sys.stdout intodifferent configuration-based files using the config file. For example: sys.stderr = open("/tmp/lldbtest-stderr"
Added the capability for the test driver to split the sys.stderr/sys.stdout intodifferent configuration-based files using the config file. For example: sys.stderr = open("/tmp/lldbtest-stderr", "w") sys.stdout = open("/tmp/lldbtest-stdout", "w") compilers = ["gcc", "llvm-gcc"] archs = ["x86_64", "i386"] split_stderr = True # This will split the stderr into configuration-specific file split_stdout = True # This will split the stdout into configuration-specific filewill produce:/tmp/lldbtest-stderr/tmp/lldbtest-stderr.arch=i386-compiler=gcc/tmp/lldbtest-stderr.arch=i386-compiler=llvm-gcc/tmp/lldbtest-stderr.arch=x86_64-compiler=gcc/tmp/lldbtest-stderr.arch=x86_64-compiler=llvm-gcc/tmp/lldbtest-stdout/tmp/lldbtest-stdout.arch=i386-compiler=gcc/tmp/lldbtest-stdout.arch=i386-compiler=llvm-gcc/tmp/lldbtest-stdout.arch=x86_64-compiler=gcc/tmp/lldbtest-stdout.arch=x86_64-compiler=llvm-gccas a result of splitting stderr and stdout. In addition, each configuration can haveits individual top level relocated directory to house the test files as well as theintermediate files by using '-r dir' to relocate the tests into a new relocated directoryinstead of running the tests in place.llvm-svn: 116341
Added the capability to source the configFile specified via the "-c" option inorder to customize the running of the test suite. For the time being, thesupported customizations are:o redirecting
Added the capability to source the configFile specified via the "-c" option inorder to customize the running of the test suite. For the time being, thesupported customizations are:o redirecting stdout and/or stderro specifying a list of compilers to build the test programso specifying a list of architectures to build the test programs forAlso checked into the examples/test directory some example files whichdemonstrate the usage for the above customizations.$ ./dotest.py -v -c ~/.lldbtest-config persistent_variables$ cat ~/.lldbtest-configsys.stderr = open("/tmp/lldbtest-stderr", "w")sys.stdout = open("/tmp/lldbtest-stdout", "w")compilers = ["gcc", "llvm-gcc"]archs = ["x86_64", "i386"]$ cat /tmp/lldbtest-stderr----------------------------------------------------------------------Collected 1 testConfiguration: arch=x86_64 compiler=gcctest_persistent_variables (TestPersistentVariables.PersistentVariablesTestCase)Test that lldb persistent variables works correctly. ... ok----------------------------------------------------------------------Ran 1 test in 1.397sOKConfiguration: arch=x86_64 compiler=llvm-gcctest_persistent_variables (TestPersistentVariables.PersistentVariablesTestCase)Test that lldb persistent variables works correctly. ... ok----------------------------------------------------------------------Ran 1 test in 1.282sOKConfiguration: arch=i386 compiler=gcctest_persistent_variables (TestPersistentVariables.PersistentVariablesTestCase)Test that lldb persistent variables works correctly. ... ok----------------------------------------------------------------------Ran 1 test in 1.297sOKConfiguration: arch=i386 compiler=llvm-gcctest_persistent_variables (TestPersistentVariables.PersistentVariablesTestCase)Test that lldb persistent variables works correctly. ... ok----------------------------------------------------------------------Ran 1 test in 1.269sOK$ cat /tmp/lldbtest-stdout$ llvm-svn: 114380