From 2607e426f63c1f5d31b8537e81dde61ece576311 Mon Sep 17 00:00:00 2001 From: Michael Droettboom Date: Thu, 8 Nov 2018 15:20:53 -0500 Subject: [PATCH 1/4] Make cProfile work --- cpython/Setup.local | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cpython/Setup.local b/cpython/Setup.local index fecfe7b05..6751e8ca3 100644 --- a/cpython/Setup.local +++ b/cpython/Setup.local @@ -47,3 +47,5 @@ _codecs_iso2022 cjkcodecs/_codecs_iso2022.c _codecs_jp cjkcodecs/_codecs_jp.c _codecs_kr cjkcodecs/_codecs_kr.c _codecs_tw cjkcodecs/_codecs_tw.c + +_lsprof _lsprof.c rotatingtree.c From bffedb087be30f80aa6eb9c75b572669a85acf7a Mon Sep 17 00:00:00 2001 From: Michael Droettboom Date: Thu, 8 Nov 2018 15:22:29 -0500 Subject: [PATCH 2/4] Add test for cProfile --- test/test_python.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/test/test_python.py b/test/test_python.py index 7503badc6..989f7a9c4 100644 --- a/test/test_python.py +++ b/test/test_python.py @@ -530,3 +530,12 @@ def test_runpythonasync_exception_after_import(selenium_standalone): assert "ZeroDivisionError" in str(e) else: assert False + + +def test_cprofile(selenium_standalone): + selenium_standalone.run( + """ + import cProfile + cProfile.run("import colorsys") + """ + ) From 3ddfde73fd3d4009c7bd8cec7cff44c64d34c991 Mon Sep 17 00:00:00 2001 From: Michael Droettboom Date: Thu, 8 Nov 2018 16:54:29 -0500 Subject: [PATCH 3/4] Reinstate cProfile core Python test --- test/python_tests.txt | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/test/python_tests.txt b/test/python_tests.txt index adfebf6a0..e87e6956e 100644 --- a/test/python_tests.txt +++ b/test/python_tests.txt @@ -19,7 +19,6 @@ # whole module. # - networking: Fails because it tests low-level networking. # - dbm: Failures due to no dbm module -# - _lsprof: Failures due to no _lsprof module # - strftime: Failures due to differences / shortcomings in WebAssembly's # implementation of date/time formatting in strftime and strptime # - permissions: Issues with the test writing to the virtual filesystem @@ -63,7 +62,7 @@ test_asyncio.test_tasks async test_asyncio.test_transports test_asyncio.test_unix_events async test_asyncio.test_windows_events -test_asyncio.test_windows_utils +test_asyncio.test_windows_utils test_asyncore bad ioctl syscall async test_atexit test_audioop audioop @@ -126,7 +125,7 @@ test_contextlib_async async test_copy test_copyreg dbm test_coroutines async -test_cprofile _lsprof +test_cprofile test_crashers test_crypt test_csv From ebbe2f518f3a6a96f38ca1712e02ec904634e636 Mon Sep 17 00:00:00 2001 From: Michael Droettboom Date: Thu, 8 Nov 2018 17:23:36 -0500 Subject: [PATCH 4/4] Remove redundant test --- test/test_python.py | 9 --------- 1 file changed, 9 deletions(-) diff --git a/test/test_python.py b/test/test_python.py index 989f7a9c4..7503badc6 100644 --- a/test/test_python.py +++ b/test/test_python.py @@ -530,12 +530,3 @@ def test_runpythonasync_exception_after_import(selenium_standalone): assert "ZeroDivisionError" in str(e) else: assert False - - -def test_cprofile(selenium_standalone): - selenium_standalone.run( - """ - import cProfile - cProfile.run("import colorsys") - """ - )