Skip to content

Commit 11f369d

Browse files
authored
Update WAVE test runner
1 parent 58aefb7 commit 11f369d

37 files changed

Lines changed: 3198 additions & 319 deletions

.python-version

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
3.9

tools/requirements_mypy.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
mypy==1.14.1
22

3+
types-python-dateutil==2.9.0.20241206
34
types-atomicwrites==1.4.5.1
45
types-html5lib==1.1.11.20241018
56
types-setuptools==75.8.0.20250110

tools/wave/configuration_loader.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ def load_configuration_file(path):
9191
return {}
9292

9393
configuration = None
94-
with open(path) as configuration_file:
94+
with open(path, "r") as configuration_file:
9595
configuration_file_content = configuration_file.read()
9696
configuration = json.loads(configuration_file_content)
9797
return configuration

tools/wave/data/session.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@
99
PENDING = "pending"
1010
UNKNOWN = "unknown"
1111

12+
WMAS = "wmas"
13+
DPCTF = "dpctf"
14+
1215

1316
class Session:
1417
def __init__(
@@ -32,7 +35,6 @@ def __init__(
3235
reference_tokens=None,
3336
browser=None,
3437
expiration_date=None,
35-
type=None,
3638
malfunctioning_tests=None
3739
):
3840
if token is None:
@@ -72,7 +74,6 @@ def __init__(
7274
self.reference_tokens = reference_tokens
7375
self.browser = browser
7476
self.expiration_date = expiration_date
75-
self.type = type
7677
if malfunctioning_tests is None:
7778
malfunctioning_tests = []
7879
self.malfunctioning_tests = malfunctioning_tests

tools/wave/ecmascript/README.MD

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
# WMAS2017 ECMA Integration
2+
3+
## Generating Tests
4+
5+
Clone the ECMAScript 5 tests into the working directory
6+
7+
```
8+
$ git clone git@github.com:tc39/test262.git -b es5-tests
9+
```
10+
11+
Working directory should look like this
12+
13+
```
14+
generate-tests.js
15+
test262
16+
test-template.html
17+
webplatform-adapter.js
18+
```
19+
20+
Generate the tests by running
21+
22+
```
23+
$ node generate-tests.js
24+
```
25+
26+
Generated tests are placed in `ecmascript` directory. Copy this
27+
directory into the top level directory of the Web Platform Tests
28+
hierarchy in order for the Web Platform Test Runner to run them.
29+
30+
## Test generation parameters
31+
32+
```
33+
$ node generate-tests.js < test262-repo-dir > < output-dir >
34+
```
35+
36+
You can specify where the test262 repository is located and where the
37+
generated tests should be put in by passing the paths to the
38+
generator script as shown above.
39+
40+
## Excluded tests
41+
42+
The following tests are automatically excluded, because they are
43+
causing the browser to freeze.
44+
45+
```
46+
ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-14.js
47+
ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-14.js
48+
ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-14.js
49+
ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-14.js
50+
ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-14.js
51+
```

0 commit comments

Comments
 (0)