Source code

Revision control

Other Tools

1
.PHONY: help update run expectations
2
3
help:
4
@echo "Script to regenerate wasm test cases (JS and WPT) from the spec repository."
5
@echo ""
6
@echo "- a spec directory is needed under js/src/wasm (not checked in). It can be a"
7
@echo " symbolic link or a real directory; if it's not there, the Makefile will clone"
8
@echo " the repository from the sources."
9
@echo "- 'make update' makes sure the spec wast interpreter is up to date, regenerates"
10
@echo " all the JS and WPT test cases, and put them in the right directories, then"
11
@echo " updates the WPT manifest, if needed."
12
@echo "- 'MOZCONFIG=/path/to/bin/firefox make run' runs the WPT test cases and prints a"
13
@echo " summary of the failures in the console."
14
@echo "- 'MOZCONFIG=/path/to/bin/firefox make expectations' runs the WPT test cases and"
15
@echo " updates the expectations (known failures)."
16
@echo ""
17
@echo "Choose a rule: update or expectations."
18
19
update:
20
[ -d ./spec ] || git clone https://github.com/webassembly/spec ./spec
21
(cd ./spec/interpreter && make)
22
./spec/test/build.py \
23
--use-sync \
24
--js ../jit-test/tests/wasm/spec \
25
--html ../../../testing/web-platform/mozilla/tests/wasm
26
(cd ../jit-test/tests/wasm/spec && patch -u -p7 < ../../../etc/wasm-spec-tests.patch)
27
echo "|jit-test| test-also=--wasm-compiler=ion; test-also=--wasm-compiler=baseline; test-also=--test-wasm-await-tier2; test-also=--disable-wasm-huge-memory; include:wasm-testharness.js" > ../jit-test/tests/wasm/spec/directives.txt
28
echo "|jit-test| skip-if:true" > ../jit-test/tests/wasm/spec/harness/directives.txt
29
30
run:
31
@[ -z $(MOZCONFIG) ] && echo "You need to define the MOZCONFIG env variable first."
32
@[ -z $(MOZCONFIG) ] || ../../../mach wpt /_mozilla/wasm
33
34
expectations:
35
@[ -z $(MOZCONFIG) ] && echo "You need to define the MOZCONFIG env variable first." || true
36
@[ -z $(MOZCONFIG) ] || ../../../mach wpt /_mozilla/wasm --log-raw /tmp/expectations.log || true
37
@[ -z $(MOZCONFIG) ] || ../../../mach wpt-update /tmp/expectations.log --no-patch