From 73f601fbd91e1a3b5d63ab2a1b85c3f8fb6de8d9 Mon Sep 17 00:00:00 2001 From: Enrico Granata Date: Fri, 14 Dec 2012 00:07:09 +0000 Subject: [PATCH] Fixing the -f option so that one specify multiple filters, e.g. ./dotest.py -C clang --arch x86_64 --arch i386 -v -t -f ObjCDataFormatterTestCase.test_appkit_with_dsym_and_run_command -f ObjCDataFormatterTestCase.test_appkit_with_dwarf_and_run_command -f TestObjCBuiltinTypes.test_with_dsym_and_python_api -f TestObjCBuiltinTypes.test_with_dwarf_and_python_api -f ObjCDataFormatterTestCase.test_appkit_with_dsym_and_run_command -f ObjCDataFormatterTestCase.test_appkit_with_dwarf_and_run_command -f TestObjCBuiltinTypes.test_with_dsym_and_python_api -f -TestObjCBuiltinTypes.test_with_dwarf_and_python_api The previous implementation would only remember the last filter passed, and consequently break redo.py llvm-svn: 170163 --- lldb/test/dotest.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lldb/test/dotest.py b/lldb/test/dotest.py index 500559c..5d604f4 100755 --- a/lldb/test/dotest.py +++ b/lldb/test/dotest.py @@ -377,7 +377,7 @@ def parseOptionsAndInitTestdirs(): X('+a', "Just do lldb Python API tests. Do not specify along with '+a'", dest='plus_a') X('+b', 'Just do benchmark tests', dest='plus_b') group.add_argument('-b', metavar='blacklist', help='Read a blacklist file specified after this option') - group.add_argument('-f', metavar='filterspec', help='Specify a filter, which consists of the test class name, a dot, followed by the test method, to only admit such test into the test suite') # FIXME: Example? + group.add_argument('-f', metavar='filterspec', action='append', help='Specify a filter, which consists of the test class name, a dot, followed by the test method, to only admit such test into the test suite') # FIXME: Example? X('-g', 'If specified, the filterspec by -f is not exclusive, i.e., if a test module does not match the filterspec (testclass.testmethod), the whole module is still admitted to the test suite') X('-l', "Don't skip long running tests") group.add_argument('-p', metavar='pattern', help='Specify a regexp filename pattern for inclusion in the test suite') @@ -510,9 +510,9 @@ def parseOptionsAndInitTestdirs(): failfast = True if args.f: - if args.f.startswith('-'): + if any([x.startswith('-') for x in args.f]): usage(parser) - filters.append(args.f) + filters.extend(args.f) if args.g: fs4all = False -- 2.7.4