Skip to content

Commit

Permalink
Update spectest
Browse files Browse the repository at this point in the history
  • Loading branch information
mohanson committed Nov 15, 2024
1 parent 4cb2050 commit d91dbbb
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

A WebAssembly interpreter written in pure Python, no third-party libraries are used.

The wasm version currently in use is: [WebAssembly Specification, Release 2.0 (Draft 2024-10-29)](https://webassembly.github.io/spec/core/).
The wasm version currently in use is: [WebAssembly Specification, Release 2.0 (Draft 2024-11-12)](https://webassembly.github.io/spec/core/).

Also requires Python version >= 3.12.

Expand Down
4 changes: 2 additions & 2 deletions script/spectest.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@

def call(cmd: str):
print(f'$ {cmd}')
return subprocess.call(cmd, shell=True)
return subprocess.run(cmd, shell=True, check=True)


call('cd res && rm -rf spectest')
if not os.path.exists('res/spec'):
call('cd res && git clone https://github.com/WebAssembly/spec')
# When update spectest, we can increase the commit id in small steps.
# Use: git log --reverse commit.. -- test/core
call('cd res/spec && git checkout cda4012a157f8e34cec64dc975e5552b96c58179') # Oct 29, 2024
call('cd res/spec && git checkout bd2aa85d5f6c6129760a3705f4de8acdb45b8e67') # Nov 12, 2024
call('cd res && cp -R spec/test/core spectest')

os.chdir('res/spectest')
Expand Down
10 changes: 5 additions & 5 deletions test/test_examples.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import subprocess


subprocess.check_call(f'python examples/add.py', shell=True)
subprocess.check_call(f'python examples/env.py', shell=True)
subprocess.check_call(f'python examples/fib.py', shell=True)
subprocess.check_call(f'python examples/str.py', shell=True)
subprocess.check_call(f'python examples/sum.py', shell=True)
subprocess.run(f'python examples/add.py', shell=True, check=True)
subprocess.run(f'python examples/env.py', shell=True, check=True)
subprocess.run(f'python examples/fib.py', shell=True, check=True)
subprocess.run(f'python examples/str.py', shell=True, check=True)
subprocess.run(f'python examples/sum.py', shell=True, check=True)

0 comments on commit d91dbbb

Please sign in to comment.