diff options
author | Mike Pennisi <mike@mikepennisi.com> | 2016-02-12 12:59:51 -0500 |
---|---|---|
committer | Mike Pennisi <mike@mikepennisi.com> | 2016-02-12 13:03:19 -0500 |
commit | 23d566209a2bccc14d572e0bd81394a9f99ca272 (patch) | |
tree | b9b3656f40cc836ad737eadb627d0930d6695368 /tools | |
parent | 5cb97c293b4a44ee1c31961a07663993c521fb5f (diff) |
Make asynchronous test configuration explicit
For asynchronous tests, the contract between test file and test runner
is implicit: runners are expected to inspect the source code for
references to a global `$DONE` identifier.
Promote a more explicit contract between test file and test runner by
introducing a new frontmatter "tag", `async`. This brings asynchronous
test configuration in-line with other configuration mechanisms and also
provides a more natural means of test filtering.
The modifications to test files was made programatically using the
`grep` and `sed` utilities:
$ grep "\$DONE" test/ -r --files-with-match --null | \
xargs -0 sed -i 's/^\(flags:\s*\)\[/\1[async, /g'
$ grep "\$DONE" test/ -rl --null | \
xargs -0 grep -E '^flags:' --files-without-match --null | \
xargs -0 sed -i 's/^---\*\//flags: [async]\n---*\//'
Diffstat (limited to 'tools')
-rwxr-xr-x | tools/packaging/test262.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/packaging/test262.py b/tools/packaging/test262.py index 1192005fc..551d6d3e0 100755 --- a/tools/packaging/test262.py +++ b/tools/packaging/test262.py @@ -309,7 +309,7 @@ class TestCase(object): return 'raw' in self.testRecord def IsAsyncTest(self): - return '$DONE' in self.test + return 'async' in self.testRecord def GetIncludeList(self): if self.testRecord.get('includes'): |