Skip to content
Snippets Groups Projects
Commit a73e4c7e authored by Benjamin Bouvier's avatar Benjamin Bouvier
Browse files

Bug 1332691: Add script to regenerate tests, update the WPT manifest and expectations; r=luke

MozReview-Commit-ID: DPFVJRiRiCT

--HG--
extra : rebase_source : 891530350a9f7d4bf8cacfba8ccf7d3d86f0ad46
parent 2aa6e441
No related branches found
No related tags found
No related merge requests found
......@@ -44,6 +44,8 @@ _OPT\.OBJ/
# SpiderMonkey test result logs
^js/src/tests/results-.*\.(html|txt)$
^js/src/devtools/rootAnalysis/t/out
# SpiderMonkey clone of the webassembly spec repository
^js/src/wasm/spec
# Java HTML5 parser classes
^parser/html/java/(html|java)parser/
......
.PHONY: help update run expectations
help:
@echo "Script to regenerate wasm test cases (JS and WPT) from the spec repository."
@echo ""
@echo "- a spec directory is needed under js/src/wasm (not checked in). It can be a"
@echo " symbolic link or a real directory; if it's not there, the Makefile will clone"
@echo " the repository from the sources."
@echo "- 'make update' makes sure the spec wast interpreter is up to date, regenerates"
@echo " all the JS and WPT test cases, and put them in the right directories, then"
@echo " updates the WPT manifest, if needed."
@echo "- 'MOZCONFIG=/path/to/bin/firefox make run' runs the WPT test cases and prints a"
@echo " summary of the failures in the console."
@echo "- 'MOZCONFIG=/path/to/bin/firefox make expectations' runs the WPT test cases and"
@echo " updates the expectations (known failures)."
@echo ""
@echo "Choose a rule: update or expectations."
update:
[ -d ./spec ] || git clone https://github.com/webassembly/spec ./spec
(cd ./spec/interpreter && make)
./spec/test/build.py \
--js ../jit-test/tests/wasm/spec \
--html ../../../testing/web-platform/mozilla/tests/wasm
echo "|jit-test| test-also-wasm-baseline; include:wasm-testharness.js" > ../jit-test/tests/wasm/spec/directives.txt
../../../mach wpt-manifest-update
run:
@[ -z $(MOZCONFIG) ] && echo "You need to define the MOZCONFIG env variable first."
@[ -z $(MOZCONFIG) ] || ../../../mach wpt /_mozilla/wasm
expectations:
@[ -z $(MOZCONFIG) ] && echo "You need to define the MOZCONFIG env variable first." || true
@[ -z $(MOZCONFIG) ] || ../../../mach wpt /_mozilla/wasm --log-raw /tmp/expectations.log || true
@[ -z $(MOZCONFIG) ] || ../../../mach wpt-update /tmp/expectations.log --no-patch
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment