sagemathinc / cowasm-python

CoWasm-Python: WebAssembly Python for Servers and Browsers
6 stars 0 forks source link

cpython testsuite runner ? #9

Open pmp-p opened 1 year ago

pmp-p commented 1 year ago

Hi, is it actually possible to launch the CPython 3.11 testsuite ? It would need the whole stdlib , unzipped, in a writeable folder. And maybe an async runner to prevent locking UI.

williamstein commented 1 year ago

Hi, is it actually possible to launch the CPython 3.11 testsuite ?

Yes:

  1. clone this repo
  2. cd into the packages/cpython directory
  3. Type make test to run the supported tests, which should all pass.
  4. Type make test-all to run the full test suite.

Note that when you do step 3 above, it should automatically build cpython native, then cpython wasm first (about 5 minutes), so that it's able to run tests.

Looking at the code it seems that might not be in parallel, so you might want to edit the test-all line of the makefile.

williamstein commented 1 year ago

What I have not implemented is running the cpython test suite in a browser.

pmp-p commented 1 year ago

Thanks testing local is good, but yeah sorry i meant into browser, i have one set up here https://pygame-web.github.io/showroom/pythondev.html?-d#src/testsuite.py%20all but i'd really like to test cowasm and compare.

williamstein commented 1 year ago

Yes, same! I just haven't got to it.

Right now the test runner is still native cpython, so I would have to ensure that tests can be run entirely via python-wasm. Good job with your test running in the browser.