Added the capability to source the configFile specified via the "-c" option in
authorJohnny Chen <johnny.chen@apple.com>
Tue, 21 Sep 2010 00:09:27 +0000 (00:09 +0000)
committerJohnny Chen <johnny.chen@apple.com>
Tue, 21 Sep 2010 00:09:27 +0000 (00:09 +0000)
commit209cdbef6474d3bfcf4fcda49f9928b92fcdef35
tree9d2252695f11bd04de1c5abe92f49665d24b4ae1
parent7466127a4b4e2e3493108d5f747d8625faa19104
Added the capability to source the configFile specified via the "-c" option in
order to customize the running of the test suite.  For the time being, the
supported customizations are:

o redirecting stdout and/or stderr
o specifying a list of compilers to build the test programs
o specifying a list of architectures to build the test programs for

Also checked into the examples/test directory some example files which
demonstrate the usage for the above customizations.

$ ./dotest.py -v -c ~/.lldbtest-config persistent_variables
$ cat ~/.lldbtest-config
sys.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 test

Configuration: arch=x86_64 compiler=gcc
test_persistent_variables (TestPersistentVariables.PersistentVariablesTestCase)
Test that lldb persistent variables works correctly. ... ok

----------------------------------------------------------------------
Ran 1 test in 1.397s

OK

Configuration: arch=x86_64 compiler=llvm-gcc
test_persistent_variables (TestPersistentVariables.PersistentVariablesTestCase)
Test that lldb persistent variables works correctly. ... ok

----------------------------------------------------------------------
Ran 1 test in 1.282s

OK

Configuration: arch=i386 compiler=gcc
test_persistent_variables (TestPersistentVariables.PersistentVariablesTestCase)
Test that lldb persistent variables works correctly. ... ok

----------------------------------------------------------------------
Ran 1 test in 1.297s

OK

Configuration: arch=i386 compiler=llvm-gcc
test_persistent_variables (TestPersistentVariables.PersistentVariablesTestCase)
Test that lldb persistent variables works correctly. ... ok

----------------------------------------------------------------------
Ran 1 test in 1.269s

OK
$ cat /tmp/lldbtest-stdout
$

llvm-svn: 114380
lldb/examples/test/.lldbtest-config [new file with mode: 0644]
lldb/examples/test/lldbtest-stderr [new file with mode: 0644]
lldb/examples/test/lldbtest-stdout [new file with mode: 0644]
lldb/examples/test/usage-config [new file with mode: 0644]
lldb/test/dotest.py
lldb/test/plugins/darwin.py