<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Apr 25, 2018, at 11:07 AM, Vedant Kumar <<a href="mailto:vsk@apple.com" class="">vsk@apple.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><span style="font-family: Menlo-Regular; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">Hi Pavel,</span><br style="font-family: Menlo-Regular; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><br style="font-family: Menlo-Regular; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><blockquote type="cite" style="font-family: Menlo-Regular; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;" class="">On Apr 24, 2018, at 3:51 AM, Pavel Labath via lldb-commits <<a href="mailto:lldb-commits@lists.llvm.org" class="">lldb-commits@lists.llvm.org</a>> wrote:<br class=""><br class="">Author: labath<br class="">Date: Tue Apr 24 03:51:44 2018<br class="">New Revision: 330708<br class=""><br class="">URL: <a href="http://llvm.org/viewvc/llvm-project?rev=330708&view=rev" class="">http://llvm.org/viewvc/llvm-project?rev=330708&view=rev</a><br class="">Log:<br class="">[dotest] Make the set of tests independent of the test configuration<br class=""><br class="">Summary:<br class="">In the magic test duplicator, we were making the decision whether to<br class="">create a test variant based on the compiler and the target platform.<br class="">This meant that the set of known tests was different for each test<br class="">configuration.<br class=""><br class="">This patch makes the set of generated test variants static and handles<br class="">the skipping via runtime checks instead. This is more consistent with<br class="">how we do other test-skipping decision (e.g. for libc++ tests), and<br class="">makes it easier to expose the full set of tests to lit, which now does<br class="">not need to know anything about what things can potentially cause tests<br class="">to appear or disappear.<br class=""><br class="">Reviewers: JDevlieghere, aprantl<br class=""><br class="">Subscribers: eraman, lldb-commits<br class=""><br class="">Differential Revision: <a href="https://reviews.llvm.org/D45949" class="">https://reviews.llvm.org/D45949</a><br class=""><br class="">Modified:<br class=""> lldb/trunk/packages/Python/lldbsuite/test/dotest.py<br class=""> lldb/trunk/packages/Python/lldbsuite/test/lldbinline.py<br class=""> lldb/trunk/packages/Python/lldbsuite/test/lldbtest.py<br class=""><br class="">Modified: lldb/trunk/packages/Python/lldbsuite/test/dotest.py<br class="">URL: <a href="http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/dotest.py?rev=330708&r1=330707&r2=330708&view=diff" class="">http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/dotest.py?rev=330708&r1=330707&r2=330708&view=diff</a><br class="">==============================================================================<br class="">--- lldb/trunk/packages/Python/lldbsuite/test/dotest.py (original)<br class="">+++ lldb/trunk/packages/Python/lldbsuite/test/dotest.py Tue Apr 24 03:51:44 2018<br class="">@@ -1104,6 +1104,22 @@ def checkLibcxxSupport():<br class=""> print("Libc++ tests will not be run because: " + reason)<br class=""> configuration.skipCategories.append("libc++")<br class=""><br class="">+def checkDebugInfoSupport():<br class="">+ import lldb<br class="">+<br class="">+ platform = lldb.DBG.GetSelectedPlatform().GetTriple().split('-')[2]<br class="">+ compiler = configuration.compiler<br class="">+ skipped = []<br class="">+ for cat in test_categories.debug_info_categories:<br class="">+ if cat in configuration.categoriesList:<br class="">+ continue # Category explicitly requested, let it run.<br class=""></blockquote><br style="font-family: Menlo-Regular; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><span style="font-family: Menlo-Regular; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">Is there a missing check here for:</span><br style="font-family: Menlo-Regular; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><br style="font-family: Menlo-Regular; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><span style="font-family: Menlo-Regular; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">if cat in configuration.skipCategories:</span><br style="font-family: Menlo-Regular; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><span style="font-family: Menlo-Regular; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class=""> skip(cat)</span><br style="font-family: Menlo-Regular; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><br style="font-family: Menlo-Regular; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><span style="font-family: Menlo-Regular; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">Without this, I'm not sure how 'dotest --skip-category days' would work on Darwin.</span><br style="font-family: Menlo-Regular; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""></div></blockquote><div><br class=""></div>Sorry, I meant to type: --skip-category dsym.</div><div><br class=""></div><div>vedant</div><div><br class=""><blockquote type="cite" class=""><div class=""><br style="font-family: Menlo-Regular; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><blockquote type="cite" style="font-family: Menlo-Regular; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;" class="">+ if test_categories.is_supported_on_platform(cat, platform, compiler):<br class="">+ continue<br class="">+ configuration.skipCategories.append(cat)<br class="">+ skipped.append(cat)<br class="">+ if skipped:<br class="">+ print("Skipping following debug info categories:", skipped)<br class="">+<br class="">def run_suite():<br class=""> # On MacOS X, check to make sure that domain for com.apple.DebugSymbols defaults<br class=""> # does not exist before proceeding to running the test suite.<br class="">@@ -1212,6 +1228,7 @@ def run_suite():<br class=""> target_platform = lldb.DBG.GetSelectedPlatform().GetTriple().split('-')[2]<br class=""><br class=""> checkLibcxxSupport()<br class="">+ checkDebugInfoSupport()<br class=""><br class=""> # Don't do debugserver tests on everything except OS X.<br class=""> configuration.dont_do_debugserver_test = "linux" in target_platform or "freebsd" in target_platform or "windows" in target_platform<br class=""><br class="">Modified: lldb/trunk/packages/Python/lldbsuite/test/lldbinline.py<br class="">URL: <a href="http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/lldbinline.py?rev=330708&r1=330707&r2=330708&view=diff" class="">http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/lldbinline.py?rev=330708&r1=330707&r2=330708&view=diff</a><br class="">==============================================================================<br class="">--- lldb/trunk/packages/Python/lldbsuite/test/lldbinline.py (original)<br class="">+++ lldb/trunk/packages/Python/lldbsuite/test/lldbinline.py Tue Apr 24 03:51:44 2018<br class="">@@ -241,23 +241,14 @@ def MakeInlineTest(__file, __globals, de<br class=""> test = type(test_name, (InlineTest,), {'using_dsym': None})<br class=""> test.name = test_name<br class=""><br class="">- target_platform = lldb.DBG.GetSelectedPlatform().GetTriple().split('-')[2]<br class="">- if test_categories.is_supported_on_platform(<br class="">- "dsym", target_platform, configuration.compiler):<br class="">- test.test_with_dsym = ApplyDecoratorsToFunction(<br class="">- test._InlineTest__test_with_dsym, decorators)<br class="">- if test_categories.is_supported_on_platform(<br class="">- "dwarf", target_platform, configuration.compiler):<br class="">- test.test_with_dwarf = ApplyDecoratorsToFunction(<br class="">- test._InlineTest__test_with_dwarf, decorators)<br class="">- if test_categories.is_supported_on_platform(<br class="">- "dwo", target_platform, configuration.compiler):<br class="">- test.test_with_dwo = ApplyDecoratorsToFunction(<br class="">- test._InlineTest__test_with_dwo, decorators)<br class="">- if test_categories.is_supported_on_platform(<br class="">- "gmodules", target_platform, configuration.compiler):<br class="">- test.test_with_gmodules = ApplyDecoratorsToFunction(<br class="">- test._InlineTest__test_with_gmodules, decorators)<br class="">+ test.test_with_dsym = ApplyDecoratorsToFunction(<br class="">+ test._InlineTest__test_with_dsym, decorators)<br class="">+ test.test_with_dwarf = ApplyDecoratorsToFunction(<br class="">+ test._InlineTest__test_with_dwarf, decorators)<br class="">+ test.test_with_dwo = ApplyDecoratorsToFunction(<br class="">+ test._InlineTest__test_with_dwo, decorators)<br class="">+ test.test_with_gmodules = ApplyDecoratorsToFunction(<br class="">+ test._InlineTest__test_with_gmodules, decorators)<br class=""><br class=""> # Add the test case to the globals, and hide InlineTest<br class=""> __globals.update({test_name: test})<br class=""><br class="">Modified: lldb/trunk/packages/Python/lldbsuite/test/lldbtest.py<br class="">URL: <a href="http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/lldbtest.py?rev=330708&r1=330707&r2=330708&view=diff" class="">http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/lldbtest.py?rev=330708&r1=330707&r2=330708&view=diff</a><br class="">==============================================================================<br class="">--- lldb/trunk/packages/Python/lldbsuite/test/lldbtest.py (original)<br class="">+++ lldb/trunk/packages/Python/lldbsuite/test/lldbtest.py Tue Apr 24 03:51:44 2018<br class="">@@ -1732,14 +1732,11 @@ class LLDBTestCaseFactory(type):<br class=""> for attrname, attrvalue in attrs.items():<br class=""> if attrname.startswith("test") and not getattr(<br class=""> attrvalue, "__no_debug_info_test__", False):<br class="">- target_platform = lldb.DBG.GetSelectedPlatform(<br class="">- ).GetTriple().split('-')[2]<br class=""><br class=""> # If any debug info categories were explicitly tagged, assume that list to be<br class=""> # authoritative. If none were specified, try with all debug<br class=""> # info formats.<br class="">- all_dbginfo_categories = set(<br class="">- test_categories.debug_info_categories) - set(configuration.skipCategories)<br class="">+ all_dbginfo_categories = set(test_categories.debug_info_categories)<br class=""></blockquote><br style="font-family: Menlo-Regular; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><span style="font-family: Menlo-Regular; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">Ditto. I'm not sure why it shouldn't be possible to skip debug info categories.</span><br style="font-family: Menlo-Regular; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><br style="font-family: Menlo-Regular; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><span style="font-family: Menlo-Regular; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">thanks,</span><br style="font-family: Menlo-Regular; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><span style="font-family: Menlo-Regular; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">vedant</span><br style="font-family: Menlo-Regular; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><br style="font-family: Menlo-Regular; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><blockquote type="cite" style="font-family: Menlo-Regular; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;" class=""> categories = set(<br class=""> getattr(<br class=""> attrvalue,<br class="">@@ -1748,49 +1745,16 @@ class LLDBTestCaseFactory(type):<br class=""> if not categories:<br class=""> categories = all_dbginfo_categories<br class=""><br class="">- supported_categories = [<br class="">- x for x in categories if test_categories.is_supported_on_platform(<br class="">- x, target_platform, configuration.compiler)]<br class="">- <br class="">- if "dsym" in supported_categories:<br class="">- @decorators.add_test_categories(["dsym"])<br class="">+ for cat in categories:<br class="">+ @decorators.add_test_categories([cat])<br class=""> @wraps(attrvalue)<br class="">- def dsym_test_method(self, attrvalue=attrvalue):<br class="">+ def test_method(self, attrvalue=attrvalue):<br class=""> return attrvalue(self)<br class="">- dsym_method_name = attrname + "_dsym"<br class="">- dsym_test_method.__name__ = dsym_method_name<br class="">- dsym_test_method.debug_info = "dsym"<br class="">- newattrs[dsym_method_name] = dsym_test_method<br class=""><br class="">- if "dwarf" in supported_categories:<br class="">- @decorators.add_test_categories(["dwarf"])<br class="">- @wraps(attrvalue)<br class="">- def dwarf_test_method(self, attrvalue=attrvalue):<br class="">- return attrvalue(self)<br class="">- dwarf_method_name = attrname + "_dwarf"<br class="">- dwarf_test_method.__name__ = dwarf_method_name<br class="">- dwarf_test_method.debug_info = "dwarf"<br class="">- newattrs[dwarf_method_name] = dwarf_test_method<br class="">-<br class="">- if "dwo" in supported_categories:<br class="">- @decorators.add_test_categories(["dwo"])<br class="">- @wraps(attrvalue)<br class="">- def dwo_test_method(self, attrvalue=attrvalue):<br class="">- return attrvalue(self)<br class="">- dwo_method_name = attrname + "_dwo"<br class="">- dwo_test_method.__name__ = dwo_method_name<br class="">- dwo_test_method.debug_info = "dwo"<br class="">- newattrs[dwo_method_name] = dwo_test_method<br class="">-<br class="">- if "gmodules" in supported_categories:<br class="">- @decorators.add_test_categories(["gmodules"])<br class="">- @wraps(attrvalue)<br class="">- def gmodules_test_method(self, attrvalue=attrvalue):<br class="">- return attrvalue(self)<br class="">- gmodules_method_name = attrname + "_gmodules"<br class="">- gmodules_test_method.__name__ = gmodules_method_name<br class="">- gmodules_test_method.debug_info = "gmodules"<br class="">- newattrs[gmodules_method_name] = gmodules_test_method<br class="">+ method_name = attrname + "_" + cat<br class="">+ test_method.__name__ = method_name<br class="">+ test_method.debug_info = cat<br class="">+ newattrs[method_name] = test_method<br class=""><br class=""> else:<br class=""> newattrs[attrname] = attrvalue<br class=""><br class=""><br class="">_______________________________________________<br class="">lldb-commits mailing list<br class=""><a href="mailto:lldb-commits@lists.llvm.org" class="">lldb-commits@lists.llvm.org</a><br class="">http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits</blockquote></div></blockquote></div><br class=""></body></html>