| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 893215a commit a541e01
6 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -12,10 +12,19 @@ | |||
| 12 | 12 | ||
| 13 | 13 | ||
| 14 | 14 | if support.check_sanitizer(address=True, memory=True): | |
| 15 | - # bpo-46633: test___all__ is skipped because importing some modules | ||
| 16 | - # directly can trigger known problems with ASAN (like tk). | ||
| 17 | - raise unittest.SkipTest("workaround ASAN build issues on loading tests " | ||
| 18 | - "like tk") | ||
| 15 | + SKIP_MODULES = frozenset(( | ||
| 16 | + # gh-90791: Tests involving libX11 can SEGFAULT on ASAN/MSAN builds. | ||
| 17 | + # Skip modules, packages and tests using '_tkinter'. | ||
| 18 | + '_tkinter', | ||
| 19 | + 'tkinter', | ||
| 20 | + 'test_tkinter', | ||
| 21 | + 'test_ttk', | ||
| 22 | + 'test_ttk_textonly', | ||
| 23 | + 'idlelib', | ||
| 24 | + 'test_idle', | ||
| 25 | + )) | ||
| 26 | + else: | ||
| 27 | + SKIP_MODULES = () | ||
| 19 | 28 | ||
| 20 | 29 | ||
| 21 | 30 | class NoAll(RuntimeError): | |
@@ -83,15 +92,23 @@ def walk_modules(self, basedir, modpath): | |||
| 83 | 92 | for fn in sorted(os.listdir(basedir)): | |
| 84 | 93 | path = os.path.join(basedir, fn) | |
| 85 | 94 | if os.path.isdir(path): | |
| 95 | + if fn in SKIP_MODULES: | ||
| 96 | + continue | ||
| 86 | 97 | pkg_init = os.path.join(path, '__init__.py') | |
| 87 | 98 | if os.path.exists(pkg_init): | |
| 88 | 99 | yield pkg_init, modpath + fn | |
| 89 | 100 | for p, m in self.walk_modules(path, modpath + fn + "."): | |
| 90 | 101 | yield p, m | |
| 91 | 102 | continue | |
| 92 | - if not fn.endswith('.py') or fn == '__init__.py': | ||
| 103 | + | ||
| 104 | + if fn == '__init__.py': | ||
| 105 | + continue | ||
| 106 | + if not fn.endswith('.py'): | ||
| 107 | + continue | ||
| 108 | + modname = fn.removesuffix('.py') | ||
| 109 | + if modname in SKIP_MODULES: | ||
| 93 | 110 | continue | |
| 94 | - yield path, modpath + fn[:-3] | ||
| 111 | + yield path, modpath + modname | ||
| 95 | 112 | ||
| 96 | 113 | def test_all(self): | |
| 97 | 114 | # List of denied modules and packages | |
@@ -119,14 +136,14 @@ def test_all(self): | |||
| 119 | 136 | if denied: | |
| 120 | 137 | continue | |
| 121 | 138 | if support.verbose: | |
| 122 | - print(modname) | ||
| 139 | + print(f"Check {modname}", flush=True) | ||
| 123 | 140 | try: | |
| 124 | 141 | # This heuristic speeds up the process by removing, de facto, | |
| 125 | 142 | # most test modules (and avoiding the auto-executing ones). | |
| 126 | 143 | with open(path, "rb") as f: | |
| 127 | 144 | if b"__all__" not in f.read(): | |
| 128 | 145 | raise NoAll(modname) | |
| 129 | - self.check_all(modname) | ||
| 146 | + self.check_all(modname) | ||
| 130 | 147 | except NoAll: | |
| 131 | 148 | ignored.append(modname) | |
| 132 | 149 | except FailedImport: | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -34,7 +34,7 @@ | |||
| 34 | 34 | ||
| 35 | 35 | ||
| 36 | 36 | if support.check_sanitizer(address=True, memory=True): | |
| 37 | - # bpo-46633: Skip the test because it is too slow when Python is built | ||
| 37 | + # gh-90791: Skip the test because it is too slow when Python is built | ||
| 38 | 38 | # with ASAN/MSAN: between 5 and 20 minutes on GitHub Actions. | |
| 39 | 39 | raise unittest.SkipTest("test too slow on ASAN/MSAN build") | |
| 40 | 40 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -3,6 +3,7 @@ | |||
| 3 | 3 | from test.support import check_sanitizer | |
| 4 | 4 | ||
| 5 | 5 | if check_sanitizer(address=True, memory=True): | |
| 6 | + # See gh-90791 for details | ||
| 6 | 7 | raise unittest.SkipTest("Tests involving libX11 can SEGFAULT on ASAN/MSAN builds") | |
| 7 | 8 | ||
| 8 | 9 | # Skip test_idle if _tkinter, tkinter, or idlelib are missing. | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -5,7 +5,7 @@ | |||
| 5 | 5 | ||
| 6 | 6 | ||
| 7 | 7 | if support.check_sanitizer(address=True, memory=True): | |
| 8 | - # bpo-46633: Skip the test because it is too slow when Python is built | ||
| 8 | + # gh-90791: Skip the test because it is too slow when Python is built | ||
| 9 | 9 | # with ASAN/MSAN: between 5 and 20 minutes on GitHub Actions. | |
| 10 | 10 | raise unittest.SkipTest("test too slow on ASAN/MSAN build") | |
| 11 | 11 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -10,6 +10,7 @@ | |||
| 10 | 10 | ||
| 11 | 11 | ||
| 12 | 12 | if check_sanitizer(address=True, memory=True): | |
| 13 | + # See gh-90791 for details | ||
| 13 | 14 | raise unittest.SkipTest("Tests involving libX11 can SEGFAULT on ASAN/MSAN builds") | |
| 14 | 15 | ||
| 15 | 16 | # Skip test if _tkinter wasn't built. | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -8,7 +8,7 @@ | |||
| 8 | 8 | ||
| 9 | 9 | ||
| 10 | 10 | if support.check_sanitizer(address=True, memory=True): | |
| 11 | - # bpo-46633: Skip the test because it is too slow when Python is built | ||
| 11 | + # gh-90791: Skip the test because it is too slow when Python is built | ||
| 12 | 12 | # with ASAN/MSAN: between 5 and 20 minutes on GitHub Actions. | |
| 13 | 13 | raise unittest.SkipTest("test too slow on ASAN/MSAN build") | |
| 14 | 14 | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments