mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-05-22 21:32:31 +00:00
Make improvements
- Fix build flakes - Polyfill SIGWINCH on Windows - Fix an execve issue on Windows - Make strerror show more information - Improve cmd.exe setup/teardown on Windows - Support bracketed paste mode in Blinkenlights - Show keyboard shortcuts in Blinkenlights status bar - Fixed copy_file_range() and copyfile() w/ zip filesystem - Size optimize GetDosArgv() to keep life.com 12kb in size - Improve Blinkenlights ability to load weird ELF executables - Fix program_executable_name and add GetInterpreterExecutableName - Make Python in tiny mode fail better if docstrings are requested - Update Python test exclusions in tiny* modes such as tinylinux - Add bulletproof unbreakable kprintf() troubleshooting function - Remove "oldskool" keyword from ape.S for virus scanners - Fix issue that caused backtraces to not print sometimes - Improve Blinkenlights serial uart character i/o - Make clock_gettime() not clobber errno on xnu - Improve sha256 cpuid check for old computers - Integrate some bestline linenoise fixes - Show runit process names better in htop - Remove SIGPIPE from ShowCrashReports() - Make realpath() not clobber errno - Avoid attaching GDB on non-Linux - Improve img.com example
This commit is contained in:
parent
2a938b3eaa
commit
b45d50b690
194 changed files with 4881 additions and 2966 deletions
|
@ -3,6 +3,7 @@
|
|||
if __name__ != 'test.support':
|
||||
raise ImportError('support must be imported from the test package')
|
||||
|
||||
import cosmo
|
||||
import collections.abc
|
||||
import contextlib
|
||||
import datetime
|
||||
|
@ -2043,9 +2044,10 @@ def run_unittest(*classes):
|
|||
def _check_docstrings():
|
||||
"""Just used to check if docstrings are enabled"""
|
||||
|
||||
MISSING_C_DOCSTRINGS = (check_impl_detail() and
|
||||
sys.platform != 'win32' and
|
||||
not sysconfig.get_config_var('WITH_DOC_STRINGS'))
|
||||
MISSING_C_DOCSTRINGS = (cosmo.MODE.startswith('tiny') or
|
||||
(check_impl_detail() and
|
||||
sys.platform != 'win32' and
|
||||
not sysconfig.get_config_var('WITH_DOC_STRINGS')))
|
||||
|
||||
HAVE_DOCSTRINGS = (_check_docstrings.__doc__ is not None and
|
||||
not MISSING_C_DOCSTRINGS)
|
||||
|
|
2
third_party/python/Lib/test/test_bz2.py
vendored
2
third_party/python/Lib/test/test_bz2.py
vendored
|
@ -734,7 +734,7 @@ class BZ2DecompressorTest(BaseTest):
|
|||
with self.assertRaises(TypeError):
|
||||
pickle.dumps(BZ2Decompressor(), proto)
|
||||
|
||||
@unittest.skipIf(cosmo.MODE == 'tiny',
|
||||
@unittest.skipIf(cosmo.MODE.startswith("tiny"),
|
||||
"TODO(jart): what's going on here?")
|
||||
def testDecompressorChunksMaxsize(self):
|
||||
bzd = BZ2Decompressor()
|
||||
|
|
3
third_party/python/Lib/test/test_class.py
vendored
3
third_party/python/Lib/test/test_class.py
vendored
|
@ -490,7 +490,8 @@ class ClassTests(unittest.TestCase):
|
|||
|
||||
self.assertRaises(TypeError, hash, C2())
|
||||
|
||||
@unittest.skipIf(cosmo.MODE == 'tiny', "no stack awareness in tiny mode")
|
||||
@unittest.skipIf(cosmo.MODE.startswith("tiny"),
|
||||
"no stack awareness in tiny mode")
|
||||
def testSFBug532646(self):
|
||||
# Test for SF bug 532646
|
||||
|
||||
|
|
|
@ -1152,7 +1152,7 @@ class ExceptionTests(unittest.TestCase):
|
|||
os.listdir(__file__)
|
||||
self.assertEqual(cm.exception.errno, errno.ENOTDIR, cm.exception)
|
||||
|
||||
@unittest.skipIf(cosmo.MODE == 'tiny',
|
||||
@unittest.skipIf(cosmo.MODE.startswith("tiny"),
|
||||
"todo(jart): why is it broken")
|
||||
def test_unraisable(self):
|
||||
# Issue #22836: PyErr_WriteUnraisable() should give sensible reports
|
||||
|
@ -1186,7 +1186,7 @@ class ExceptionTests(unittest.TestCase):
|
|||
self.assertIn("del is broken", report)
|
||||
self.assertTrue(report.endswith("\n"))
|
||||
|
||||
@unittest.skipIf(cosmo.MODE == 'tiny',
|
||||
@unittest.skipIf(cosmo.MODE.startswith("tiny"),
|
||||
"todo(jart): why is it broken")
|
||||
def test_unhandled(self):
|
||||
# Check for sensible reporting of unhandled exceptions
|
||||
|
|
2
third_party/python/Lib/test/test_fileio.py
vendored
2
third_party/python/Lib/test/test_fileio.py
vendored
|
@ -177,7 +177,7 @@ class AutoFileTests:
|
|||
finally:
|
||||
os.close(fd)
|
||||
|
||||
@unittest.skipIf(cosmo.MODE == 'tiny', "no stack awareness in tiny mode")
|
||||
@unittest.skipIf(cosmo.MODE.startswith("tiny"), "no stack awareness in tiny mode")
|
||||
def testRecursiveRepr(self):
|
||||
# Issue #25455
|
||||
with swap_attr(self.f, 'name', self.f):
|
||||
|
|
|
@ -619,7 +619,7 @@ class TestUpdateWrapper(unittest.TestCase):
|
|||
|
||||
@unittest.skipIf(sys.flags.optimize >= 2,
|
||||
"Docstrings are omitted with -O2 and above")
|
||||
@unittest.skipIf(cosmo.MODE == 'tiny',
|
||||
@unittest.skipIf(cosmo.MODE.startswith("tiny"),
|
||||
"No .py files available in Cosmo MODE=tiny")
|
||||
def test_default_update_doc(self):
|
||||
wrapper, f = self._default_update()
|
||||
|
@ -681,7 +681,7 @@ class TestUpdateWrapper(unittest.TestCase):
|
|||
@support.requires_docstrings
|
||||
@unittest.skipIf(sys.flags.optimize >= 2,
|
||||
"Docstrings are omitted with -O2 and above")
|
||||
@unittest.skipIf(cosmo.MODE == 'tiny',
|
||||
@unittest.skipIf(cosmo.MODE .startswith("tiny"),
|
||||
"No .py files available in Cosmo MODE=tiny")
|
||||
def test_builtin_update(self):
|
||||
# Test for bug #1576241
|
||||
|
@ -715,7 +715,7 @@ class TestWraps(TestUpdateWrapper):
|
|||
|
||||
@unittest.skipIf(sys.flags.optimize >= 2,
|
||||
"Docstrings are omitted with -O2 and above")
|
||||
@unittest.skipIf(cosmo.MODE == 'tiny',
|
||||
@unittest.skipIf(cosmo.MODE .startswith("tiny"),
|
||||
"No .py files available in Cosmo MODE=tiny")
|
||||
def test_default_update_doc(self):
|
||||
wrapper, _ = self._default_update()
|
||||
|
|
3
third_party/python/Lib/test/test_plistlib.py
vendored
3
third_party/python/Lib/test/test_plistlib.py
vendored
|
@ -814,7 +814,8 @@ class TestBinaryPlistlib(unittest.TestCase):
|
|||
b = plistlib.loads(plistlib.dumps(a, fmt=plistlib.FMT_BINARY))
|
||||
self.assertIs(b['x'], b)
|
||||
|
||||
@unittest.skipIf(cosmo.MODE == 'tiny', "no stack awareness in tiny mode")
|
||||
@unittest.skipIf(cosmo.MODE.startswith("tiny"),
|
||||
"no stack awareness in tiny mode")
|
||||
def test_deep_nesting(self):
|
||||
for N in [300, 100000]:
|
||||
chunks = [b'\xa1' + (i + 1).to_bytes(4, 'big') for i in range(N)]
|
||||
|
|
|
@ -131,7 +131,7 @@ class UnicodeFunctionsTest(UnicodeDatabaseTest):
|
|||
self.assertRaises(TypeError, self.db.numeric, 'xx')
|
||||
self.assertRaises(ValueError, self.db.numeric, 'x')
|
||||
|
||||
@unittest.skipIf(cosmo.MODE == 'tiny', 'astral planes arent tiny')
|
||||
@unittest.skipIf(cosmo.MODE.startswith('tiny'), 'astral planes arent tiny')
|
||||
def test_numeric_astral(self):
|
||||
self.assertEqual(self.db.numeric('\U00020000', None), None)
|
||||
self.assertEqual(self.db.numeric('\U0001012A'), 9000)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue