summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/etc/wasm/generate-spectests/README.md
blob: 18269d6d92d39384cd7e8b468f91010e13149860 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
# generate-spectests

A tool to generate a combined testsuite for the wasm spec and all proposals.

This tool tries to be as robust as possible to deal with upstream breakage, while still generating a minimal testsuite for proposals that don't change many tests.

## Usage

NOTE: Running this on its own will generate spec tests but not actually copy them to the jit-test folder or apply patches. If you want to run the whole process for real, use the makefile in the parent folder.

```bash
# Configure the tests you want
vim config.toml

# Generate the tests
# This will create a `repos/` and `tests/` in your working directory
cargo run
```

## config.toml

```toml
# (optional) Text to add to a 'directives.txt' file put in 'js/${repo}/harness'
harness_directive = ""

# (optional) Text to add to a 'directives.txt' file put in 'js/${repo}'
directive = ""

# (optional) Tests to include even if they haven't changed with respect to their parent repository
included_tests = ["test.wast"]

# (optional) Tests to exclude
excluded_tests = ["test.wast"]

[[repos]]
# Name of the repository
name = "sign-extension-ops"

# Url of the repository
url = "https://github.com/WebAssembly/sign-extension-ops"

# (optional) Name of the repository that is the upstream for this repository.
# This repository will attempt to merge with this upstream when generating
# tests. The parent repository must be specified before this repository in the
# 'config.toml'. If you change this, you must delete the 'repos' directory
# before generating tests again.
parent = "spec"

# (optional) Whether to skip merging with upstream, if it exists.
skip_merge = "false"

# (optional) The commit to checkout when generating tests. If not specified,
# defaults to the latest 'origin/master'.
commit = "df34ea92"

# (optional) Text to add to a 'directives.txt' file put in 'js/{$repo}'
directive = ""

# (optional) Tests to include even if they haven't changed with respect to their parent repository
included_tests = ["test.wast"]

# (optional) Tests to exclude
excluded_tests = ["test.wast"]
```