mgorny updated this revision to Diff 303349. mgorny marked 2 inline comments as done. mgorny retitled this revision from "[lldb] [test] Avoid double negatives in llgs/debugserver logic" to "[lldb] [test] Avoid double negations in llgs/debugserver logic". mgorny added a comment.
Removed the part about adding new platforms without LLGS, and restored old conditions for matching platforms. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D90875/new/ https://reviews.llvm.org/D90875 Files: lldb/packages/Python/lldbsuite/test/decorators.py lldb/packages/Python/lldbsuite/test/dotest.py Index: lldb/packages/Python/lldbsuite/test/dotest.py =================================================================== --- lldb/packages/Python/lldbsuite/test/dotest.py +++ lldb/packages/Python/lldbsuite/test/dotest.py @@ -945,19 +945,15 @@ checkWatchpointSupport() checkDebugInfoSupport() - # Don't do debugserver tests on anything except OS X. - configuration.dont_do_debugserver_test = ( - "linux" in target_platform or - "freebsd" in target_platform or - "netbsd" in target_platform or - "windows" in target_platform) - - # Don't do lldb-server (llgs) tests on platforms not supporting it. - configuration.dont_do_llgs_test = not ( - "freebsd" in target_platform or - "linux" in target_platform or - "netbsd" in target_platform or - "windows" in target_platform) + # Perform LLGS tests only on platforms using it. + configuration.llgs_platform = ( + "freebsd" in target_platform or + "linux" in target_platform or + "netbsd" in target_platform or + "windows" in target_platform) + + # Perform debugserver tests elsewhere (i.e. on Darwin platforms). + configuration.debugserver_platform = not configuration.llgs_platform for testdir in configuration.testdirs: for (dirpath, dirnames, filenames) in os.walk(testdir): Index: lldb/packages/Python/lldbsuite/test/decorators.py =================================================================== --- lldb/packages/Python/lldbsuite/test/decorators.py +++ lldb/packages/Python/lldbsuite/test/decorators.py @@ -375,14 +375,18 @@ def debugserver_test(func): """Decorate the item as a debugserver test.""" def should_skip_debugserver_test(): - return "debugserver tests" if configuration.dont_do_debugserver_test else None + return ("debugserver tests" + if not configuration.debugserver_platform + else None) return skipTestIfFn(should_skip_debugserver_test)(func) def llgs_test(func): """Decorate the item as a lldb-server test.""" def should_skip_llgs_tests(): - return "llgs tests" if configuration.dont_do_llgs_test else None + return ("llgs tests" + if not configuration.llgs_platform + else None) return skipTestIfFn(should_skip_llgs_tests)(func)
Index: lldb/packages/Python/lldbsuite/test/dotest.py =================================================================== --- lldb/packages/Python/lldbsuite/test/dotest.py +++ lldb/packages/Python/lldbsuite/test/dotest.py @@ -945,19 +945,15 @@ checkWatchpointSupport() checkDebugInfoSupport() - # Don't do debugserver tests on anything except OS X. - configuration.dont_do_debugserver_test = ( - "linux" in target_platform or - "freebsd" in target_platform or - "netbsd" in target_platform or - "windows" in target_platform) - - # Don't do lldb-server (llgs) tests on platforms not supporting it. - configuration.dont_do_llgs_test = not ( - "freebsd" in target_platform or - "linux" in target_platform or - "netbsd" in target_platform or - "windows" in target_platform) + # Perform LLGS tests only on platforms using it. + configuration.llgs_platform = ( + "freebsd" in target_platform or + "linux" in target_platform or + "netbsd" in target_platform or + "windows" in target_platform) + + # Perform debugserver tests elsewhere (i.e. on Darwin platforms). + configuration.debugserver_platform = not configuration.llgs_platform for testdir in configuration.testdirs: for (dirpath, dirnames, filenames) in os.walk(testdir): Index: lldb/packages/Python/lldbsuite/test/decorators.py =================================================================== --- lldb/packages/Python/lldbsuite/test/decorators.py +++ lldb/packages/Python/lldbsuite/test/decorators.py @@ -375,14 +375,18 @@ def debugserver_test(func): """Decorate the item as a debugserver test.""" def should_skip_debugserver_test(): - return "debugserver tests" if configuration.dont_do_debugserver_test else None + return ("debugserver tests" + if not configuration.debugserver_platform + else None) return skipTestIfFn(should_skip_debugserver_test)(func) def llgs_test(func): """Decorate the item as a lldb-server test.""" def should_skip_llgs_tests(): - return "llgs tests" if configuration.dont_do_llgs_test else None + return ("llgs tests" + if not configuration.llgs_platform + else None) return skipTestIfFn(should_skip_llgs_tests)(func)
_______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits