aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2024-03-16 20:41:50 +0900
committernsfisis <nsfisis@gmail.com>2024-03-16 20:41:50 +0900
commit3d2d891d7e1492d179cd8da7a618fbdd5efcca2c (patch)
tree45367f35d98af1125a2197b3bc3dbc35700128d7 /tools
parent9b45796547c8022b98a9254320323d72aecd81cb (diff)
downloadphp-waddiwasi-3d2d891d7e1492d179cd8da7a618fbdd5efcca2c.tar.gz
php-waddiwasi-3d2d891d7e1492d179cd8da7a618fbdd5efcca2c.tar.zst
php-waddiwasi-3d2d891d7e1492d179cd8da7a618fbdd5efcca2c.zip
feat: add spec testsuites
Diffstat (limited to 'tools')
-rwxr-xr-xtools/wast2json.sh13
1 files changed, 13 insertions, 0 deletions
diff --git a/tools/wast2json.sh b/tools/wast2json.sh
new file mode 100755
index 0000000..26f677b
--- /dev/null
+++ b/tools/wast2json.sh
@@ -0,0 +1,13 @@
+#!/bin/bash
+
+set -eux
+
+if [[ -v WAST2JSON_PATH ]]; then
+ wast2json="$WAST2JSON_PATH"
+else
+ wast2json=wast2json
+fi
+
+cd tests/fixtures/spec_testsuites/core
+find . -name '*.wast' -print0 | xargs -0 -n 1 "$wast2json"
+find . -name '*.wat' -print0 | xargs -0 rm -f